On Wed, Feb 03, 2021 at 02:06:04PM -0600, David Wright wrote: > >From foo/main/init where foo is > $ unmkinitramfs /boot/initrd.img foo/
Interesting.... I used locate --regex to find where this is coming from, and it seems there's a copy in /usr/share/initramfs-tools/init which I'm guessing is what gets installed as init inside the initrd. /usr/share/initramfs-tools/init is from the initramfs-tools-core package which appears to come from Debian itself (according to the copyright file), having been forked from Ubuntu's version. A google search for "linux fsck.mode=force" led me indirectly to the systemd-fsck man page. This one tells me that fsck.mode= is an option supported by systemd-fsck with the values auto, force or skip. Debian's /usr/share/initramfs-tools/init script appears to be using a superset of these values, including your forcefsck alias. Putting these clues all together is tricky for me because nothing is really spelled out clearly. Near as I can manage to guess, Debian's initrd init script parses the kernel command line and looks for these fsck-ish options, applies them during the initrd stage, and then... then, I don't know what happens. There is still no clear end-user-comprehensible documentation that says how to make fsck happen on the next boot. > > What is the "normal mechanism"? Where is it documented? > > https://www.gnu.org/software/grub/manual/grub/grub.html (I told you guys how my email is being mangled....) > I'm guessing the comment is a signature. §15.2 outlines the grubenv > method. As Stefan mentioned, grubenv is designed to remain static, > and grub-editenv carefully alters its contents. Configuring Grub > uses /etc/grub.d/00_header and the variables in /etc/default/grub to > write the code at the top of /boot/grub/grub.cfg for juggling the > boot selection. > > You start all this off by editing /etc/default/grub: GRUB_DEFAULT=0 → > GRUB_DEFAULT=saved and running grub-set-default 0. Then: > > $ head -c 72 /boot/grub/grubenv ; echo > # GRUB Environment Block > saved_entry=0 > ################################# > $ > > # grub-reboot 'fsck>fsck' At this point I give up. I don't know where this "fsck>fsck" argument comes from or how you use it. It's definitely not in the grub-reboot man page.