Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
18
rated 0 times [  18] [ 0]  / answers: 1 / hits: 54792  / 2 Years ago, thu, december 2, 2021, 11:47:36

When working remotely, I set a server to force an fsck at boot time with the command:


sudo touch /forcefsck

and rebooted.


After it restarted, I checked in /var/log/fsck for the results of the disk check.
Both checkfs and checkroot said:


Nothing has been logged yet

So where are the results saved?


More From » boot

 Answers
1

Possibly you are affected by this bug: "Does not log fsck invocations in /var/log/fsck/".


Doug's comment on the bug suggests the following workaround (the formatting has been adjusted to this platform):



12.04 Force FIlesystem Check:



  • Tell system to force filesystem checks on startup for all filesystems in /etc/fstab with indications to do filesystem checks:


    touch /forcefsck


  • Tell system to be more verbose at startup:


    sudo sed -i "s/VERBOSE=no/VERBOSE=yes/" /etc/default/rcS


  • Then, after reboot, examine /var/log/boot.log, the results of the filesystem check will be visible there.



  • If you also want the filesystem check to perform all repairs, make this change:


    sudo sed -i "s/FSCKFIX=no/FSCKFIX=yes/" /etc/default/rcS



14.04 Force FIlesystem Check:



  • Tell system to force filesystem checks on startup for all filesystems in /etc/fstab with indications to do filesystem checks:


    touch /forcefsck


  • Tell system to be more verbose at startup:


    sudo sed -i "s/#VERBOSE=no/VERBOSE=yes/" /etc/default/rcS


  • Then, after reboot, examine /var/log/upstart/mountall.log, the results of the filesystem check will be visible there.



  • If you also want the filesystem check to perform all repairs, make this change:


    sudo sed -i "s/#FSCKFIX=no/FSCKFIX=yes/" /etc/default/rcS




[#39859] Friday, December 3, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
homerurhyth

Total Points: 338
Total Questions: 113
Total Answers: 105

Location: Moldova
Member since Sat, Aug 6, 2022
2 Years ago
;