site  contact  subhomenews

Shutdown menu now has reboot with filesystem check

July 26, 2020 — BarryK

There was some discussion on the forum how to add the kernel boot parameter "qfix=fsck", so that a filesystem check of the working-partition will be done at bootup. It is a menu entry in the rEFInd and Syslinux config files in the USB-stick image, but in an installation it might not be there, so some messing around is required to stick that "qfix=fsck" in.

I have added another entry to the Shutdown menu, "Reboot, with filesystem check". Choosing this entry in the menu, will call /usr/bin/wmreboot, passing parameter "fscheck". wmreboot creates /.fsckme.flg, which is read by the 'init' script at bootup, and a filesystem check performed.

Actually, /.fsckme.flg is created at bootup in /etc/rc.d/rc.sysinit, but gets deleted by /etc/rc.d/rc.shutdown at normal shutdown. However, if there is an abnormal shutdown, such as a power failure, /.fsckme.flg will exist at bootup, and a filesystem check performed.

The /.fsckme.flg created by wmreboot does not get deleted by rc.shutdown.

This is a simple way of performing a filesystem check any time that you want, don't need an entry in the boot manager menu config file. 

Tags: easy