-
Notifications
You must be signed in to change notification settings - Fork 160
install: add target_root_path for RootSetup
#1752
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
base: main
Are you sure you want to change the base?
Conversation
01ff672 to
0830023
Compare
|
Build the patch based on Check the If I reboot, seems it still booted into old rhel9.6, how can I check if the installation is successful?
|
|
This is a complex topic. A first thing here is that This issue also relates to #820 I think at the current time it's expected that
That is strange; what does |
|
One issue also related to this is that some of the install integration tests are still mostly orchestrated via the GHA I think we should likely switch them over to tmt. Although it gets subtle as reproducing the Edge starting state via tmt will require some work, but we can do that as a followup. |
Actually on ostree OS, it only removes
Run After reboot, boot into the old rhel9.6-edge, find directory |
You're right! And that's one of the issues here - this system is ostree but not bootupd, and that's one of the problem roots - I think in this case we'll just not change the bootloader state at all which is not expected. I think basically if we detect ostree but not bootupd, then we should proceed by wiping out the complete ESP as before alongside everything in Now...there is a related but distinct thing here which is that if we detect bootupd, we should also forcibly do a |
25cf806 to
4c8db70
Compare
Sorry that this is out of my knowledge, what I see is from clean_boot_directories() before install_to_filesystem_impl(), any pointer for this? Thank you!
LGTM, have no idea where I should add this.
Should the new entries config and kernel file are created after running |
Yep that's the right place
In the logic where we have
Yes the boot loader entries are written by the install (and upgrade) process; those should stay the same as is today. What's special cased right now is ostree-vs-non-ostree in the |
The bootupctl update is a little different as it currently reads path form
With @jbtrystram 's help, do testing with change, cleanup ESP files and preserve like After reboot, boot into the old rhel9.6-edge, directory I think what you said for the comment makes sense, but I have no idea how to fix this, any pointer is much appreciated. Copy the comment here: |
13f3c22 to
41935bb
Compare
|
Check more and find that the new The workaround is remove After booted, check that Edit:
This explains why the mount shows as |
|
Based on the above comment, one workaround is
Edit: |
Get pointer from bootc-dev#1752 (comment) On Ostree OS, should empty the complete ESP and everything in `/boot` but preserve `/boot/loader`. Signed-off-by: Huijing Hei <hhei@redhat.com> Co-worked by: Jean-Baptiste Trystram <jbtrystram@redhat.com>
5e2338b to
e5a6ba4
Compare
root_path for RootSetuptarget_root_path for RootSetup
|
Do some testing based on PR, Before reboot: After reboot and check |
e5a6ba4 to
0e61edd
Compare
753d5b7 to
9074ef8
Compare
I think this is a generic virtiofs flake. There's also bootc-dev/bcvk#157 which is a different error - but might be related, I haven't dug enough into it. You can try to restart to see if it is a flake. |
Get pointer from Colin's comment bootc-dev#1752 (comment) - Empty the complete ESP - On ostree OS, empty `/boot` but preserve `/boot/loader` - On none ostree OS, the loader is directory that needs to be removed. Signed-off-by: Huijing Hei <hhei@redhat.com>
9074ef8 to
f62e5d3
Compare
Get pointer from Colin's comment bootc-dev#1752 (comment) - Empty the complete ESP - On ostree OS, empty `/boot` but preserve `/boot/loader` - On none ostree OS, the loader is directory that needs to be removed. Signed-off-by: Huijing Hei <hhei@redhat.com>
a3de335 to
cd6699e
Compare
Get pointer from Colin's comment bootc-dev#1752 (comment) - Empty the complete ESP - On ostree OS, empty `/boot` but preserve `/boot/loader` - On none ostree OS, the loader is directory that needs to be removed. Signed-off-by: Huijing Hei <hhei@redhat.com>
735ece3 to
498f92a
Compare
Get pointer from Colin's comment bootc-dev#1752 (comment) - Empty the complete ESP - On ostree OS, empty `/boot` but preserve `/boot/loader` - On none ostree OS, the loader is directory that needs to be removed. Signed-off-by: Huijing Hei <hhei@redhat.com>
ed86df0 to
e7f2b8e
Compare
Get pointer from Colin's comment bootc-dev#1752 (comment) - Empty the complete ESP - On ostree OS, empty `/boot` but preserve `/boot/loader` - On none ostree OS, the loader is directory that needs to be removed. Signed-off-by: Huijing Hei <hhei@redhat.com>
f6760e9 to
b313845
Compare
|
Finally the test is passed (see https://github.com/bootc-dev/bootc/actions/runs/20326393875/job/58393662760), ready for reviewing now, thank you so much @cgwalters for the pointer. |
Get pointer from Colin's comment bootc-dev#1752 (comment) - Empty the complete ESP - On ostree OS, empty `/boot` but preserve `/boot/loader` - On none ostree OS, the loader is directory that needs to be removed. Signed-off-by: Huijing Hei <hhei@redhat.com>
When running `install to-filesystem` on ostree OS, should use `target_root_path` for bootupctl to install bootloader. Signed-off-by: Huijing Hei <hhei@redhat.com>
Fix what we did in bootc-dev@92d9d38 Signed-off-by: Huijing Hei <hhei@redhat.com>
b313845 to
914710a
Compare
cgwalters
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hard work on this! There's so many subtleties here. I think this looks right, but I would like to spend some time looking more carefully after break too.
| # Build test container image for testing on coreos with SKIP_CONFIGS=1, | ||
| # without configs and no curl container image | ||
| build-testimage-coreos PATH: | ||
| @just build-from-package {{PATH}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah it looks like this is going to conflict with #1864
But it's ok if this goes in first I can rebase
| # adjust: | ||
| # - when: VARIANT_ID != coreos | ||
| # enabled: false | ||
| # because: this needs to start an ostree OS firstly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum. But what does "ostree OS" mean here that's different from the other tests which start via bcvk libvirt run?
Doesn't this relate more to just the /boot partition setup?
If it's about having a separate /boot on an ostree based OS then note we should also be able to easily replicate this with Anaconda-based installs too (or bootc-image-builder).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is more related to esp partition and a separate /boot on existing ostree OS, like edge and FCOS/RHCOS.
Maybe I should use coreos here, as it is testing on FCOS. In this case, just use bcvk libvirt run to start fedora-coreos:testing-devel and then do testing.
I can try later if can use Anaconda, thank you for your pointer!
| ); | ||
| } | ||
|
|
||
| // Add --filesystem=xfs by default on fedora-coreos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK as is but I think we should just put that in the default FCOS container image. As is done in https://gitlab.com/redhat/centos-stream/containers/bootc/-/commit/cfafc9e78a0c9cbdb016113edd6a5dd35d87ab8b
Then we can drop it here.
crates/lib/src/install.rs
Outdated
| } | ||
| Some(ReplaceMode::Alongside) => clean_boot_directories(&rootfs_fd, is_already_ostree)?, | ||
| Some(ReplaceMode::Alongside) => { | ||
| // On existing ostree OS like FCOS, esp is not mounted after booted, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not strictly true, Anaconda writes the ESP into /boot/efi and it is mounted by default I think.
I'd probably just drop the comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Anaconda yes, but on booted FCOS, the ESP part is not mounted, and /boot/efi will be removed in clean_boot_directories(), so need to mount ESP before clean_boot_directories().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move crate::bootloader::mount_esp_part() to clean_boot_directories()
On FCOS, esp is not mounted after booted, need to find esp and mount before cleaning, or `/boot/efi` will be removed. Signed-off-by: Huijing Hei <hhei@redhat.com>
To workaround bootc-dev/bcvk#174, will build `bootc-integration-coreos` container firstly and save it to `bootc.tar`, then load it to install. Signed-off-by: Huijing Hei <hhei@redhat.com>
914710a to
fecf28b
Compare
/boot&/boot/efitarget_root_pathtobootupctlto install bootloader./bootclean_boot_directories()