[systemd-devel] [PATCH] fstab-generator: Honor usr=, usrfstype= and usrflags=
Harald Hoyer
harald.hoyer at gmail.com
Thu Oct 9 00:50:57 PDT 2014
On 09.10.2014 09:37, Tobias Hunger wrote:
>
> On Oct 8, 2014 2:15 PM, "Harald Hoyer" <harald.hoyer at gmail.com
> <mailto: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?
Yes :) Sounds legit.
Lennart, approved from my side (didn't look at the code, though).
More information about the systemd-devel
mailing list