[systemd-devel] [PATCH] fstab-generator: handle mount units with "x-rootfs.mount"

Harald Hoyer harald.hoyer at gmail.com
Sat Mar 23 06:35:28 PDT 2013


Am 23.03.13 12:59, schrieb Kay Sievers:
> On Sat, Mar 23, 2013 at 5:49 AM, Harald Hoyer <harald at redhat.com> wrote:
>> Am 23.03.2013 03:05, schrieb Lennart Poettering:
>>> On Thu, 14.03.13 13:15, harald at redhat.com (harald at redhat.com) wrote:
>>>
>>>> From: Harald Hoyer <harald at redhat.com>
>>>>
>>>> Mount units with "x-rootfs.mount" are now ordered before root-fs.target.
>>>> As we sometimes construct /sysroot mounts in /etc/fstab in the initrd,
>>>> we want these to be mounted before the root-fs.target is active.
>>>
>>> Hmm, I don't get this, what is this for? Where's the destinction to
>>> "x-initrd.mount"? Why do we need both? Examples?
>>>
>>> Apparently a patch like this got merged, but it uses
>>> "x-initrd-rootfs.mount" as identifier, is that the same thing? If so,
>>> the thing really should be called "x-initrd.foobar", i.e. "x-initrd" is
>>> supposed to be the 'namespace' the setting is in.
>>>
>>> Anyway, totally not grokking this, please enlighten me.
>>>
>>
>> Sometimes we need to create an /etc/fstab entry for /sysroot in the initramfs
>> manually. So, we could either hardcode "/sysroot" to result in dependencies to
>> SPECIAL_ROOT_FS_TARGET, or mark it with "x-initrd-rootfs.mount".
> 
> What Lennart meant was: all the initrd things should stick to one and
> the same prefix x-initrd.* and not invent new top-level prefixes with
> x-initrd-*.

well, so, x-initrd.rootfs-mount ??

> 
> This can only be one entry ever, and it will always be /sysroot,
> right? This flexibility is probably not needed then and we can
> hardcode /sysroot?

I just wanted to be flexible, because initrd-root-fs.target and
initrd-fs.target are different targets.

initrd-root-fs.target is defined by fstab in the initrd.
initrd-fs.target is defined by fstab in the real root.

One use case could be, that you want to mount /sysroot/etc before you
parse /sysroot/etc/fstab for xinitrd.mount.




More information about the systemd-devel mailing list