Skip to content

[composefs-backend]: install to-existing-root fixes#2323

Open
Johan-Liebert1 wants to merge 4 commits into
bootc-dev:mainfrom
Johan-Liebert1:cfs-reinstall-fixes
Open

[composefs-backend]: install to-existing-root fixes#2323
Johan-Liebert1 wants to merge 4 commits into
bootc-dev:mainfrom
Johan-Liebert1:cfs-reinstall-fixes

Conversation

@Johan-Liebert1

Copy link
Copy Markdown
Collaborator

system-reinstall: Propagate boot mount in container

systemd gpt-auto-generator has automount for /boot which we need to
propagate inside the container for the service to mount the ESP at
/boot on access

Also, before remounting /boot as rw, check if it's readonly so we
don't fail the re-mount operation


composefs: Fix install to-existing-root

Fix a few issues with composefs path for install to-existing-root.

  1. Composefs repository initialization
    Since we mount /sysroot:ro at /target, composefs repository
    initialization would fail with Read only filesystem. Fix it by
    remounting /target/sysroot read-write

  2. Handle bootloader
    Get the current bootloader by reading LoaderInfo and try to install
    the same one


cfs/to-existing-root: Bootloader support

To figure out which bootloader to install, get the host's bootloader
(read from LoaderInfo from efivars) and store it in state. Before
finalizing the bootloader, check if the detected bootloader is
compatible with the current image (as the bootloader on host and the one in
the new image might differ)

systemd gpt-auto-generator has automount for /boot which we need to
propagate inside the container for the service to mount the ESP at
/boot on access

Also, before remounting `/boot` as rw, check if it's readonly so we
don't fail the re-mount operation

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Fix a few issues with composefs path for `install to-existing-root`.

1. Composefs repository initialization
Since we mount `/sysroot:ro` at `/target`, composefs repository
initialization would fail with `Read only filesystem`. Fix it by
remounting `/target/sysroot` read-write

2. Handle bootloader
Get the current bootloader by reading `LoaderInfo` and try to install
the same one

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
To figure out which bootloader to install, get the host's bootloader
(read from LoaderInfo from efivars) and store it in state. Before
finalizing the bootloader, check if the detected bootloader is
compatible with the current image (as the bootloader on host and the one in
the new image might differ)

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Mostly generated by LLM with some tweaks by me

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
@Johan-Liebert1 Johan-Liebert1 added the ci/tier-1 Run CI for tier-1 OS (centos-10) only label Jul 17, 2026
@github-actions github-actions Bot added area/install Issues related to `bootc install` area/system-reinstall-bootc Issues related to system-reinstall-botoc labels Jul 17, 2026
@bootc-bot
bootc-bot Bot requested a review from gursewak1997 July 17, 2026 12:53
@Johan-Liebert1 Johan-Liebert1 changed the title Cfs reinstall fixes [composefs-backend]: install to-existing-root fixes Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/install Issues related to `bootc install` area/system-reinstall-bootc Issues related to system-reinstall-botoc ci/tier-1 Run CI for tier-1 OS (centos-10) only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant