Skip to content

esp-generator: Mount ESP at /efi when ostree provides /boot - #430

Merged
starnight merged 1 commit into
masterfrom
fix-esp-partition-mount-point
Nov 23, 2026
Merged

starnight merged 1 commit into
masterfrom
fix-esp-partition-mount-point

Conversation

@starnight

Copy link
Copy Markdown
Contributor

Newer ostree no longer bind mounts /sysroot/boot at /boot from ostree-prepare-root in the initramfs. Instead, ostree-system-generator writes a boot.mount unit when /boot is on the root filesystem. That means /boot is not yet mounted when this generator runs, so it used the /boot path for the ESP and wrote its own boot.mount, which hides /sysroot/boot and conflicts with ostree's unit.

Detect the same condition ostree uses (/sysroot/boot/loader is a symlink, meaning /boot is on the root filesystem) and prefer /efi in that case. Systems with /boot on the ESP, such as PAYG with systemd-boot, are not affected since a symlink can't exist on vfat.

endlessm/eos-build-meta#255

Newer ostree no longer bind mounts /sysroot/boot at /boot from
ostree-prepare-root in the initramfs. Instead, ostree-system-generator
writes a boot.mount unit when /boot is on the root filesystem. That
means /boot is not yet mounted when this generator runs, so it used the
/boot path for the ESP and wrote its own boot.mount, which hides
/sysroot/boot and conflicts with ostree's unit.

Detect the same condition ostree uses (/sysroot/boot/loader is a
symlink, meaning /boot is on the root filesystem) and prefer /efi in
that case. Systems with /boot on the ESP, such as PAYG with
systemd-boot, are not affected since a symlink can't exist on vfat.

endlessm/eos-build-meta#255
@starnight
starnight merged commit 2611c00 into master Nov 23, 2026
1 check passed
@starnight
starnight deleted the fix-esp-partition-mount-point branch November 23, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant