Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to force a verbose fsck on reboot of my Ubuntu linux server, I can get fsck to run on reboot by creating a file /forcefsck in my root dir ...

Additionally, by adding a y into the contents of the /forcefsck file my server will (properly) run fsck on reboot without any user interaction but every time I reboot (and let the auto fsck run) and then do ...

fsck -nvf /dev/somedisk

I still have the disk errors I had before, I even tried putting yvf in the text of the /forcefsck file with no luck.

Is there a simple way for me to force a verbose fsck on reboot?

Note: I've watched the fsck running at reboot and it does not come up with the same errors I get when I run fsck -nvf /dev/somedisk ?

share|improve this question
I'd be much more worried about why a fsck is required on each boot. – vonbrand Feb 6 '13 at 19:05
It's not needed on each boot, I'm trying to run it once ... but on the root filesystem before it gets mounted. – Justin Jenkins Feb 6 '13 at 19:38
Are you trying to fsck a mounted partition [no-no]? If not (as a one off), why do you need to reboot to do it ? Is the solution you are looking for maybe to get a command prompt before the drive is mounted RW so you can check and repair it interactively ? (If so, when booting, go into LILO/GRUB and append "init=/bin/bash" to your kernel line (and make sure the letters " ro " are there somewhere - which should be the default - to make sure its mounted read-only. – davidgo Feb 8 '13 at 8:57
I need to fsck the root file system before it gets mounted by the OS ... – Justin Jenkins Feb 8 '13 at 21:53

One solution is to boot from usb/cd and run fsck from there without the hd mounted.

As for why you see different output, have a look at the accepted answer to this question. Basically, using the -n option of fsck on mounted file systems produces unreliable results.

share|improve this answer
Thanks, but that's not really an option as this is a VPS. – Justin Jenkins Jul 12 '13 at 5:34

Your Answer


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.