proxmox-boot-tool & grub & EFI & BTRFS raid confuses me ...

fowr0yl

Member
Mar 15, 2022
47
8
13
63
Braunschweig
Hello,

since there was no answer in the german forum now in english ...

I am quite confused and hope for enlightenment.
The standard installation (7.3) with 2 SSDs in BTRFS-RAID1 creates 2 UEFI entries. It then looks something like this:
Code:
root@pve:~# efibootmgr -v
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0003,0004,0001,0002,0005
Boot0000* proxmox HD(2,GPT,95b06048-29ec-49db-878b-e22ec34a96b5,0x800,0x100000)/File(\EFI\PROXMOX\GRUBX64.EFI)
Boot0001* UEFI:CD/DVD Drive BBS(129,,0x0)
Boot0002* UEFI:Removable Device BBS(130,,0x0)
Boot0003* UEFI OS HD(2,GPT,6b065f4f-9093-4106-8189-69aecf505888,0x800,0x100000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
Boot0004* UEFI OS HD(2,GPT,95b06048-29ec-49db-878b-e22ec34a96b5,0x800,0x100000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
Boot0005* UEFI:Network Device BBS(131,,0x0)

As usual with a Raid Systems, identical structures and matching "UEFI OS" entries are created on both disks. But hte ESP partions are not part of the raid1 system, because the filesystem is fat.
But why only 1 "proxmox" entry is created in UEFI BIOS?
As a result, if the "appropriate" disk fails, there is no boot entry that could be used to boot GRUB.

During the installation, a "proxmox" entry was created for /dev/sdb2. So I simply created a second entry for /dev/sda2. Is this the right way?
Code:
efibootmgr -c -d /dev/sda -p 2 -L "Proxmox" -l "\EFI\PROXMOX\GRUBX64.EFI"

Elsewhere it is recommended to use the "proxmox-boot-tool" so that the ESP partitions are also kept in sync with BTRFS-Raid1. In fact, this leads to the installation of "systemd-boot". But I didn't want that, since doing so e.g. the bootable snapshots are not available at all.
The documentation also points out that it is actually only intended for ZFS-based systems....

Did I run the right commands at all to get the proxmox-boot-tool to work?
Code:
umount /boot/efi
proxmox-boot-tool init /dev/sda2
proxmox-boot-tool init /dev/sdb2
proxmox-boot-tool refresh

As a result I got 2 "systemd" boot entries. Here, however, I no longer find any "rootfs=degraded" entries that I had previously entered in /etc/defaults/grub. Where do I have to add that?
The Grub entry is preserved, but the version is not updated when upgrading from Proxmox 7.3 to 7.4. An update-grub doesn't help either. At least the new kernels are wired in grub.cfg.

The next question arises. How do you get rid of the whole "proxmox-boot-tool" stuff?

Wouldn't it be completely sufficient for a BTRFS-Raid1 to keep the two \EFI\PROXMOX\GRUBX64.EFI files up-to-date in addition to the 2nd UEFI boot menu entry? The Grub parameters are syncronized via Raid1 anyway.

e.g. by packing the partitions into an md-raid?
Code:
# install raid tools
apt get update
apt-get install mdadm

# save efi-data
mkdir /tmp/efibackup
rsync -avx /boot/efi/ /tmp/efibackup/
umount /boot/efi

# create md device
mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 --metadata=1.0 /dev/sda2 /dev/sdb2
mkfs.vfat /dev/md0

# change the /boot/efi entry in /etc/fstab with the new UUID
mount /boot/efi

#restore efi-data
rsync -avx /boot/efi/ /tmp/efibackup/

A additional hint:
in /etc/fstab the parm "nofail" should be addes to the entry /boot/efi. Doing so you can still boot your system in the event of a raid error.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!