In Debian there is a file /etc/init.d/checkroot.sh which runs at boot time.
If you run Debian, you could put your e2fsck command right after
echo "Checking root file system..."
fsck $force $fix /
(but you'd have to create a file /forcefsck) or right before the
mount -n -o remount,rw /
On another distribution you'll find those same operations in some other script.
if [ -f /forcefsck ]
/sbin/e2fsck $FSFORCEFSCK -p $FSDEV; FSSTATUS=$(( FSSTATUS | $? ))
... you get the idea. How to do it finally depends, so I cannot just
send you my bcheckrc in the hope it works.
\ Real name : Jrgen Heinzl \ no flames /
\ Phone Private : +44 181-332 0750 \ /
How to figure out where the superblocks are? I had a disk crash (related
to external environment - heat - got that fixed now), and the fs (ext2)
has a few errors in it, but am unable to completely clean up the boot
process now. I have used fsck, and it seems to fix things, but then on
the next boot the fs check tells me there are still some inconsistencies.
The system seems to work fine.
QUESTION: Trying to use e2fsck, with the "-b 8193" option (try another
superblock) - I cannot find the right block number against 'b' for it to
work. Is there a utility that will >>>>>list the superblocks, <<<<< as
they were read out on the screen when I initially installed Linux? Then I
would be able to try e2fsck and hopefully finaly clean up my filesystem. I am
using 1.1.61 without any problems.
Thanks - Rick