[composefs-backend]: install to-existing-root fixes#2323
Open
Johan-Liebert1 wants to merge 4 commits into
Open
[composefs-backend]: install to-existing-root fixes#2323Johan-Liebert1 wants to merge 4 commits into
install to-existing-root fixes#2323Johan-Liebert1 wants to merge 4 commits into
Conversation
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>
install to-existing-root fixes
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.
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
/bootas rw, check if it's readonly so wedon't fail the re-mount operation
composefs: Fix
install to-existing-rootFix a few issues with composefs path for
install to-existing-root.Composefs repository initialization
Since we mount
/sysroot:roat/target, composefs repositoryinitialization would fail with
Read only filesystem. Fix it byremounting
/target/sysrootread-writeHandle bootloader
Get the current bootloader by reading
LoaderInfoand try to installthe 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)