Quote:
Originally Posted by LucL
I've never used fsck yet but when I typed it in I got the following warning:
/dev/sda2 is mounted.
WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.
Do you really want to continue (y/n)?
|
You should run fsck against an unmounted file system. So:
umount /dev/sda2
before you run fsck. If you cannot umount /dev/sda2 then shutdown and boot a live CD. Run fsck from the live CD.
Also it is important to tell fsck what type of file system you are working on. At times fsck cannot figure it out and if fsck guesses wrong about the file system type it will usually make matters much worse. So assuming that /dev/sda2 is an ext3 file system you would want something like:
fsck -N -t ext3 /dev/sda2
-N tells fsck not to actually fix anything, just list what it thinks needs to be fixed. If you decide to go ahead and let fsck fix the file system then use the -y option to turn off fsck asking you for permission for each and every fix.
fsck -y -t ext3 /dev/sda2
If fsck finds orphans and file fragments which fsck does not know what they are then fsck places these files in lost+found and gives them a number for a name. So after you run fsck look in lost+found to see if you have any orphans.
Read the fsck man page before you boot the liveCD. Some liveCDs do not have man pages.
man fsck
--------------------------
Steve Stites