* [pve-devel] [PATCH kernel-helper] proxmox-boot: unconditionally mask systemd-gpt-auto-generator
@ 2025-08-14 12:40 Stoiko Ivanov
2025-08-14 15:19 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Stoiko Ivanov @ 2025-08-14 12:40 UTC (permalink / raw)
To: pve-devel
The efi.mount and efi.automount units created by this generator if:
* the ESP has the partition-type-uuid set to the ESP one
* the system uses a boot-loader that sets the LoaderUUID efivar
(systemd-boot and grub without secure-boot enabled)
* does not have the ESP mounted by default
cause the ESP to be mounted at /efi, which in turn
cause issues when systemd-boot (metapackage) is installed/updated - as
it autoinstalls itself at /efi, but does not create the loader-entries
for the kernel, since we disabled
/etc/kernel/postinst.d/zz-systemd-boot
Simply mask the generator, as its functionality is not needed on any
regular Proxmox system.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
Tested on a VM where I reproduced the setup above. This is also why I used
the all-caps: MASKING in the output - as it's easy to overlook in the
large number of lines that are printed.
src/proxmox-boot/zz-proxmox-boot | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/proxmox-boot/zz-proxmox-boot b/src/proxmox-boot/zz-proxmox-boot
index ad6620a..7847777 100755
--- a/src/proxmox-boot/zz-proxmox-boot
+++ b/src/proxmox-boot/zz-proxmox-boot
@@ -271,6 +271,18 @@ check_grub_efi_removable_status() {
echo ""
}
+mask_sd_gpt_generator() {
+ generator="systemd-gpt-auto-generator"
+ mask_dir="/etc/systemd/system-generators"
+ # already masked (or re-enabled manually) - nothing to do:
+ if [ -e "$mask_dir/$generator" ]; then
+ return
+ fi
+ warn "$generator causes problems in certain configurations - MASKING it!"
+ mkdir -p "$mask_dir"
+ ln -s /dev/null "$mask_dir/$generator"
+}
+
set -- $DEB_MAINT_PARAMS
mode="${1#\'}"
mode="${mode%\'}"
@@ -286,6 +298,7 @@ case $0:$mode in
disable_systemd_boot_hook
check_grub_efi_package
check_grub_efi_removable_status
+ mask_sd_gpt_generator
;;
*/postrm.d/*:|*/postrm.d/*:remove)
reexec_in_mountns "$@"
@@ -295,6 +308,7 @@ case $0:$mode in
disable_systemd_boot_hook
check_grub_efi_package
check_grub_efi_removable_status
+ mask_sd_gpt_generator
;;
esac
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH kernel-helper] proxmox-boot: unconditionally mask systemd-gpt-auto-generator
2025-08-14 12:40 [pve-devel] [PATCH kernel-helper] proxmox-boot: unconditionally mask systemd-gpt-auto-generator Stoiko Ivanov
@ 2025-08-14 15:19 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-08-14 15:19 UTC (permalink / raw)
To: pve-devel, Stoiko Ivanov
On Thu, 14 Aug 2025 14:40:59 +0200, Stoiko Ivanov wrote:
> The efi.mount and efi.automount units created by this generator if:
> * the ESP has the partition-type-uuid set to the ESP one
> * the system uses a boot-loader that sets the LoaderUUID efivar
> (systemd-boot and grub without secure-boot enabled)
> * does not have the ESP mounted by default
> cause the ESP to be mounted at /efi, which in turn
> cause issues when systemd-boot (metapackage) is installed/updated - as
> it autoinstalls itself at /efi, but does not create the loader-entries
> for the kernel, since we disabled
> /etc/kernel/postinst.d/zz-systemd-boot
>
> [...]
Applied, thanks!
[1/1] proxmox-boot: unconditionally mask systemd-gpt-auto-generator
(no commit info)
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-14 15:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-14 12:40 [pve-devel] [PATCH kernel-helper] proxmox-boot: unconditionally mask systemd-gpt-auto-generator Stoiko Ivanov
2025-08-14 15:19 ` [pve-devel] applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.