-
Notifications
You must be signed in to change notification settings - Fork 305
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
sysroot: Support /boot on / for syslinux and uboot #1404
Conversation
Arguably it would be more general to replace Examples: Here
And here
but if
A more flowery example.
So you'd use |
I'm looking forward to it =)) |
We're already using libmount which parses all of this right? But yeah I think you're right we need to do that so that #1265 can be extended to the nobootpart case. Just a sanity check here (though the reply might be better in the other issue) - would your systems be OK if libostree started adding a read-only bind mount over |
While we have some basic unit testing for this I'd be a lot more comfortable if we did more "real world" testing using qemu etc.; just to clarify I don't expect you to write that for this patch and it's not a new issue. So the updated patch looks fine (I pushed a tiny fixup to update the code style), but did you get a chance to look at this: In your setup is that |
Hmm...if that's really necessary that'd break Anaconda for the rpm-ostree case. Or is this only in the nobootpart case? I'm debating this...I'd like to get your changes in but I'd like some soak time for this one, and there are a lot of other changes already queued that I'd like to get out. A consequence a bit of the "single release train" model. |
Yeah. I looked into it and it seems that
|
@wmanley To repeat though, I am honestly still confused by #215 (comment) - do you have the Anyways so to rephrase; if you want to merge as is that's OK by me, or we can try to polish more of the design and fix issues like the one you mention in your comment Hmm and actually I just realized the "built in" grub generator does have this logic:
So it's just the current non-builtin grub2 backend that doesn't. |
Yes, and that's probably why we set
I think it shouldn't be merged as is. |
I've made the change we discussed, but I haven't tested it for real yet. |
7d58a56
to
c5f613f
Compare
I can confirm that this works for us on real hardware, and we no-longer have to set |
Hmm compile error on c7-primary:
|
Perhaps that's what ostree/src/libostree/ostree-sysroot-deploy.c Lines 1997 to 2003 in 720e2ec
is all about? Perhaps, perhaps not. See cee57a0 |
@@ -2079,7 +2079,10 @@ boot_find_path_on_disk(char** path_out, GError **error) | |||
*path_out = g_steal_pointer(&path); | |||
return TRUE; | |||
#else /* !HAVE_LIBMOUNT */ | |||
return g_strdup(""); | |||
g_printerr ("warning: ostree compiled without libmount so we can't determine " |
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.
Hm. It feels like we should make libmount a hard dependency but also add a --disable-ostree-as-host
build option or something so that the people who just want libostree for flatpak can disable it?
Or alternatively just make it a hard dependency across the board, I can't really think of a case where someone would have an issue shipping libmount.
dc14cb8
to
d100878
Compare
I've squashed and force-pushed because fixing the |
d100878
to
0578449
Compare
Hmm, it seems that with each fix the builders get angrier and angrier. I'll need to do a bit more work on this to get them all passing. I'll retest on my device once the builders are happy. |
any news? does it possible to complete this pr and get it merged? |
☔ The latest upstream changes (presumably 2648c96) made this pull request unmergeable. Please resolve the merge conflicts. |
@wmanley can you resolve conflicts to get this merged? |
Any progress here? I would like to specifically see support for grub2 with respect to this issue. |
In preparation for adding another function that will need these `AUTOPTR_CLEANUP_FUNC`s.
People making smaller operating systems, particularly things like cloud images, don't need to have /boot as a separate partition.
0578449
to
cceda15
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: wmanley The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I've rebased on master. I've not implemented this for the new zipl bootloader as I don't know enough about it, but it will at least error for unsupported configurations. I'll be testing with syslinux bootloader shortly. |
return glnx_throw (error, "Failed to parse /proc/self/mountinfo"); | ||
|
||
const char *suffix = NULL; | ||
struct libmnt_fs *fs = mnt_table_find_target(tb, "/boot", MNT_ITER_BACKWARD); |
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.
TODO: Check for interactions with #1767. This might confuse /boot
as bind-mount with /boot
on own FS.
Also: This currently won't work for ostree admin deploy --sysroot=xxx
. Sometimes this is useful for embedded development where I'm deploying to an SD card and then plugging it into the embedded hardware for boot.
I've got some ideas on how to fix this. I think I've implemented it in the past (in python), but I can't remember where. I'll have a look.
I'm working through trying to get this working for all cases. Here are the ones I've enumerated:
I'll try to write test cases for each of these situations. Because the location of One thing that makes the |
We're trying to guess where the bootloader will look for the contents of
This is what the current version of the patch does. This doesn't work for use case (4) above because we can't answer "what is the boot device" when doing a |
Closing since #2149 merged. |
This is #215 rebased.
We've been using this patch in production for over a year now. One caveat is that we setOSTREE_SYSROOT_DEBUG=boot-is-not-mount
duringostree admin deploy
. IIRC we do this so we can deploy onto systems that aren't currently using ostree to using ostree. It would fail otherwise because of theif (self->booted_deployment)
check.As requested by @cgwalters in #1401 (comment)
TODO:
--sysroot