After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 756267 - Setting up /boot when it is not a separate partition
Setting up /boot when it is not a separate partition
Status: RESOLVED FIXED
Product: ostree
Classification: Infrastructure
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: OSTree maintainer(s)
OSTree maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-10-08 22:15 UTC by John Hiesey
Modified: 2016-04-02 15:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
prepare-root: set up /boot bind-mount for single partition systems (1.62 KB, patch)
2015-10-08 22:18 UTC, John Hiesey
accepted-commit_now Details | Review

Description John Hiesey 2015-10-08 22:15:06 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
Comment 1 John Hiesey 2015-10-08 22:18:00 UTC
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.
Comment 2 Colin Walters 2015-10-16 01:33:44 UTC
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.
Comment 4 Colin Walters 2016-04-02 15:47:01 UTC
Hey John, can you take a look at 

https://github.com/ostreedev/ostree/pull/215

?