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

bootc install to-filesystem - having issues with passphrase LUKS #565

Open
spmfox opened this issue May 25, 2024 · 4 comments
Open

bootc install to-filesystem - having issues with passphrase LUKS #565

spmfox opened this issue May 25, 2024 · 4 comments
Labels
area/install Issues related to `bootc install` bug Something isn't working

Comments

@spmfox
Copy link

spmfox commented May 25, 2024

Hello, I'm trying to install bootc on top of an existing system that's configured with a LUKS passphrase. Reproducing this is easy, just a standard CentOS Stream 9 install - check the box for encryption during installation. Then run the bootc deployment method I describe below on top of the newly installed system. When the system reboot it hangs for a while then drops to a dracut prompt. No interesting log messages as far as I can tell.

I've looked/searched through all the bootc documentation and all of the issues & discussions on GitHub, but I cant seem to find any examples or anyone talking about using regular passphrase LUKS with this bootc deployment method.

Is this a known issue or am I doing something wrong? Thanks for your time.

I am using this deployment method as a test:

podman run --rm --privileged \
        --pid=host --security-opt label=type:unconfined_t \
        --volume /dev:/dev \
        --volume /var/lib/containers:/var/lib/containers \
        --volume /:/target \
        --entrypoint bootc \
        quay.io/centos-bootc/centos-bootc:stream9 \
        install to-filesystem --skip-fetch-check --replace=alongside /target --root-ssh-authorized-keys /target/root/.ssh/authorized_keys
@cgwalters cgwalters added bug Something isn't working area/install Issues related to `bootc install` labels May 26, 2024
@cgwalters
Copy link
Collaborator

In the general case it's pretty tricky as unlocking the root volume can get arbitrarily complex, and we'd need to know how to scrape out all the data for that. However, I think it's tractable to:

  • Teach bootc to handle well-defined distro defaults (as you are trying)
  • Error out if we are uncertain if we can handle the rootfs

That all said out of curiosity for your use case, would you be OK if we just wiped the OS state instead and reinitialized? (Per #78 ) - in this case it'd be bootc (or an external installer like anaconda) which would need to configure the LUKS setup, we wouldn't try to handle an existing one.

In other words: if we supported a flow of running anaconda as a container, moving itself to RAM and reinitializing the target disk (with support for inheriting desired state when moving to RAM) would that match your use case?

@spmfox
Copy link
Author

spmfox commented May 26, 2024

Hi Colin, yes that would work - the takeover sounds like a cleaner version of the replace. Any solution to installing with a LUKS encrypted drive would match my use case. I've mainly been using install to-filesystem for my testing because its the easiest to get started with.

I have tried the ISO install method hoping that I can just modify the install via anaconda but it gives you no way to make changes before deploying the image.

However I agree that bootc should be able to detect if that's not currently supported and error out before it results in an unusable system.

@cgwalters
Copy link
Collaborator

I have tried the ISO install method hoping that I can just modify the install via anaconda but it gives you no way to make changes before deploying the image.

What changes do you want to make? You should be able to make almost all changes via deriving a container image, right?

@spmfox
Copy link
Author

spmfox commented May 28, 2024

I have tried the ISO install method hoping that I can just modify the install via anaconda but it gives you no way to make changes before deploying the image.

What changes do you want to make? You should be able to make almost all changes via deriving a container image, right?

I was just looking for a way to install with LUKS using a passphrase, either by taking over a system that already had it or perhaps do it manually with Anaconda.

cgwalters pushed a commit to cgwalters/bootc that referenced this issue Nov 6, 2024
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` bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants