Re: Fwd: [gentoo-dev] New News Item: 2026-xx-yy-dracut-hostonly-cmdline
Michael <[email protected]> Thu, 07 May 2026 11:59:01 +0100
| Newsgroups | gmane.linux.gentoo.user |
|---|---|
| Message-ID | <14008215.uLZWGnKmhe@rogueboard> |
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
signature.asc
(application/pgp-signature, 870 B)
-----BEGIN PGP SIGNATURE----- iQJPBAABCAA5FiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmn8cHUbFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwyAAoJELHqqvbClWcZdXAP/iyjzpGLFN/0+xV1WVrh q8+VE2r9S6skODawXqfHlBwYdOjqZDw1zBu1d28reacj67M/0FkWNnLvqdA3m6ya Kx2M4Y7xLMtUPmmnvAVGOLEGRM+EAnn3WrPxUAR2aj3z2+SuRYJDxSEf4vU7wtQv DEiGgiNQ1kXlCqPkepXpesUfi75L8Jfi87oriuQRWpFYzzCdjN1gqf/mEkov5pyg mmvi9q6WI0OoL+RWk+OWRSBD70a4IEpsQwRyHU/AWS2zFXflZsFnYGG9hSrreWtc Bdr/8BYwht8DFV/jZ55hxdAyBaHgGk6toM3HQrxfqxY8zTYEhV6pOP4iVEKqVT+6 tbkpZmyC+LA+E4UCkjMg/GnC6seAgn7NGbL3bIJuKl/nuCqTis1uVUM8NpA5r6PG v8UXOXXoLTAZgUewW43qgwkRG+9+6igT8eB/Du1WYzHRKmGpEjc2QWg3mxV4xx2b d66fFjxKO+Ce+i7SMWPxjX05NgxJjA47BrWFviQHL5VFXOh9cSkRLJyRGMkMcCAb lbReEHD9OSo93t6FMhkOjeeNDnnYePq0B1PcwkdKhsad3VbP/q2fuGy/t9FczRqE ilI2E/HTQe55FgDuu4iBVv2TyNaggQDh5zpe7dmVMMar6yOATou7x1k78zKm4cTA pZaZDkDboujfxOKVa7tQeMcv =zX7Q -----END PGP SIGNATURE-----