Click to See Complete Forum and Search --> : fsck on / partition


slacker_x
07-25-2001, 11:25 PM
How can I run an fsck on my / partition (/dev/hda1)

if I do
fsck -rC /dev/hda1
I get a rather sever warning that cautions that severe filesystem damage may occur if I run fsck on a mounted filesystem.

I am assuming that you can't umount the root filesystem......so how can this be done?


The reason that I'm trying to run this check is that my /etc/motd file is pooched.

when I try to rm /etc/motd as root I get the error:
rm: cannot remove `motd': Input/output error

Malakin
07-26-2001, 06:25 AM
If it's an ext2 filesystem then you can use "tune2fs /dev/hda -c 0" which should set the mount count before doing an fsck to 0 so it will automatically run fsck the next time you boot, so boot the computer let the fsck run and then change the mount count to 32 or something.
If you're not running ext2 or you couldn't be bothered to do the above, you can close everything you can, run "sync" a few times and hit the power switch if you want :)