Closed mwberry closed 4 years ago
$ pacman -Qi dracut
Name : dracut
Version : 050-1
Seems to still be present on master:
Writing to 01-default
: https://github.com/dracutdevs/dracut/blob/dfe2247a43d6a216d9af533825c9a103e3b056cd/dracut.sh#L1612-L1616
Call to objcopy
: https://github.com/dracutdevs/dracut/blob/dfe2247a43d6a216d9af533825c9a103e3b056cd/dracut.sh#L2052-L2054
I'm using
dracut
to generate a UEFI executable for use as a netboot target. When machines run this executable, they report that "Sorry, 'ip=dhcp' does not make sense for multiple interface configurations". I found this confusing because they are single NIC machines and I believed there was only a single "ip=dhcp" on the kernel command line.I instrumented a few dracut modules and found that
getcmdline
gathers one copy of the kernel command line from/proc/cmdline
and a second copy from/etc/cmdline.d/01-default.conf
, resulting in all command line arguments being duplicated. For most arguments this will not matter, butip=
is sensitive to the number of times it is specified.My
dracut
configuration file is:I invoke
dracut
like:This appears to happen because the kernel command line sourced from the config (or read from the command line) is both written into
01-default.conf
in the initramfs and written into the UEFI executable.From
/usr/bin/dracut
:A minor patch that only writes
01-default.conf
when$uefi != yes
addresses the issue.As a tangentially related question: why is
--uefi
only a command line option but not a configuration file option, while all other UEFI options are both?