]> git.proxmox.com Git - pve-kernel-meta.git/commit
proxmox-boot-tool: handle legacy boot zfs installs
authorStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 23 Apr 2021 09:04:47 +0000 (11:04 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 23 Apr 2021 11:28:56 +0000 (13:28 +0200)
commit593001de1b722a6bdf2d97532248f309c56d8c0a
treef31e3f8d4247c02190442637e625e605691b5001
parent8c0a22adfe15dc00cf2194647bb254201d8d187b
proxmox-boot-tool: handle legacy boot zfs installs

This patch adds support for booting non-uefi/legacy/bios-boot ZFS
installs, by using proxmox-boot-tool to copy the kernels to the ESP
and then generate a fitting grub config for booting from the vfat ESP:

* grub is installed onto the ESP and the MBR points to the ESP
* after copying/deleting the kernels proxmox-boot-tool bindmounts the
  ESP on /boot (inside the new mount namespace)
* grub-update then manages to generate a fitting config.

Some paths/sanity-checks needed adaptation (to differentiate between
EFI boot and not (based on the existence of /sys/firmware/efi)

The arguments for grub-install are taken from the pve-installer.

The approach is inspired by @avw in our community-forum [0].

[0] https://forum.proxmox.com/threads/zfs-error-no-such-device-error-unknown-filesystem-entering-rescue-mode.75122/post-374799

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
bin/proxmox-boot-tool
proxmox-boot/zz-proxmox-boot