[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: reboot with fsck and bad block check



On Sat, 24 Sep 2005 23:32:00 -0400
Angelo Bertolli <angelo@freeshell.org> wrote:

> How can I force it to do a bad block check on reboot and not just a 
> regular fsck?  Where do I put the -c option (e2fsck)?

Is this really something that would be desirable?

It seems to me that if you think checking for bad blocks is needed it
would be worth the effort of booting from a mini distrobution on CD or
floppy and run the check from there.

I don't see any option in the fsck man page for doing a bad block check.

Unless you want to hack on init scripts (checkfs.sh and checkroot.sh)
to use the filesystem specific stuff directly with the options you
want I don't see a way.

I see that the badblocks man page has a big fat warning:

Normally,  badblocks will refuse to do a read/write or a
non-destructive  test on a device which is mounted, since either can
cause the system to potentially crash and/or damage the filesystem even
if it  is mounted read-only.   This  can  be  overridden  using the -f
flag, but should almost never be used --- if you think you're smarter
than the badblocks program, you almost certainly aren't.  The only
time  when  this  option might be safe to use is if the /etc/mtab file
is incorrect, and the device really isn't mounted.

Later, Seeker



Reply to: