From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer v2 1/1] always boot zfs with proxmox-boot-tool
Date: Fri, 23 Apr 2021 11:04:51 +0200 [thread overview]
Message-ID: <20210423090451.2279-10-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20210423090451.2279-1-s.ivanov@proxmox.com>
proxmox-boot-tool now supports configuring grub to boot from the ESPs
the installer creates on all (bootable) disks - use this approach
for zfs installs.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
v1->v2:
* unchanged
proxinstall | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/proxinstall b/proxinstall
index e1795fa..94d5d8d 100755
--- a/proxinstall
+++ b/proxinstall
@@ -1224,11 +1224,11 @@ my sub chroot_chmod {
die "chroot: unable to change permission mode for '$path'\n";
}
-sub prepare_systemd_boot_esp {
+sub prepare_proxmox_boot_esp {
my ($espdev, $targetdir) = @_;
- syscmd("chroot $targetdir pve-efiboot-tool init $espdev") == 0 ||
- die "unable to init ESP and install systemd-boot loader on '$espdev'\n";
+ syscmd("chroot $targetdir proxmox-boot-tool init $espdev") == 0 ||
+ die "unable to init ESP and install proxmox-boot loader on '$espdev'\n";
}
sub prepare_grub_efi_boot_esp {
@@ -1821,19 +1821,19 @@ _EOD
foreach my $di (@$bootdevinfo) {
my $dev = $di->{devname};
- if (!$native_4k_disk_bootable) {
- eval {
- syscmd("chroot $targetdir /usr/sbin/grub-install --target i386-pc --no-floppy --bootloader-id='proxmox' $dev") == 0 ||
- die "unable to install the i386-pc boot loader on '$dev'\n";
- };
- push @$bootloader_err_list, $@ if $@;
- }
+ if ($use_zfs) {
+ prepare_proxmox_boot_esp($di->{esp}, $targetdir);
+ } else {
+ if (!$native_4k_disk_bootable) {
+ eval {
+ syscmd("chroot $targetdir /usr/sbin/grub-install --target i386-pc --no-floppy --bootloader-id='proxmox' $dev") == 0 ||
+ die "unable to install the i386-pc boot loader on '$dev'\n";
+ };
+ push @$bootloader_err_list, $@ if $@;
+ }
eval {
if (my $esp = $di->{esp}) {
- if ($use_zfs) {
- prepare_systemd_boot_esp($esp, $targetdir);
- } else {
prepare_grub_efi_boot_esp($dev, $esp, $targetdir);
}
}
--
2.20.1
next prev parent reply other threads:[~2021-04-23 9:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 9:04 [pve-devel] [PATCH pve-kernel-meta/pve-installer v2] boot ZFS on legacy BIOS systems from vfat Stoiko Ivanov
2021-04-23 9:04 ` [pve-devel] [PATCH pve-kernel-meta v2 1/8] proxmox-boot-tool: rename from pve-efiboot-tool Stoiko Ivanov
2021-04-23 9:04 ` [pve-devel] [PATCH pve-kernel-meta v2 2/8] proxmox-boot-tool: add status command Stoiko Ivanov
2021-04-23 9:04 ` [pve-devel] [PATCH pve-kernel-meta v2 3/8] proxmox-boot-tool: sort and remove duplicates on clean Stoiko Ivanov
2021-04-23 9:04 ` [pve-devel] [PATCH pve-kernel-meta v2 4/8] proxmox-boot: rename uuid list file Stoiko Ivanov
2021-04-23 9:04 ` [pve-devel] [PATCH pve-kernel-meta v2 5/8] proxmox-boot-tool: handle legacy boot zfs installs Stoiko Ivanov
2021-04-23 9:04 ` [pve-devel] [PATCH pve-kernel-meta v2 6/8] proxmox-boot: add grub.cfg header snippet Stoiko Ivanov
2021-04-23 9:04 ` [pve-devel] [PATCH pve-kernel-meta v2 7/8] proxmox-boot: add grub-install wrapper Stoiko Ivanov
2021-04-23 9:04 ` [pve-devel] [PATCH pve-kernel-meta v2 8/8] proxmox-boot: run p-b-t refresh on update-grub Stoiko Ivanov
2021-04-23 9:04 ` Stoiko Ivanov [this message]
2021-04-23 11:30 ` [pve-devel] applied: [PATCH pve-kernel-meta/pve-installer v2] boot ZFS on legacy BIOS systems from vfat Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210423090451.2279-10-s.ivanov@proxmox.com \
--to=s.ivanov@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox