GNOME Bugzilla – Bug 756267
Setting up /boot when it is not a separate partition
Last modified: 2016-04-02 15:47:01 UTC
This was originally discussed on the mailing list with the subject the same as the summary here, but the discussion got a bit derailed. Copy/paste from Daniel Drake <drake@endlessm.com>: Hi, I'm looking at migrating to a setup where /boot is on the main root fs partition (ext4), rather than being a separate partition. This is for simpler partitioning, and for space savings (otherwise the same kernel/initramfs is stored separately on 2 partitions). Adjusting my build tools with this in mind, the resultant ostree boots fine. However, once booted into the deployment, /boot shows exactly what was committed into the deployment. It does not show the ostree-managed bootloader setup, which is visible at /sysroot/boot. This breaks standard usage of the 'ostree' binary as it expects to find bootloader configs in /boot/loader.X etc. I wonder if it would be acceptable to modify ostree-prepare-root to account for this. When preparing the root, if we find /boot/loader on the real disk, automatically set up an appropriate bind mount inside the deployment, so that /boot reflects at what I'm now seeing at /sysroot/boot. Other options include having the /boot inside the deployment as a symlink to /sysroot/boot, or having the software inside the ostree create an appropriate bind mount during early boot, but those options are less attractive to me as I must also support upgrades from earlier installs, where /boot is separate, so things get a bit more tricky. Daniel
Created attachment 312934 [details] [review] prepare-root: set up /boot bind-mount for single partition systems When booting from a system with /boot on the main partition, set up an appropriate bind mount during boot. The ostree runtime binary expects to be able to access the bootloader configs at /boot.
Review of attachment 312934 [details] [review]: So basically if you want this setup, the OS installer just has to create $sysroot/boot ? Looks reasonable to me.
https://git.gnome.org/browse/ostree/commit/?id=598530daf45a8bcb3be171732569b8aad0f4345d
Hey John, can you take a look at https://github.com/ostreedev/ostree/pull/215 ?