Quoting Jape Person (jap...@comcast.net): > On 07/23/2015 12:59 PM, David Wright wrote: > >Quoting Ralph Katz (ralph.k...@rcn.com): > >>Yesterday I learned (from this list) that apparently Debian now defaults > >>to no periodic disk checks after file system installation. So I > >>manually added one yesterday. > >> > >>Yet when I rebooted after today's kernel update, no check was forced on > >>the up-to-date jessie system. > > > >>Am I missing something, > > > >Yes, you missed yesterday's posting: > > > >https://lists.debian.org/debian-user/2015/07/msg00977.html > > > >Cheers, > >David. > > > > > Thank you for responding to my post in the other thread, David. For > some reason I missed seeing it. So my lack of an acknowledgment was > not caused by rudeness, just incompetence or mail gone awry. > (Comcast occasionally decides to block one or two messages from this > list for no reason that either Comcast or I can fathom.) > > ;-) > > -- excerpting your response to me in that thread -- > > Like you in https://lists.debian.org/debian-user/2015/04/msg01423.html > I revisit this problem once in a while. > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=783410 > seems to have fallen on deaf ears, so in the meantime, here's a > solution: > > Reboot, > At grub's prompt type e to edit, > Add forcefsck to the end of the linux ... line, > Ctrl-X or F10 to boot. > > This will fsck (just this once) all the partitions that > shutdown -t1 -a -r -F now > would do in the traditional manner in wheezy and previously. > All that's missing is any progress indication because that bit > of code in /etc/init.d/checkroot.sh didn't get copied. > > --------------------end excerpt-------------------- > > Most of the systems on which I periodically force fsck are remote, > so I just use the tune2fs utility. I could, of course, add a line to > grub which contains forcefsck and use grub-reboot to get the same > effect on those remote systems. I'm just using tune2fs because it > doesn't involve my having to edit the grub configuration and then > having to update it.
A problem with tune2fs -c 1 is that you have to then remember to undo it. The edit method avoids this, but I have a different dislike with that: I need a @reboot cron job to look at /proc/cmdline and log the fsck. I'm used to logging when I set fsck in motion. So now I run this script; LOGFILE=/root/disk-checking.log printf '\n\n%s\n' "Rebooting the system and performing a full disk check." printf '\n%s\n\n' "Press ^C within 10 seconds to prevent this." sleep 10 date --rfc-3339=seconds >> "$LOGFILE" # The kernel line referred to by the argument below should have had # forcefsck added to it. # jessie grub-reboot 'fsck>fsck' # jessie reboot # jessie # shutdown -t1 -a -r -F now # wheezy In jessie's /boot/grub/grub.cfg there's a default menuentry first, and then what appears to be a duplicate menuentry as the first item in the submenu 'Advanced options ...'. I change the last string on this submenu line to 'fsck' and the last string on the next line (the menuentry) to 'fsck' as well. Then I add FSCK at the beginning of the first string on that line (displayed by grub) and add forcefsck to the linux ... line about a dozen lines later. (It was fsck.mode=force which of course doesn't work now.) submenu 'Advanced options for Debian jessie' $menuentry_id_option 'fsck' { menuentry 'FSCK Debian 3.16.0-4-686-pae' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'fsck' { ... ... linux /boot/vmlinuz-3.16.0-4-686-pae root=LABEL=john01 ro quiet systemd.show_status=true fbcon=scrollback:128K forcefsck > The last time I checked you still get a warning in the log if you > use "touch /forcefsck" to force an fsck. That warning tells the user > (or at least used to tell the user) to do something that did *not* > result in a file system check being forced. Has that changed? No, but I think that message was composed before fscking / was moved into the initramfs. I didn't mention above that I assume you have configured grub with: GRUB_DEFAULT=saved in /etc/default/grub and done this once: # grub-set-default 0 That's how /boot/grub/grubenv gets to convey the grub-reboot 'fsck>fsck' information across a reboot on a one-off basis. Cheers, David. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150723185241.GA12219@alum