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.


If your ubuntu has systemd, you can edit /lib/systemd/system/local-fs.target and comment out the last two lines:

#OnFailure=emergency.target
#OnFailureJobMode=replace-irreversibly

I haven't tested this extensively and don't know if there are any risks or side effects involved, but so far it works like a charm. It mounts the root volume and all other volumes (except those that are misconfigured, obviously), then it continues the boot process until SSH is up, so you can connect to the instance and fix the incorrect fstab entries.