Friday, September 29, 2006

How to edit /etc/fstab during startup

Two days ago, I made a mistake in /etc/fstab file on a server that has installed Fedora Core 4. This made the machine could not boot. The system asked me to log in as root. Then I had to correct /etc/fstab before rebooting the machine. But when I edited the file, It could not be saved because at that time it was a read-only file.

I searched for solutions of this problem. And I found that I had to remount the filesystem before editing the file. These are the commands:

#mount /proc
#mount -o remount /

Or remount all filesystem. Using these commands:

#umount -a
#mount -w -a

Then I could edit /etc/fstab :D