EFI partition seems not synced on proxmox installed on btrfs raid 1

Fantu

Active Member
Jan 23, 2024
119
47
28
EDIT:
btrfs support in the installer is currently poor, see this post for some useful information:

--------------------------------------------------------------------------------------------------
Hi, I did a new installation of proxmox, using installer of latest version iso (proxmox-ve_8.2-2) and installed on btrfs raid 1.
During the first update of the system packages I noticed this at the end:
Code:
...
update-initramfs: Generating /boot/initrd.img-6.8.12-2-pve
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
No /etc/kernel/proxmox-boot-uuids found, skipping ESP sync.

FWIK proxmox boot tool should keep synced EFI partition when using zfs or btrfs raid, but it seems don't setted correctly by installer
Code:
proxmox-boot-tool status
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
E: /etc/kernel/proxmox-boot-uuids does not exist.

EFI partition are they actually out of sync in btrfs installations or is there something else I don't know about that syncs them?
Thanks for any reply and sorry for my bad english.

Code:
blkid
...
/dev/sdb2: UUID="FDF0-D05E" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="a61205d9-e8fd-4f08-90fc-23dfab1ff630"
/dev/sdb3: UUID="7f9d12f8-f057-49b6-8f8e-2838e1849e3f" UUID_SUB="1588d89e-5dda-4a9b-9a79-cedbc7628f8b" BLOCK_SIZE="4096" TYPE="btrfs" PARTUUID="9d25825c-a1f1-4d37-b3d3-ac6caa29eccb"
/dev/sda2: UUID="FDED-8EDA" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="abc32586-626e-4131-b365-c8307d4e5963"
/dev/sda3: UUID="7f9d12f8-f057-49b6-8f8e-2838e1849e3f" UUID_SUB="dc897ce8-507b-403f-a00b-7c6c13b4c2dd" BLOCK_SIZE="4096" TYPE="btrfs" PARTUUID="9d7134f1-5214-4d6c-b9e0-f5eaf6ea42c6"

Code:
btrfs fi show /
Label: none  uuid: 7f9d12f8-f057-49b6-8f8e-2838e1849e3f
        Total devices 2 FS bytes used 3.85GiB
        devid    1 size 419.00GiB used 7.01GiB path /dev/sda3
        devid    2 size 419.00GiB used 7.01GiB path /dev/sdb3


Code:
mount
...

/dev/sda3 on / type btrfs (rw,relatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/)
/dev/sda2 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
 
Last edited:
I tried another search, but I didn't find certain information if the installer does not automatically set to synchronize the EFI partitions of the system raids it creates.
I found some topic on zfs raid disk replacement where proxmox-boot-tool should be used on the new disk.
For execute on btrfs raid1 of clean install I should do on both disks EFI partition or only the second one not mounted (/dev/sdb2)?
man of proxmox-boot-tool is missed and --help only list arguments without details, based on https://pve.proxmox.com/wiki/Host_Bootloader the procedure seems this:
Code:
proxmox-boot-tool format /dev/sdb2
proxmox-boot-tool init /dev/sdb2 grub
but still not sure if I should do this or not and only to second disk or both.

Thanks for any reply
 
Today I tried a test installation with raid1 zfs and /boot/efi is keeped not mounted but with proxmox-boot-tool the 2 EFI partition result (so should sync them when needed):
Code:
proxmox-boot-tool status
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
System currently booted with uefi
E69A-A3E9 is configured with: grub (versions: 6.8.4-2-pve)
E69B-92C9 is configured with: grub (versions: 6.8.4-2-pve)

Why installer don't do the same with btrfs, do something different or is simply missed to implement this part (related to btrfs) in the installer?
 
I saw that this was already reported in https://bugzilla.proxmox.com/show_bug.cgi?id=5433

I did some tests:
Actually even if not synced with btrfs raid on installation create ESP partition on all disks and is working, have minimal grub that point to the root one, so not all kernels inside that can risk full ESP partition.
To make bootable on raid degraded need to be applied this workaround:
In /etc/ftab add nofail option to efi mount point to make possible boot with that disk missed, for example:
Code:
UUID=4E18-9780 /boot/efi vfat defaults,nofail 0 1
When raid is degraded to be able to boot easy and fast: from grub menu press "e" to edit, replace "quiet" with "rootflag=degraded" and press F10 or ctrl+x for boot.

Anyway, without sync I suppose can have issue with other ESP partition in the rare cases of grub update (not tested) and will need manual sync of other ESP partition for that case.

--------------------------

I tested also sync with proxmox-boot-tool instead, here is an example on one ESP partition:
Code:
proxmox-boot-tool format /dev/sdb2 --force
proxmox-boot-tool init /dev/sdb2 grub
works creating the same of zfs with full grub and all kernel
Tried also to remove a disk also in that case and boot from other disks works.

--------------------------

I hope documentation will be improved to mitigate the shortcomings of the current installer and that the installer will be improved in the future (it is one of the parts needed for a good btrfs support)
 
Last edited:
  • Like
Reactions: leesteken
I'm trying to ask for opinions on what I mentioned here: https://bugzilla.proxmox.com/show_bug.cgi?id=5433#c5

Do you think it is better to have the entire /boot in ESP as zfs, but risking errors for full space on updates (when you have some kernels, I saw many topics of people with this problem) or leave minimal, implementing in proxmox-boot-tool a synchronization that does not copy the entire /boot in ESP but only the essential left /boot in the root.

Which do you think is better?
Can you think of disadvantages for the second option?
 
Last edited: