Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for install-to-filesystem --replace=alongside #129

Merged
merged 2 commits into from
Sep 23, 2023

Conversation

cgwalters
Copy link
Collaborator

@cgwalters cgwalters commented Sep 22, 2023

install: Trim bind mount information

I'm seeing this appear when targeting from a container image.


Support for install-to-filesystem --replace=alongside

I was trying to be really ambitious in #78
for the full "takeover" path. This is a much much simpler variant
where we just:

  • Blow away and reinitialize the /boot and /boot/efi partitions
  • Write inside the existing filesystem, leaving the OS running

Then when we reboot, we'll just need to clean up the old OS
state (or optionally leave it).


This happens with btrfs subvolumes for the root; we'll need
to handle that separately.

Signed-off-by: Colin Walters <walters@verbum.org>
I was trying to be really ambitious in containers#78
for the full "takeover" path.  This is a *much* *much* simpler variant
where we just:

- Blow away and reinitialize the `/boot` and `/boot/efi` partitions
- Write inside the existing filesystem, leaving the OS running

Then when we reboot, we'll just need to clean up the old OS
state (or optionally leave it).

Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters cgwalters changed the title WIP: Support for install-to-filesystem --replace=alongside Support for install-to-filesystem --replace=alongside Sep 23, 2023
@cgwalters
Copy link
Collaborator Author

Demo:

$ podman run --privileged -v /:/target --pid=host --net=none --security-opt label=type:install_t quay.io/cgwalters/ostest bootc install-to-filesystem --replace=alongside /target

@cgwalters cgwalters merged commit 830c6ea into containers:main Sep 23, 2023
8 checks passed
@cgwalters
Copy link
Collaborator Author

Notes to myself, script for testing this:

#!/bin/bash
set -xeuo pipefail
install /run/hostsrv/src/github/containers/bootc/target/release/bootc /usr/bin
podman run --rm --privileged --env BOOTC_BOOTLOADER_DEBUG=1 --pid=host -v /usr/bin/bootc:/usr/bin/bootc -v /:/target --security-opt label=type:install_t registry.gitlab.com/centos/cloud/sagano/fedora-boot-tier-0-dev:38 bootc install-to-filesystem --target-no-signature-verification --karg=console=ttyS0,115200n8 --replace=alongside /target

Note that we effectively bind mount in /usr/bin/bootc from the host devenv all the way into the container for faster iteration.

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.

None yet

1 participant