Re: Fwd: [gentoo-dev] New News Item: 2026-xx-yy-dracut-hostonly-cmdline
Dale <[email protected]> Thu, 7 May 2026 12:36:16 -0500
| Newsgroups | gmane.linux.gentoo.user |
|---|---|
| Message-ID | <[email protected]> |
On 5/7/26 5:59 AM, Michael wrote: > On Wednesday, 6 May 2026 20:58:21 British Summer Time Dale wrote: >> On Sat, 2 May 2026 at 13:59, Nowa Ammerlaan <[email protected]> wrote: >>> Title: Dracut changed default for hostonly_cmdline setting >>> Author: Nowa Ammerlaan <[email protected]> >>> Posted: 2026-xx-yy >>> Revision: 1 >>> News-Item-Format: 2.0 >>> Display-If-Installed: >=sys-kernel/dracut-111 >>> >>> Dracut is an initramfs generation tool. It may be invoked via the >>> installkernel mechanism or manually after building custom kernels. >>> >>> What changed? >>> ==================== >>> >>> In version 111 of sys-kernel/dracut the default for the >>> hostonly_cmdline setting changed from enabled to disabled. When >>> enabled, this setting causes Dracut to attempt to detect which >>> parameters are required on the kernel command line to boot the >>> system. Examples are the root= parameter or parameters controlling >>> partition decryption. These parameters are then included in the >>> generated initramfs and appended to the kernel command line during >>> boot. >>> >>> Why has this setting been changed >>> ==================== >>> >>> When enabled, Dracut's hostonly_cmdline setting may use the kernel >>> command line of the running kernel (/proc/cmdline) to construct the >>> kernel command line that will be embedded in the initramfs. This can >>> cause problems when Dracut is being executed from a live or rescue >>> environment. In such cases an incorrect root= could be included in >>> the embedded kernel command line which could lead to boot failure. >>> >>> To prevent this behaviour from causing such unpleasant surprises, a >>> check was added to sys-kernel/installkernel to detect whether the >>> kernel was being installed from chroot and if Dracut was configured >>> to include an embedded kernel command line (hostonly_cmdline=yes). >>> While this check prevents boot failures, it also has the unfortunate >>> side effect of creating a hard error that is triggered by default on >>> new Gentoo installs. This has proven to be a significant stumbling >>> block that new users often trip over. For this reason it was decided >>> to disable the hostonly_cmdline setting in Gentoo's default settings >>> for Dracut. >>> >>> <<<SNIP>>> >>> User Action Required (GRUB) >>> ==================== >>> >>> Users booting with GRUB should compare the GRUB_CMDLINE_LINUX and >>> GRUB_CMDLINE_LINUX_DEFAULT settings in /etc/default/grub against the >>> kernel command line embedded in the initramfs or >>> Unified Kernel Image (UKI). The lsinitrd utility provided by >>> sys-kernel/dracut can be used for this purpose. For example, in the >>> case of a plain initramfs: >>> >>> lsinitrd /boot/initramfs-x.y.z-gentoo-dist.img >>> >>> Or, in the case of an Unified Kernel Image: >>> lsinitrd /boot/vmlinuz-x.y.z-gentoo-dist.efi >>> >>> The final lines of the output of these commands show which kernel >>> parameters are embedded in the Dracut initramfs. For example: >>> >>> dracut cmdline: >>> ro >>> >>> If kernel parameters that are essential for successfully booting >>> the system (such as root=) are present in the "dracut cmdline" >>> section but not in /etc/default/grub then user intervention is >>> required. In that case please adjust the GRUB_CMDLINE_LINUX or >>> GRUB_CMDLINE_LINUX_DEFAULT settings in /etc/default/grub to include >>> the missing kernel parameters. After adjustments don't forget to >>> update the grub.cfg. For example: >>> >>> grub-mkconfig -o /boot/grub/grub.cfg >>> >>> Note that when Secure Boot is enabled the grub.cfg might reside in a >>> different directory, for example: /efi/EFI/Gentoo/grub.cfg. >> Howdy, >> >> I get that they making a change because when booting from a CD/USB >> stick/whatever, it detects the wrong thing and applies the wrong >> setting. Sounds like a good idea to change that since this likely >> happens a lot. However, I get lost on the settings for >> GRUB_CMDLINE_LINUX* of which there are two. One with a DEFAULT on the >> end as well. This is my current setting. >> >> >> >> root@Gentoo-1 / # cat /etc/default/grub | grep GRUB_CMDLINE_LINUX >> GRUB_CMDLINE_LINUX="video=efifb:on nvidia_drm.modeset=1 >> nvidia-drm.fbdev=1 ibt=off" >> #GRUB_CMDLINE_LINUX_DEFAULT="" >> root@Gentoo-1 / # >> >> >> >> I've never needed to enable the DEFAULT one so it is commented out. >> Should I uncomment that line? Should I put in that it is the same as >> the other setting? Leave it as is? >> >> Also, for the dracut cmdline command, I get this. >> >> >> >> root@Gentoo-1 / # dracut cmdline >> dracut[E]: i18n_vars not set! Please set up i18n_vars in >> configuration file. >> root@Gentoo-1 / # >> >> >> If I read the news item corrent, that isn't right. It should spit out >> something like this: video=efifb:on nvidia_drm.modeset=1 >> nvidia-drm.fbdev=1 ibt=off or just ro like in the news item. Am I >> understanding this right? Am I wrong on this? No idea on the i18n >> thingy. o_O >> >> Thanks. >> >> Dale >> >> :-) :-) >> >> P. S. Heads up users. This change is coming and if you use Grub, you >> better check yours. It says it could cause your system not to boot. >> I tend to run default settings here and I bet a LOT of others do as >> well. > According to GRUB manual[1] the GRUB_CMDLINE_LINUX should contain the > common options you want your normal kernel to boot with. The > GRUB_CMDLINE_LINUX_DEFAULT includes additional options for your recovery > kernel. These will be appended by GRUB at the end of the normal > GRUB_CMDLINE_LINUX list of options. > > https://www.gnu.org/software/grub/manual/grub/grub.html I notice since my post that the news item was rewritten with some changes to clarify some things. I'm going to give it a good reading shortly as they still working on it. I just want to make sure that when I reboot, it boots. :-D I'm assuming also that the old init thingys will work fine. It's just that the default options to build them has changed and new ones will be affected. So any new ones I make need to be checked and compared to old ones. Oh, I get this with another command. root@Gentoo-1 / # lsinitrd /boot/initramfs-6.18.19-1.img <<<SNIP>>> dracut cmdline: root=UUID=26e58ee4-9c8f-4efd-bbb3-215df71cf85e rootfstype=ext4 rootflags=rw,noatime root@Gentoo-1 / # I notice that does not include the nvidia and video options that are in my config file. Isn't that supposed to be there? It's in my current /proc/cmdline. This may be a good time to update my kernel and test things tho. May even clean out the old kernels that no longer give me a console too. There is that. Dale :-) :-)