Repository navigation
Keep staged updates from being dropped at shutdown - #75
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The update test (stable → latest) fails on main:
bootc switchstages the update, but after the reboot the old image is still booted. The journal of the shutdown shows:Cause
On installs where
/bootis a directory of the root filesystem (bootc install to-disk, as in the test), GRUB reports the boot disk to systemd (LoaderDevicePartUUID), sosystemd-gpt-auto-generatorstacks an automount of the EFI system partition on top of ostree's/bootbind mount. Once that automount idles out (2 minutes), ostree cannot remount/bootread-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: masksystemd-gpt-auto-generator(/etc/systemd/system-generators/… -> /dev/null). Nothing else of it is used: bootc setsroot=, bootupd mounts the ESP itself, there is no swap,/homeor/srvpartition to discover. Checked in99-tests.sh.tests/vm-update-test.sh:/bootbefore the update;stable), masks the generator and reboots before updating, with a warning, since the old system is the one that finalizes the update;Installs from the ISO normally have a separate
/bootpartition, which this bug does not concern.Generated by Claude Code