From 03c686b77e81c4d199ca65509ff25f44d6e7f545 Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Mon, 1 Jul 2019 22:16:22 +0200 Subject: [PATCH] update systemd-boot config after initializing esps run the kernel-postinst hook once (like we do for update-grub) instead of once per ESP. This fixes an error (the hook does not write entries for mounted partitions), and save quite a bit of (un)mounting and copying in case of multiple ESPs Signed-off-by: Stoiko Ivanov --- proxinstall | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/proxinstall b/proxinstall index 0cd8b5f..8c424dc 100755 --- a/proxinstall +++ b/proxinstall @@ -1094,8 +1094,6 @@ sub prepare_systemd_boot_esp { die "unable to install systemd-boot loader\n"; write_config("timeout 3\ndefault proxmox-*\n", "$targetdir/$espmp/loader/loader.conf"); - syscmd("chroot $targetdir /etc/kernel/postinst.d/zz-pve-efiboot") == 0 || - die "unable to generate systemd-boot config\n"; syscmd("umount $targetdir/$espmp") == 0 || die "unable to umount ESP $targetdir/$espmp\n"; @@ -1658,6 +1656,9 @@ _EOD syscmd("chroot $targetdir /usr/sbin/update-grub") == 0 || die "unable to update boot loader config\n"; + syscmd("chroot $targetdir /etc/kernel/postinst.d/zz-pve-efiboot") == 0 || + die "unable to generate systemd-boot config\n"; + syscmd("umount $targetdir/dev"); } -- 2.39.5