How do I interact with the console during boot time on Amazon EC2?

I don't know an 'easy' solution to your problem, but there is a somewhat convoluted (depending on your root device type) solution.

If your instance has an EBS root, the solution is simple enough: stop the instance, detach the EBS drive, launch another instance and attach the EBS volume to it. Edit your fstab file as needed, detach the EBS volume and re-attach it to the original instance.

If your instance has an S3-backed root (i.e. instance-store), the solution is a good bit harder. You can download the data from your AMI (using ec2-download-bundle), and then extract that data into a single file (using ec2-unbundle). You can then mount the image, make the necessary change, and rebundle the image (with ec2-bundle-vol, overriding the default volume to bundle with the -v flag). That should give you a new, viable AMI, identical to your old one, except for the modifications you make. Alternatively, you could copy the content of the image file to an EBS volume using dd - and then convert to an EBS root backed instance.

Tags:

Amazon Ec2