This is a short write up if after a reset or a reboot your FreeBSD (or Linux) instance doesn’t come online, stalls and
“aws ec2 get-console-output” returns something like that among its lines:
UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
- Just power-off the faulty instance either from Web interface or using cli:
aws ec2 stop-instances --instance your_instance_id
- Again, using Web interface or cli (if you know its id) detach volume the root filesystem lives on.
aws ec2 detach-volume --volume-id faulty_volume_id --instance your_instance_id
- Create a new minimal instance and attach the volume that was detached during the previous step.
- Boot it up and simply run fsck manually as advised.
For FreeBSD you will have to add an entry into /etc/fstab otherwise fsck would complain:
# fsck -y /dev/xbd5a fsck: Could not determine filesystem type
In my case I just add a single line:
echo "/dev/xbd5a /mnt ufs rw 1 1" >> /etc/fstab
- After that, just do the reverse: detach the volume and connect it back to your main instance and power it up.
Hope everything is golden at this point.