[pve-devel] [RFC pve-kernel-meta 0/2] boot ZFS on legacy BIOS systems from vfat

Stoiko Ivanov s.ivanov at proxmox.com
Tue Apr 20 20:25:38 CEST 2021


This patchset has been long overdue, and complements the solution to booting
ZFS on UEFI systems using systemd-boot.

With the upgrade of ZFS 2.0.0 (and it's support for ZSTD compression), quite
a few users found out that their systems were still booted with legacy bios
boot and were consequently rendered unbootable with enabling zstd
compression on (a dataset on rpool).

The solution is inspired by our community-forum, especially @avw, and seems
rather lightweight (patch 2/2 is best viewed with '-w').
My first approach was to generate a working grub-config ourselves, but
given that grub has a few years of handling special cases - bind-mounting
the ESP on /boot and running 'update-grub' seems like a less painful way.

* patch 1/2 renames pve-efiboot-tool to proxmox-boot-tool (which seems more
appropriate by now)
* patch 2/2 adds support for installing grub appropriately on the ESPs
  and running the kernel sync-logic in a way that update-grub feels fine
  with

Sending as RFC, because this is a proof-of-concept and missing quite a few
things.

What works:
* installing this version on a root ZFS RAID-Z@ PVE (based on an old pre 6.2
  install)
* reformatting all 4 ESPs `proxmox-boot-tool format /dev/sda2 --force)
* initializing them
* rebooting into 5.4.106 and zfs 2.0.0
* upgrading the pool, setting compression=zstd, writing a file, rebooting
  (successfully)
* rebooting into an old 5.3 kernel - and getting greeted by busy-box instead
  of grub-rescue

What's missing (at least):
* support in the installer
* the renaming is not quite through (the kernel-hooks are still containing
  pve/efi in their name)
* testing the removal part of the kernel-sync


Stoiko Ivanov (2):
  proxmox-boot-tool: rename from pve-efiboot-tool
  proxmox-boot-tool: handle legacy boot zfs installs

 Makefile                                    |  2 +-
 bin/Makefile                                |  2 +-
 bin/{pve-efiboot-tool => proxmox-boot-tool} | 21 ++++--
 debian/pve-kernel-helper.install            |  2 +-
 debian/pve-kernel-helper.links              |  1 +
 {efiboot => proxmox-boot}/Makefile          |  0
 {efiboot => proxmox-boot}/functions         |  0
 {efiboot => proxmox-boot}/pve-auto-removal  |  0
 {efiboot => proxmox-boot}/pve-efiboot-sync  |  2 +-
 {efiboot => proxmox-boot}/zz-pve-efiboot    | 81 +++++++++++++++------
 10 files changed, 75 insertions(+), 36 deletions(-)
 rename bin/{pve-efiboot-tool => proxmox-boot-tool} (94%)
 create mode 100644 debian/pve-kernel-helper.links
 rename {efiboot => proxmox-boot}/Makefile (100%)
 rename {efiboot => proxmox-boot}/functions (100%)
 rename {efiboot => proxmox-boot}/pve-auto-removal (100%)
 rename {efiboot => proxmox-boot}/pve-efiboot-sync (84%)
 rename {efiboot => proxmox-boot}/zz-pve-efiboot (69%)

-- 
2.20.1





More information about the pve-devel mailing list