You are not logged in.

#1 2010-09-21 03:33:04

clu
Member
Registered: 2008-07-05
Posts: 40

[Solved] Run specific e2fsck (-c -k) at boot?

I have a machine with some odd hard disk issues and at this point I want it to run `e2fsck -c -k` at boot (not rebooted often). I have googled this a bit and found `shutdown -rF now` which forces an fsck run at reboot. However, my problem is that I really need the badblocks check and fix to run too.

Anybody have any idea how to do this?

Last edited by clu (2010-09-22 05:56:05)


Kick out the jams! -- AUR

Offline

#2 2010-09-21 04:31:44

jt512
Member
Registered: 2009-02-19
Posts: 262

Re: [Solved] Run specific e2fsck (-c -k) at boot?

I don't know if this is the best approach, but you could edit the fsck command in /etc/rc.sysinit.  Then, in the / directory, as the root user, create an empty file named "forcefsck" and reboot.

Jay

Offline

#3 2010-09-22 05:55:45

clu
Member
Registered: 2008-07-05
Posts: 40

Re: [Solved] Run specific e2fsck (-c -k) at boot?

Root is already mounted read-only by then (not sure why?) so I guess this is just not something that should really be done. It can be done but based on e2fsck recommendations it's a "bad" idea.

Guess that settles it. Thanks jt512.


Kick out the jams! -- AUR

Offline

Board footer

Powered by FluxBB