[systemd-devel] [PATCH] fstab-generator: Honor usr=, usrfstype= and usrflags=

Tobias Hunger tobias.hunger at gmail.com
Thu Oct 9 00:37:43 PDT 2014


On Oct 8, 2014 2:15 PM, "Harald Hoyer" <harald.hoyer at gmail.com> wrote:
> > What is the rationale of this patch?
> > Supporting systems without /etc/fstab in the root device?
> > Overriding the /etc/fstab settings?
> >
> > In a systemd initrd (e.g. in dracut) as soon as initrd-root-fs.target is
> > reached, initrd-parse-etc.service is executed, which retriggers the
> > fstab-generator and reads fstab from the real root and generates units
for /usr.

Hello Harald,

The use case is exactly the one Lennart described in his blog about
deploying Linux in the future.

My setup now looks like this: I got a Btrfs partition for my Linux
installations. This partition has a subvol root:somename:someid:x86_64
containing a Linux installation minus /use.

Then I have several versions of /use for that distribution in more
subvolumes named usr:someid:x86_64:version (all with different versions,
basically getting incremented whenever a new set of packages gets
installed).

The idea is to now be able to write bootloader entries for all versions the
somename-installation.

For that the initrd needs to know which /usr to mount on top of the root
partition.

I can not use the fstab from the root drive here, because that would always
point to the same version of /use, preventing me to roll back/forward when
something breaks during an upgrade.

What I could do instead is to put the information about which subvol to
mount at /use into the initrd. But I actually think the way of passing this
into initrd in the same way as the rootfs is more consistent and it also
saves me from having a new initrd in /boot when libreoffice gets updated.
That *might* be necessary when using secure boot, but only then.

Does this explain my motivation for this patch sufficiently?

Best Regards,
Tobias
On 08.10.2014 14:13, Harald Hoyer wrote:
> On 24.09.2014 22:08, Tobias Hunger wrote:
>> From f3a193de94959875cd1d83f941ed8fc8275c82eb Mon Sep 17 00:00:00 2001
>> From: Tobias Hunger <tobias.hunger at digia.com>
>> Date: Wed, 24 Sep 2014 21:57:00 +0200
>> Subject: [PATCH] fstab-generator: Honor usr=, usrfstype= and usrflags= on
>>  kernel command line
>>
>> This allows to configure boot loader entries for systems where the
>> root and usr filesystems are in different subvolumes (or even on
>> different drives).
>
> What is the rationale of this patch?
> Supporting systems without /etc/fstab in the root device?
> Overriding the /etc/fstab settings?
>
> In a systemd initrd (e.g. in dracut) as soon as initrd-root-fs.target is
> reached, initrd-parse-etc.service is executed, which retriggers the
> fstab-generator and reads fstab from the real root and generates units
for /usr.
>
>

doh.. didn't sent to mailing list... resent to list only.. sorry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141009/4ce72183/attachment.html>


More information about the systemd-devel mailing list