Friday, September 18, 2009

Root is read-only?

When you're doing serious work on Linux, sometimes things get broken and need to be fixed. If that something involves disks, you might be greeted with a screen at boot that says that there is a problem and that you should "Give root password for maintenance (or type Control-D for normal startup)". But when you type your root password and get the shell prompt, you can't do anything because the root is read-only. For instance, you might need to edit /etc/fstab or another configuration file to remove or comment out an offending line. But you can't save your changes because root is read-only. The command to fix this is simple:

mount -n -o remount -t ext3 /dev/sda3 /

Remember to enter the correct filesystem type (ext3 in this example) and the correct disk partition (/dev/sda3 in this example) and your problem should be solved.

Labels: ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home