[pve-devel] applied: [PATCH installer] use pve-efiboot-tool for systemd boot ESP preparation

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Jul 10 23:36:15 CEST 2019


Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 debian/control | 12 ++++++++++--
 proxinstall    | 20 ++------------------
 2 files changed, 12 insertions(+), 20 deletions(-)

diff --git a/debian/control b/debian/control
index 0bb7caa..97bf20b 100644
--- a/debian/control
+++ b/debian/control
@@ -12,12 +12,20 @@ Homepage: https://www.proxmox.com
 
 Package: pve-installer
 Architecture: all
-Depends: geoip-bin, libgtk3-webkit2-perl, squashfs-tools, ${perl:Depends}
+Depends: geoip-bin,
+         libgtk3-webkit2-perl,
+         pve-kernel-helper,
+         squashfs-tools,
+         ${perl:Depends},
 Description: Proxmox VE Installer
  This package contains the graphical installer for Proxmox VE.
 
 Package: pmg-installer
 Architecture: all
-Depends: geoip-bin, libgtk3-webkit2-perl, squashfs-tools, ${perl:Depends}
+Depends: geoip-bin,
+         libgtk3-webkit2-perl,
+         pve-kernel-helper,
+         squashfs-tools,
+         ${perl:Depends},
 Description: Proxmox Mail Gateway Installer
  This package contains the graphical installer for Proxmox Mail Gateway.
diff --git a/proxinstall b/proxinstall
index aff6c4c..b06da13 100755
--- a/proxinstall
+++ b/proxinstall
@@ -1154,24 +1154,8 @@ sub compute_swapsize {
 sub prepare_systemd_boot_esp {
     my ($espdev, $targetdir) = @_;
 
-    my $espuuid = find_dev_by_uuid($espdev);
-    my $espmp = "var/tmp/$espuuid";
-    mkdir "$targetdir/$espmp";
-
-    syscmd("mount -n $espdev -t vfat $targetdir/$espmp") == 0 ||
-	die "unable to mount ESP $espdev\n";
-
-    File::Path::make_path("$targetdir/$espmp/EFI/proxmox") ||
-	die "unable to create directory $targetdir/$espmp/EFI/proxmox\n";
-
-    syscmd("chroot $targetdir bootctl --path /$espmp install") == 0 ||
-	die "unable to install systemd-boot loader\n";
-    write_config("timeout 3\ndefault proxmox-*\n",
-	"$targetdir/$espmp/loader/loader.conf");
-
-    syscmd("umount $targetdir/$espmp") == 0 ||
-	die "unable to umount ESP $targetdir/$espmp\n";
-
+    syscmd("chroot $targetdir pve-efiboot-tool init $espdev") == 0 ||
+	die "unable to init ESP and install systemd-boot loader on '$espdev'\n";
 }
 
 sub prepare_grub_efi_boot_esp {
-- 
2.20.1





More information about the pve-devel mailing list