Skip to content

Keep staged updates from being dropped at shutdown - #75

Merged
Njal57 merged 1 commit into
mainfrom
claude/project-thread-oe14jf
Nov 14, 2026
Merged

Njal57 merged 1 commit into
mainfrom
claude/project-thread-oe14jf

Conversation

@Njal57

@Njal57 Njal57 commented Nov 14, 2026

Copy link
Copy Markdown
Collaborator

Problem

The update test (stable → latest) fails on main: bootc switch stages the update, but after the reboot the old image is still booted. The journal of the shutdown shows:

ostree[7157]: error: Remounting /boot read-write: Invalid argument
ostree-finalize-staged.service: Control process exited, code=exited, status=1/FAILURE

Cause

On installs where /boot is a directory of the root filesystem (bootc install to-disk, as in the test), GRUB reports the boot disk to systemd (LoaderDevicePartUUID), so systemd-gpt-auto-generator stacks an automount of the EFI system partition on top of ostree's /boot bind mount. Once that automount idles out (2 minutes), ostree cannot remount /boot read-write when it finalizes the update at shutdown, and drops the update. It is fixed upstream in ostree (ostreedev/ostree 84188e3 and 1bc0bad, 2026-11-06, related to bootc-dev/bootc#2402), not yet in the base image. Run #8 passed only because the reboot came before the automount expired.

Changes

  • build_files/50-services.sh: mask systemd-gpt-auto-generator (/etc/systemd/system-generators/… -> /dev/null). Nothing else of it is used: bootc sets root=, bootupd mounts the ESP itself, there is no swap, /home or /srv partition to discover. Checked in 99-tests.sh.
  • tests/vm-update-test.sh:
    • logs what is mounted on /boot before the update;
    • on images from before this fix (the current stable), masks the generator and reboots before updating, with a warning, since the old system is the one that finalizes the update;
    • waits 3 minutes between staging and rebooting, so the test catches this kind of problem the way people meet it (they reboot long after the update is staged).

Installs from the ISO normally have a separate /boot partition, which this bug does not concern.


Generated by Claude Code

On installs where /boot is a directory of the root filesystem (bootc
install to-disk, as in the update test), GRUB reports the boot disk to
systemd and systemd-gpt-auto-generator stacks an automount of the EFI
system partition on ostree's /boot bind mount. Once it idles out,
ostree-finalize-staged fails with "Remounting /boot read-write: Invalid
argument" and the update is silently dropped. Fixed upstream in ostree
(84188e3, bootc-dev/bootc#2402); until the base image has it, mask the
generator, which nothing else here needs, and check it at build time.

The update test now logs what is mounted on /boot, masks the generator on
older images before updating them (the old system finalizes the update),
and waits 3 minutes before rebooting, as people reboot well after an
update is staged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MxskLGhpmKNBfPRj5GkUHd
@Njal57
Njal57 merged commit 25f33af into main Nov 14, 2026
6 checks passed
@Njal57
Njal57 deleted the claude/project-thread-oe14jf branch November 16, 2026 14:44
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.

2 participants