How to boot Linux successfully when a reboot fails due to missing Filesystems

Recently I was looking at a customer config who had stale entries in /etc/fstab for filesystems that were no longer valid and for some reason he had to reboot the box. After the reboot,¬†the Linux machine¬†ended up in the single user mode and the fsck(1) complained about missing UUID (of the missing filesystems; the actual message was <enter the root password to get into shell prompt or press ctrl-d to reboot>). We were breaking our head how to get over this and get on with the boot process. The problem was that the root (/) filesystem was mounted read-only and we couldn’t really edit the /etc/fstab to remove the stale entries (The best idea is remove the entries soon after removing/deleting the LUN but oversight can happen to anyone). How do we get the root filesystem to be mounted read-write to edit the /etc/fstab and remove the stale entries.

The following did the trick, we mounted the / in rw mode and edited the /etc/fstab and we were good to go.

In short this is what we did –

1. Mount / in rw mode

2. Edit /etc/fstab (vi the file and remove stale entries)

3. Enter multiuser mode

That’s it, we are back in business!