Linux – Forcing a verbose fsck on reboot (Ubuntu)

fsckhard drivelinuxrackspaceUbuntu

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 ?

Update: This is a remote server …

Best Answer

The /forcefsck file's contents isn't examined anywhere only the presence in the script /etc/init/mountall.conf and itf this file is present then the --force-fsck option is added to the mountall program. It's man is a bit short but if you run mountall --help then it shows that it has a --verbose option. You can change the /etc/init/mountall.conf file to run the mountall with --verbose option maybe it will show you more. Not sure, I haven't tried it myself.

But the best if you just boot the system from a LiveCD and repair your filesystem from there.