[PLUG] Running fsck

Elliott Mitchell ehem at m5p.com
Thu Dec 21 23:12:04 UTC 2006


>From: Keith Lofstrom <keithl at kl-ic.com>
> On Wed, Dec 20, 2006 at 04:21:56PM -0800, John Jason Jordan wrote:
> > 
> > Also, how does one run fsck? You can't run it on a mounted partition,
> > right? But I have to be booted into Linux to use it. Is the normal
> > procedure to use a live CD?
> 
> There are two standard ways.  They involve a text window, as root.
> 
> 1)  Bring up a text window.  change user to root:
>   [john]$  su - root
>   Password:  YourRootPasswordHere
>   [root]#  touch /forcefsck
>   [root]#  reboot            (or just do it with the GUI)

This is the "standard" way, it will work on most flavors of Unix (haven't
seen one where it doesn't work, but just in case there was someone insane
out there). The advanced method is to remount the filesystem read-only
(mount <mount point|device> [-n] -o ro,remount), and then run fsck. This
is what creating /forcefsck or shutdown -F cause to happen behind the
scenes. The real trick is to make / and /usr read-only, and which point
the only concern is /var (but which the system can get most of the way up
without). Having the filesystems read-only also tends to avoid damage
being done in the first place.

> Oh, and do backups.  See "www.dirvish.org" for my favorite method ...

Indeed, backups, backups, and just in case you didn't hear it the first
time, backups. I prefer `dump` (SysV-style!) once you figure out the
syntax, it is a very effective backup tool.


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         EHeM at gremlin.m5p.com PGP 8881EF59         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
    \___\_|_/82 04 A1 3C C7 B1 37 2A*E3 6E 84 DA 97 4C 40 E6\_|_/___/





More information about the PLUG mailing list