From fea53784adf3748a9f31964272a69b31c152d8cf Mon Sep 17 00:00:00 2001 From: mwberry Date: Sat, 30 May 2020 17:55:35 -0700 Subject: [PATCH] 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. --- dracut.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dracut.sh b/dracut.sh index 12f75670..c439fa02 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)