Repository navigation
Open
Labels
triagedThis issue appears to be valid
Description
Attempted to switch from ghcr.io/secureblue/cosmic-main-hardened:br-testing-44-uki to ghcr.io/secureblue/cosmic-main-hardend:uki, after rebooting bootc is rendered unusable on all deployments retroactively (rebooted into the old deployment), attempting to run status, upgrade or switch returns:
hooly@fedora-desktop:~$ run0 -i bootc upgrade
jq: parse error: Invalid numeric literal at line 1, column 6
error: Upgrading composefs: Getting composefs deployment status: Getting composefs deployment status: Getting composefs deployment status: Getting composefs deployment metadata: Reading image info for deployment 994112916dd9dcfd68c5dba5efc0c0585dff421f81a9a6dfdd69641756c3b94b8bd3c78114143bad8a618a78545ddcada68a147fdf8f89bcf893836720a68254: Opening OCI image for manifest sha256:2d0432b651df916a9d16c62802cd7b4776a50c78bc43b8eaca1a099d38ca0e7d: Opening stream 'oci-manifest-sha256:2d0432b651df916a9d16c62802cd7b4776a50c78bc43b8eaca1a099d38ca0e7d': Opening ref 'streams/oci-manifest-sha256:2d0432b651df916a9d16c62802cd7b4776a50c78bc43b8eaca1a099d38ca0e7d': No such file or directory (os error 2)
[1]hooly@fedora-desktop:~$ run0 -i bootc status
jq: parse error: Invalid numeric literal at line 1, column 6
error: Status: Getting composefs deployment status: Getting composefs deployment status: Getting composefs deployment metadata: Reading image info for deployment 994112916dd9dcfd68c5dba5efc0c0585dff421f81a9a6dfdd69641756c3b94b8bd3c78114143bad8a618a78545ddcada68a147fdf8f89bcf893836720a68254: Opening OCI image for manifest sha256:2d0432b651df916a9d16c62802cd7b4776a50c78bc43b8eaca1a099d38ca0e7d: Opening stream 'oci-manifest-sha256:2d0432b651df916a9d16c62802cd7b4776a50c78bc43b8eaca1a099d38ca0e7d': Opening ref 'streams/oci-manifest-sha256:2d0432b651df916a9d16c62802cd7b4776a50c78bc43b8eaca1a099d38ca0e7d': No such file or directory (os error 2)
[1]hooly@fedora-desktop:~$ run0 -i bootc switch ghcr.io/secureblue/cosmic-main-hardened:uki
jq: parse error: Invalid numeric literal at line 1, column 6
error: Switching: Composefs Switching: Getting composefs deployment status: Getting composefs deployment status: Getting composefs deployment status: Getting composefs deployment metadata: Reading image info for deployment 994112916dd9dcfd68c5dba5efc0c0585dff421f81a9a6dfdd69641756c3b94b8bd3c78114143bad8a618a78545ddcada68a147fdf8f89bcf893836720a68254: Opening OCI image for manifest sha256:2d0432b651df916a9d16c62802cd7b4776a50c78bc43b8eaca1a099d38ca0e7d: Opening stream 'oci-manifest-sha256:2d0432b651df916a9d16c62802cd7b4776a50c78bc43b8eaca1a099d38ca0e7d': Opening ref 'streams/oci-manifest-sha256:2d0432b651df916a9d16c62802cd7b4776a50c78bc43b8eaca1a099d38ca0e7d': No such file or directory (os error 2)
[1]hooly@fedora-desktop:~$
Additional info:
secureblue's UKI images are sealed images with the composefs-native backend,
the jq error is motd failing because it gets no info from bootc status
Metadata
Metadata
Assignees
Labels
triagedThis issue appears to be valid
Activity
[-]bootc retroactively broken after attempting to switch branch[/-][+]composefs-native: bootc retroactively broken after attempting to switch branch[/+]cgwalters commentedon Aug 31, 2026
Hmm, are there different versions of bootc in use here? We should probably add a
bootc internals fsck --reportor so that would just export all the data into a zip file (or OCI image) or so.This bit is really strange...I am pretty sure we don't have any usage of
jqbeing forked from our stack. Isbootca wrapper script for you?TheHooly commentedon Aug 31, 2026
Disregard that part, it is just a failure of secureblue's motd (it queries
rpm-ostree statusorbootc status),run0 -istarts a fresh shell for root and root's shell gets the motd, too.I will gladly provide more info if you can tell me what you need.
Johan-Liebert1 commentedon Sep 1, 2026
It's failing to get the manifest for
ghcr.io/secureblue/cosmic-main-hardend:ukiwhich is weird. Could you get the outputs of the following commandsTheHooly commentedon Sep 1, 2026
Johan-Liebert1 commentedon Sep 1, 2026
Weird that we have three state directories, but only two refs inside
streams/refs. That's where the error is originating from, it's trying to get manifest forsha256:2d0432b651df916a9d16c62802cd7b4776a50c78bc43b8eaca1a099d38ca0e7di.e. deployment994112916dd9dcfd68c5dba5efc0c0585dff421f81a9a6dfdd69641756c3b94b8bd3c78114143bad8a618a78545ddcada68a147fdf8f89bcf893836720a68254, but is failing to find.This seems like a bug in the GC code.
Can you try two more commands
TheHooly commentedon Sep 1, 2026
Johan-Liebert1 commentedon Sep 1, 2026
yeah, okay, so definitely a GC issue. The state directory for that particular deployment wasn't removed. I think this is reproducible. Thanks for the quick replies
Johan-Liebert1 commentedon Sep 1, 2026
If you want a quick fix, and this is hacky, you can try running
sudo unshare -m -- bash -c 'mount -orw,remount /sysroot && rm -rf /sysroot/state/deploy/994112916dd9dcfd68c5dba5efc0c0585dff421f81a9a6dfdd69641756c3b94b8bd3c78114143bad8a618a78545ddcada68a147fdf8f89bcf893836720a68254'Johan-Liebert1 commentedon Sep 8, 2026
I initially thought this was a GC edge case so I went through the GC code and we remove the state directories first just to avoid these situations. Also, the fact that the state directory was even picked up had to be because a bootloader entry pointed to it.
I can reproduce this issue, but only by manually deleting some files
@TheHooly could you post the version of bootc binaries in both the images?
cgwalters commentedon Sep 8, 2026
(We should try to be robust to this kind of corrupted state as much as possible)
TheHooly commentedon Sep 8, 2026
Uhm, that was my desktop system and it has since updated a few times ^^'
alexvojproc commentedon Sep 8, 2026
The bug occurred in v1.16.10 (we had a discussion about this at the time)
fsck: Add read-only diagnostic report
fsck: Add read-only diagnostic report
fsck: Add read-only diagnostic report
fsck: Add read-only diagnostic report
fsck: Add read-only diagnostic report
fsck: Add read-only diagnostic report
fsck: Add read-only diagnostic report
fsck: Add read-only diagnostic report
fsck: Add read-only diagnostic report
gauner666 commentedon Oct 9, 2026
I think we hit the same bug without deleting anything by hand. It's reproducible on bootc 1.17.1 with the composefs-native backend, and the trigger is a second
bootc switchwhile a deployment is already staged.Setup: Arch Linux, bootc v1.17.1 built from the release tag, composefs-native backend,
bootType: Ukiwith systemd-boot, btrfs root, images built locally and deployed withbootc switch --transport containers-storage localhost/gamer:<tag>.Sequence (2026-10-09, times CEST):
localhost/gamer:20261009-1344), no staged deployment,bootc statusOK.bootc switch … localhost/gamer:20261009-1414(B), which logs:state/deploy/4ad6d8d0…, UKI written to the ESP).bootc statusOK.bootc switch … localhost/gamer:20261009-1420(C). It does the same pull and GC (14:26:33), and C ends up correctly staged. However:streams/oci-manifest-sha256:0f13aa45…),/sysroot/state/deploy/4ad6d8d0…and B's UKI on the ESP were left behind (there was noloader/entriesfile for B).bootc statusfailed:That matches your hypothesis that the state dir only gets picked up because something on the boot side still points to it. Here, that was the stale UKI of the replaced staged deployment.
Recovery: We moved the state dir out of
/sysroot/state/deployand removed the stale UKI from the ESP. After that,bootc statuswas OK again and C was still staged.Workaround we now use: If a deployment is already staged, run
bootc delete-deployment <verity>on it before the nextswitch. That cleanly removes the state dir and the UKI, the spec falls back to the booted image, and the followingswitch+bootc statuswork. We tested this by hand, and our build script has used it since (most recently when a staged build was replaced by a newer one).Possibly related, but maybe intended: After a normal switch + reboot, the previous rollback's state dir (no ESP entry, no longer in
bootc status) stays instate/deployuntil the next switch, whose GC then removes it. It's harmless, but it looks like the same "state dir outlives its boot entry" pattern.I'm happy to provide
RUST_LOG=traceoutput if you need it. The machine still runs 1.17.1, so I can try to reproduce on request.