How do you deal with unmounted /boot/efi during backups?

Pickwick

Member
Aug 6, 2024
13
2
8
Hi everyone,

I have some pretty basic PVE host for doing some tests with Docker, VMs, using it as backup storage, because it simply has enough room for HDDs etc. It's more like a fun project. My backup approach is pretty basic: ZFS snapshots and RSYNC onto HDDs, implemented in a custom Bash script. When settings things up, I learned that /boo/efi is not mounted by default and therefore currently is not part of my backup. I know why things are the way they are, but am thinking about how to deal with that...

https://pve.proxmox.com/pve-docs/chapter-sysadmin.html#sysboot_proxmox_boot_tool

How are you dealing with it? Do you simply don't care because the data in that partition can easily be re-generated? Are you mounting on-demand for backup purposes somewhere? Do you simply ignore the argument about possibly breaking the filesystem and mount by default on your own? Any totally different approaches I don't have in mind currently?

While I do have a bash script which could simply do whatever I like, I would prefer NOT adding to much custom code to it. Instead, I like the idea of having some of the VFAT partitions always mounted as a read-only view, e.g. as /boot/efi_for_bak or similar. From my understanding, the proxmox-boot-tool even doesn't mount into /boot/efi at all when doing it's stuff? It tells something about private mount namespaces already. Does that help me in any way? :)

Code:
root@srv01:~# proxmox-boot-tool status
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
System currently booted with uefi
876A-3125 is configured with: uefi (versions: 6.17.13-21-pve, 7.0.14-12-pve, 7.0.14-14-pve)
8796-002D is configured with: uefi (versions: 6.17.13-21-pve, 7.0.14-12-pve, 7.0.14-14-pve)

Code:
Configuring systemd-boot..
Unmounting '/dev/disk/by-uuid/876A-3125'.
Adding '/dev/disk/by-uuid/876A-3125' to list of synced ESPs..
UUID="8796-002D" SIZE="1073741824" FSTYPE="vfat" PARTTYPE="c12a7328-f81f-11d2-ba4b-00a0c93ec93b" PKNAME="nvme0n1" MOUNTPOINT=""
Mounting '/dev/disk/by-uuid/8796-002D' on '/var/tmp/espmounts/8796-002D'.
Installing systemd-boot..
Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi" to "/var/tmp/espmounts/8796-002D/EFI/systemd/systemd-bootx64.efi".
Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi" to "/var/tmp/espmounts/8796-002D/EFI/BOOT/BOOTX64.EFI".
Random seed file /var/tmp/espmounts/8796-002D/loader/random-seed successfully refreshed (32 bytes).
Created EFI boot entry "Linux Boot Manager".
Configuring systemd-boot..
Unmounting '/dev/disk/by-uuid/8796-002D'.
Adding '/dev/disk/by-uuid/8796-002D' to list of synced ESPs..
 
Last edited: