Re: Fwd: [gentoo-dev] New News Item: 2026-xx-yy-dracut-hostonly-cmdline

"D. Ben Knoble" <[email protected]> Thu, 7 May 2026 08:26:29 -0400
Newsgroups gmane.linux.gentoo.user
Message-ID <CALnO6CBCj=_428D4JUwNH2OErgOFmvJDnHJayqxu9qe3T+V2KA@mail.gmail.com>
On Wed, May 6, 2026 at 3:58 PM Dale <[email protected]> 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.
[snip]
>
> 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.

Thanks for the advance notice. A few funny bits:

- my install notes don't say anything about doing anything special for
dracut + grub. I enabled the use flags on installkernel and then
emerge'd it, and I have no /etc/dracut.conf.d to speak of.
- lsinitrd on all of the recent initramfs I have for this system shows
_nothing_ on the dracut cmdline (or in etc/cmdline.d of the image). It
_does_ show an "Arguments" line with, e.g., --kernel-image
'/usr/src/linux-6.18.26-gentoo-dist/arch/x86/boot/bzImage' --force
--verbose --no-uefi
- /etc/default/grub has one change I made a long time ago
(reboot=acpi); not required for boot, though, and not "present in
dracut but missing in grub"
- /proc/cmdline has "BOOT_IMAGE=… root=… ro reboot=acpi", and I
couldn't figure out where it was coming from until I realized that the
default /etc/grub.d/10_linux spits that out into the menu entries
(which I can see in /boot/grub/grub.cfg).

So, it _seems_ a vanilla setup is just fine? When I do the upgrade to
dracut-111, I'll check again before rebooting, though.

-- 
D. Ben Knoble