From: mwberry Date: Sun, 31 May 2020 00:55:35 +0000 (-0700) Subject: UEFI Mode: only write kernel cmdline to UEFI binary X-Git-Tag: 051~111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fea53784adf3748a9f31964272a69b31c152d8cf;p=thirdparty%2Fdracut.git UEFI Mode: only write kernel cmdline to UEFI binary The kernel command line was being written both into /etc/cmdline.d/01-default.conf and the UEFI executable. During boot, getcmdline would concatenate these two resulting in all arguments being duplicated. Some args, such as ip=, are sensitive to the number of times they are specified. --- diff --git a/dracut.sh b/dracut.sh index 12f756707..c439fa022 100755 --- a/dracut.sh +++ b/dracut.sh @@ -1620,7 +1620,9 @@ if [[ $kernel_only != yes ]]; then (( ${#install_items[@]} > 0 )) && inst_multiple ${install_items[@]} (( ${#install_optional_items[@]} > 0 )) && inst_multiple -o ${install_optional_items[@]} - [[ $kernel_cmdline ]] && printf "%s\n" "$kernel_cmdline" >> "${initdir}/etc/cmdline.d/01-default.conf" + if [[ $kernel_cmdline ]] && [[ $uefi != yes ]]; then + printf "%s\n" "$kernel_cmdline" >> "${initdir}/etc/cmdline.d/01-default.conf" + fi for line in "${fstab_lines[@]}"; do line=($line)