Fwd: [gentoo-dev] New News Item: 2026-xx-yy-dracut-hostonly-cmdline
Dale <[email protected]> Wed, 6 May 2026 14:58:21 -0500
| Newsgroups | gmane.linux.gentoo.user |
|---|---|
| Message-ID | <[email protected]> |
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.