On Wed, 27 Jun 2001 18:29:43 +0530
Shridhar Daithankar <[EMAIL PROTECTED]> wrote:
>
>
> John Hanon wrote:
> > How do I run fsck manually?
>
> #fsck -A -y /dev/hda
>
> Suresh posted this on 14th Jun. It's becoming a FAQ these days...
>
> Shridhar
>
This does not seem correct. Please check man fsck.
AFAIK, there is no fsck-option as "-y", there are just two
"-a" for Automatic repair and "-r" for Interactive repair.
The first option "-A" is correct, it instructs fsck to step
through all mounted devices on fstab, and therefore the drive
specification is not needed. I have two hard disks and my
root "/" is on hdb, whereas my "/usr" and "/opt" is on hda.
However, if you want to do fsck of a maunt point not noted
in in fstab, the exact mount point needs to be specified.
If you want to check a particular directory, instead of the
whole mount point, is is possible to specify the exact
location like "/home/user", or "/usr" etc as the case may be.
Needless to say, fsck is seldom needed to be fired manually
except for repair/ rescue purposes. fsck and family like
e2fsck, e2fsck.ext2 and other such system utilities provided
by the e2fsprogs package should not be run on mounted systems.
In real life such a situation is encountered after a major
file system corruption (e.g. power-cuts during disk write
etc) and the boot up process hangs because of corruption of
the "/" dir which normally also houses the /boot and /etc
dirs.
I have had a situation four years ago, wherein after a powercut,
my "/" partition went caput and -A option did not work because
/etc/fstab could not be located. OMHO, the recommended method
of fsck under such circumstances is as follows:
a) Boot from a rescue disk, which can operate independently from
ramdrive, without mounting any partition from the hard disk(s).
c) Do an fdisk and see that all partitions are readable and there
is no corruption of the partition tables per se.
d) Do fsck of each partition manually as follows:
#fsck -V -r /dev/hdXN (where X is a,b etc, and N is no)
-V is verbose mode
-r is repair after confirmation (Interactive mode)
There are lots of other creavats in recovering a severely crashed
system ... these one picks up with experience. This post has gone
long, and its is appropriate to close at this stage.
Dr USM Bish
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/linux-india-help