EC2 does not boot, goes to “Press enter for maintenance mode”

amazon ec2fsckubuntu-18.04

Environment

  • EC2/T2
  • Ubuntu 18.04

I have several instances in this environment; all are built off the same Ubuntu AMI.

Sometimes, some instances get stuck on the boot console with a message "Press enter for maintenance (Or press CTRL-D to Continue)"

I tried shutting down, detaching the root vol, and attaching it to a running recovery workstation, to fsck the volume. fsck comes up clean, no matter how much I try to force recovery.

The syslog is old — no new log entries are added as of the most current boot attempt — perhaps because the box never actually boots.

I'm at a loss of what else to try.

I know the "EC2 Best Practice" is to throw away and redeploy the instance, and that's fine, but I want to figure out what's actually causing this because it has happened several times, sporadically, and I'd like to prevent it if at all possible.

Change AMIs?
Some other fsck-type fix to the root vol?
Something else?

Best Answer

I figured it out. I should have figured this out much, much sooner, now I'm kicking myself.

This node had a mount point defined in /etc/fstab, but no corresponding resource to mount. In this case, the resource was supposed to be an encrypted EBS volume.

Removing the mount definition in /etc/fstab OR adding the required volume to the EC2 instance fixed the problem.

Related Topic