-
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 #215
Conversation
Or, would it work to just drop the leading |
de000be
to
f870614
Compare
bot, retest this please |
I finally got around to testing this a bit by converting a CentOS Atomic Host image from grub2->extlinux using libguestfs. (That was a fun process and I hit https://bugzilla.redhat.com/show_bug.cgi?id=1099237 again...what was really broken is libguestfs claimed to support turning off 64 bit but didn't actually do it 😭 ). Anyways, when things booted I immediately noticed So...this leads me to believe that somehow u-boot has been working without this patch. John, does u-boot do something like search in /boot automatically as well? |
To complete the picture here more sanely, since we already detect on bootup whether we're in a single partition approach, maybe I think we still need an environment variable for OS builders that are doing cross builds, or alternatively/in addition a command line switch to |
I don't think so. U-boot sources uEnv.txt and then does something like: Where kernel_image=/ostree/qt-os-590db09c66551670019a487992f4dae9cb2067e241f7c7fefd6b3d35af55895b/vmlinuz So to make this work on a single partition system one would need to add the "boot" prefix:
Having OSTree to provide a full path is just a convenience in my opinion. Otherwise system builders can take care of this, as partition layout is static and the necessary prefix needs to be configured only once - when bringing up the system. |
u-boot on the Tegra TK-1 does this at least. Here's a simplified excerpt that I've formatted for clarity:
The full set of u-boot environment looks like this:
|
What's left to do? This seems pretty appealing to me. Is it worth trying out (as a comparative "end user") in the current state? |
People making smaller operating systems, particularly things like cloud images, don't need to have /boot as a separate partition. Build on the code that recently landed to detect whether /boot is a mountpoint at runtime (for read-only purposes) here in order to influence bootloader config generation. Basically if /boot is not a partition, prepend `/boot` to generated syslinux/uboot config. NOTE: *not* tested in a real world scenario for either syslinux or uboot, but I did extend the test suite to cover this. https://bugzilla.gnome.org/show_bug.cgi?id=751666
f870614
to
a995ffd
Compare
Rebased for testing 🔬 |
gentle ping... |
I'm test this pr and don't see that /boot prepended i think this is becasue /boot on / not dedicated partiono , but /boot/efi is the partition. I can delete move all stuff to efi partition but in this case (as i remember) fedora installer complain about that /boot/efi needs to be separate partition. |
@cgwalters gentle ping... as of user that does not have separate /boot =) |
Right, this code basically needs to be aware of |
Sort of related to this...one thing on the back of my mind here is that it'd be safer if we created a container with a new mount namespace, and just mounted read-write there. That way |
does it possible to finish and merge this pr ? |
This blocks on redoing the grub2 backend, see #706 |
☔ The latest upstream changes (presumably 455cc5e) made this pull request unmergeable. Please resolve the merge conflicts. |
Obsoleted by #1404 |
This introduces a new config value "sysroot.boot_path_on_disk": > Tell ostree where the bootloader will be looking for the kernel. This is > the location of `/boot` relative to the root of the boot partition. > > This allows explicitly telling ostree that the boot partition is or is > not separate from the root partition. If `/boot` is on root set this to > `/boot`. If it's on seperate partition this should be set to `/`. > > This must be either an absolute path (starting with `/`) or `auto`. > Defaults to `auto`. > > This setting currently only respected by the u-boot and syslinux > bootloaders. This commit is based on an original by Colin Walters (ostreedev#215), but takes a different tack. ostreedev#215 attempts to determine automatically whether `/boot` is on root or not, but there are always situations where this isn't possible so I'm adding a config option here so the user can make it explicit. Future commits can add the automatic detection in, but this means that we don't need to be completely general with the auto-detection.
This introduces a new config value "sysroot.boot_path_on_disk": > Tell ostree where the bootloader will be looking for the kernel. This is > the location of `/boot` relative to the root of the boot partition. > > This allows explicitly telling ostree that the boot partition is or is > not separate from the root partition. If `/boot` is on root set this to > `/boot`. If it's on seperate partition this should be set to `/`. > > This must be either an absolute path (starting with `/`) or `auto`. > Defaults to `auto`. > > This setting currently only respected by the u-boot and syslinux > bootloaders. This commit is based on an original by Colin Walters (ostreedev#215), but takes a different tack. ostreedev#215 attempts to determine automatically whether `/boot` is on root or not, but there are always situations where this isn't possible so I'm adding a config option here so the user can make it explicit. Future commits can add the automatic detection in, but this means that we don't need to be completely general with the auto-detection.
People making smaller operating systems, particularly things like
cloud images, don't need to have /boot as a separate partition.
Build on the code that recently landed to detect whether /boot
is a mountpoint at runtime (for read-only purposes) here in order
to influence bootloader config generation.
Basically if /boot is not a partition, prepend
/boot
to generatedsyslinux/uboot config.
NOTE: not tested in a real world scenario for either syslinux or
uboot, but I did extend the test suite to cover this.
https://bugzilla.gnome.org/show_bug.cgi?id=751666