The Saturday 2004-10-16 at 21:48 +0200, Hylton Conacher (ZR1HPC) wrote:
Yes, but does fsck.ext3 check for bad blocks as that is what I am trying to get done here.
Yes. man fsck.ext3 will tell you how.
I can hear Pat saying I should read the fine MANual on how to fish. :) Putting my best eye forward I READ and re-read the man page.
I see that bad blocks are checked with th -c option, but I am confused as to what the file descriptor (|^^|below) for the -C option should be.
I have decided that the command should be: #>e2fsck -pcfv -C fd <device> |^^|
Ah. That is not a file, but a kind of handle so that the program that called e2fsck can "intercept" the output of e2fsck itself, and display it in a cute progress window. That's not for you.
Moving forward, I know I cannot fsck a mounted fs so how do I get the above to run before the fs are mounted. I have read that /etc/init.d/ is a good place but reading the man page, and searching through the directory, I see many text editable script files that I could add the above into.
Which script should I add it into so that it gets processed in the right place on system boot up?
No... I would leave that alone. If you want to check for badblocks with that command, you have to see the result in screen yourself, manually. The fs is checked here: /etc/init.d/boot.rootfsck /etc/init.d/boot.localfs ******* Then, a word: no matter how many times you check for bad blocks can help you prevent a hard disk crash. SMART may help sometimes, and then, it might not. If you are worried, design a proper backup procedure, use RAID arrays. ****** -- Cheers, Carlos Robinson