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.
Cameron
[blablabla]
if [ -f /forcefsck ]
then
FSFORCEFSCK=-f
fi
[blablabla]
/sbin/e2fsck $FSFORCEFSCK -p $FSDEV; FSSTATUS=$(( FSSTATUS | $? ))
[blablabla]
... you get the idea. How to do it finally depends, so I cannot just
send you my bcheckrc in the hope it works.
Cheers,
Juergen
--
\ 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
2. Real-time futexes (priority inheritance/protection /robust support) take 4
3. Looking for defrag for ext2fs and Question about e2fsck
4. Issues with Virtual Hosting on Apache
5. e2fsck: root inode isn't a directory???
6. Token-Ring driver (transmitter access conflict)
8. hub.freebsd.org: SMTP access denied !!! Why ? !!!!
9. e2fsck gives "bad magic number..."! Help!
12. e2fsck