Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to run fsck in order to repair my one and only hard-disk. I have no rescue CD/USB available.

I did the following:

touch /forcefsck
chmod a+rw /forcefsck # just to be really sure
reboot

But no fsck happened on reboot, though the /forcefsck file quietly disappeared (why BTW?)!

I saw some responses on the Net suggesting a shutdown -rF to auto-run fsck on reboot, but the shutdown I have on my F16 does not have any -F option.

share|improve this question
    
Does the line for your disk in /etc/fstab end with "0 0" or is missing the final column? If the 6th column is missing or 0, the startup scripts should skip that device when doing an fsck at startup. –  drewbenn Apr 3 '12 at 23:33
add comment

2 Answers 2

up vote 2 down vote accepted

Not precisely an answer to your question, but there is an interesting discussion here: https://bugzilla.redhat.com/show_bug.cgi?id=806369

The recommended approach is to set the fsck.mode=force flag at boot time. This makes sense, as writing a file to the filesystem that you wish to check is a little counter-intuitive.

share|improve this answer
    
Thanks, the "counter-intuitiveness" of it never occurred to me, especially since such features, mechanisms, and hooks are usually provided by the developers who designed and implemented these components in the first place. But, now it makes sense. –  Harry Apr 6 '12 at 3:18
add comment

I won't be marking this as the final answer, but I'm going ahead and sharing anyway what I did to work around the above problem so as to be able to run fsck, which was my real goal. Any answers to the original question above would still be appreciated.

Upon reboot, edited the Grub menu by pressing e. Appended init=/bin/bash to the kernel line Saved changes by pressing F10, and THEN FINALLY

Ran fsck /

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.