[WBEL-users] Force FSCK every reboot
Kirby Bohling
kbohling@birddog.com
Mon, 5 Apr 2004 15:09:38 -0500
On Mon, Apr 05, 2004 at 12:34:44PM -0700, Mickael Maddison wrote:
> Hello whitebox-users,
>
> I'm wondering... how can I force WBEL to automatically run FSCK -y on ALL hard-disk partitions upon reboot (whether soft or hard).
>
> I currently have the ability to remotely cycle the power to a machine, but don't have remote KVM yet. So I want to avoid the possibility of a machine sitting waiting for me to enter the root password to fsck the machine... I would much rather have that done automatically on ANY reboot, so that if I have to cycle the power, I know the chances of the machine coming to 'online' status are much greater.
>
> Suggestions?
I believe there are several ways to do this. First off a simple
script. Just go find the fsck commands in /etc/rc.d/rc.sysconfig
initlog -c "fsck -T -a / $fsckoptions"
initlog -c "fsck -T -R -A -a $fsckoptions"
Modify both of those lines to have a -y on them.
It appears that you might be able add a line immediatly after this
snippit in /etc/rc.d/init.d/halt:
# remove the crash indicator flag
rm -f /.autofsck
Add a line like this:
echo "-y" >> /fsckoptions
It looks like the rc.sysconfig script reads in that file to be a way
to set fsck options for the next boot. However, the file gets
removed on every boot (I suppose you could modify that also).
I don't have time to look into it to see if there is a better way.
Those are just the two most obvious ways to me from a cursory look
at the startup scripts.
Thanks,
Kirby
>
> --
> Best regards,
> Mickael mailto:mike@kamloopsbc.com
>
> _______________________________________________
> Whitebox-users mailing list
> Whitebox-users@beau.org
> http://beau.org/mailman/listinfo/whitebox-users
>