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

install: Don't require EFI if booted via BIOS and doing alongside #155

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

cgwalters
Copy link
Collaborator

install: Track is_alongside

We're going to need to dispatch other behavior on this around
the bootloader, so make it a generic thing.

Signed-off-by: Colin Walters [email protected]


install: Don't require EFI if booted via BIOS and doing alongside

Today Anaconda defaults to setting up the bootloader with
source == target mode; on x86_64 that means if booted via BIOS
the system is installed just with BIOS, and EFI if booted via EFI.

When we're doing an alongside install we hence cannot require
an ESP.

Signed-off-by: Colin Walters [email protected]


We're going to need to dispatch other behavior on this around
the bootloader, so make it a generic thing.

Signed-off-by: Colin Walters <[email protected]>
Today Anaconda defaults to setting up the bootloader with
source == target mode; on x86_64 that means if booted via BIOS
the system is installed just with BIOS, and EFI if booted via EFI.

Hence, we must match the target boot method only.
(TODO: drive down into bootupd something like `backend install --component=auto`)

Signed-off-by: Colin Walters <[email protected]>
@cgwalters cgwalters force-pushed the install-efi-opt-if-bios branch from 966002e to 20aa19c Compare October 23, 2023 14:35
@cgwalters cgwalters merged commit 7c16f46 into containers:main Oct 23, 2023
6 checks passed
@cgwalters
Copy link
Collaborator Author

cgwalters commented Oct 23, 2023

Replacing a dnf-based system with a bootc-based one, preserving state

IMPORTANT NOTICE: While almost all your data will be preserved, the bootloader state is not, and this will currently be a one way transition. More in install --replace=alongside docs.

So with this (building on previous change) I've verified that I can take a stock Fedora Workstation install (i.e. dnf based etc.) and building a container image that has the latest bootc installed with this code like:

FROM quay.io/fedora/fedora-silverblue:39
RUN rpm-ostree install https://download.copr.fedorainfracloud.org/results/rhcontainerbot/bootc/fedora-39-x86_64/06558679-bootc/bootc-202310231752.gd87aff8c54-1.fc39.x86_64.rpm && ostree container commit

(or obviously in the future we should ship dnf here...)

Then on the target system:

# dnf -y install skopeo
# podman run --privileged -v /:/target --pid=host --net=none --security-opt label=type:unconfined_t quay.io/you/yourdesktop:latest bootc install-to-filesystem --replace=alongside --target-no-signature-verification /target 
# systemctl reboot

And when you reboot, you'll be able to access all your files in /sysroot; for example if you have VM images they'll be in /sysroot/var/lib/libvirt. Note that Workstation uses a btrfs subvolume for /home by default which won't be mounted in this model (unless you explicitly enabled it in your container image!). But you can find the old subvolume information in:

$ grep /home /sysroot/etc/fstab
UUID=2f59332e-bb92-429f-aad6-baa6d0dcd801 /home                   btrfs   subvol=home,compress=zstd:1 0 0

Then mount it like e.g.
mount -t btrfs -o subvol=home,compress=zstd:1 UUID=2f59332e-bb92-429f-aad6-baa6d0dcd801 /mnt/oldhome

And you'll be able to copy over files from your old home directory, etc.

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.

1 participant