Difference between revisions of "Remount root partition"

From Noah.org
Jump to navigationJump to search
 
Line 1: Line 1:
 
[[Category:Engineering]]
 
[[Category:Engineering]]
  
Sometimes, due to hubris or stupidity, you end up with bad fstab entries for your root or /etc partition.
+
Sometimes, due to hubris or stupidity, you end up with a bad fstab entry for your root or /etc partition.
 
Linux will detect errors and conveniently mount it as read-only, but now you can't edit /etc/fstab to fix the problem. Just remount it, but don't forget the -n option.  
 
Linux will detect errors and conveniently mount it as read-only, but now you can't edit /etc/fstab to fix the problem. Just remount it, but don't forget the -n option.  
 
<pre>
 
<pre>

Revision as of 13:20, 12 April 2007


Sometimes, due to hubris or stupidity, you end up with a bad fstab entry for your root or /etc partition. Linux will detect errors and conveniently mount it as read-only, but now you can't edit /etc/fstab to fix the problem. Just remount it, but don't forget the -n option.

-n     Mount without writing in /etc/mtab.  
       This is necessary for example when /etc is on a read-only file system.

For example, this will remount / with defaults (defaults contains rw):

mount -n -o remount,defaults /dev/VolGroup00/LogVol00 /