Thursday, December 15, 2011

Unable to edit fstab as it is a read only file during repair

I unwittingly changed the label for a partition for the /etc/fstab and was was presented with bootup to bash.
When I tried to revert back to the correct label for the partition, the vi just could not save the newly edited settings, instead it will have the error message "Error writing fstab: Read-only file system"

To solve the issue, you have to remount

mount -n -o remount / 
which work fine for me.

Or
mount -n -o remount -t ext2 /dev/hda2 / 

No comments: