A little blond haired gremlin struck yesterday (repeatedly power-cycling the machine) , wiping out /etc/fstab on my Fedora Core box.
When attempting to boot the machine, a cryptic error message appeared, along the lines of "your /etc/fstab file is hosed". I entered the root pw and went to the #repair prompt and did indeed find /etc/fstab to be corrupt. Additionally, it was not writable as I somehow didn't have perms.
After bit of Googling, I started digging around for the installation CDs to try "rescue mode". The gremlin apparently hid them, so I decided to burn a new one. I grabbed the ISO image and inserted a fresh disc in my r/w drive. Unfortunately, Google Earth and CD Creator no longer play nice - CD Creator (and other apps I subsequently tried) refused to burn an ISO image.
After firing off a few desperate emails in search of help, I decided to try to remount the device (instead of the logical directory). Voila! It worked - I then had to hack at /etc/fstab to try to get it to mount. After a few attempts, I got a bootable system again, with no data loss. Phew.
The steps I took were as follows:
- Boot machine
- Enter root pw and go to #repair prompt
- Remount with "mount -o rw,remount /dev/sda /"
- Edit fstab, using this as a model. Note there is a bug with "LABEL=", so I had to use this workaround
- Repeat steps 1-5 until drives mount properly