[pve-devel] [PATCH installer] fix 2925: edit /etc/kernel/cmdline unconditionally

Stoiko Ivanov s.ivanov at proxmox.com
Wed Aug 12 20:12:27 CEST 2020


currently the installer prepares the ESP disks for ZFS, irrespective of the
boot-mode (EFI, legacy) - in order to enable users to change the boot-mode
in the BIOS and keep the system bootable.

This patch updates /etc/kernel/cmdline in both boot-modes, which is necessary
to make the system actually bootable (else the systemd-boot config uses
the cmdline from the installer).

Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
steps to reproduce the issue:
* install pve 6.2 with ZFS on root from iso on a seabios vm
* after install stop the VM and change the BIOS to OVMF
* start the vm

 proxinstall | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/proxinstall b/proxinstall
index 556c509..c011825 100755
--- a/proxinstall
+++ b/proxinstall
@@ -1737,9 +1737,7 @@ _EOD
 	    syscmd("sed -i -e 's/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"root=ZFS=$zfspoolname\\/ROOT\\/$zfsrootvolname boot=zfs\"/' $targetdir/etc/default/grub") == 0 ||
 		die "unable to update /etc/default/grub\n";
 
-	    if ($boot_type eq 'efi') {
-		write_config("root=ZFS=$zfspoolname/ROOT/$zfsrootvolname boot=zfs", "$targetdir/etc/kernel/cmdline");
-	    }
+	    write_config("root=ZFS=$zfspoolname/ROOT/$zfsrootvolname boot=zfs", "$targetdir/etc/kernel/cmdline");
 
 	}
 
-- 
2.20.1





More information about the pve-devel mailing list