[systemd-devel] [PATCH 1/2] fstab-generator: initrd - mount the entries in /etc/fstab.sys from the initramfs
lennart at poettering.net
Fri Mar 1 05:26:07 PST 2013
On Mon, 25.02.13 16:00, Tom Gundersen (teg at jklm.no) wrote:
> This (together with the right unit files) is needed in the initramfs in order to
> natively support mounting /usr (and friends) from the initramfs.
> The concept of /etc/fstab.sys is taken from dracut, but might be used elsewhere
Hmm, I don't think fstab.sys ever existed outside of dracut, and I am
generally very conservative on introducing new "standards" in systemd
extending old stuff such as fstab. I mean, if we introduce new standards
then we should do that for really perfectly sound stuff. fstab is
certainly nice and simple, but "perfectly sound"? Not sure...
Also, besides / and /usr, is there anything else that would ever show up
in fstab.sys? If it's only these two, then it appears much nicer to me
to simply have two kernel cmdline options for these (we have one
anyway... for /). I mean, being generic and stuff is all cool, but let's
not make things too generic here, if there's no reason to.
> Two alternatives were considered, but decided against:
> * configure usr= on the kernel commandline in the same way as root= is.
> However, this would be restricted to only the /usr mountpoint, and the
> kernelcommandline is crowded enough as it is, so it seems more reasonable to
> store the configuration in /etc (as we can). Moreover, this logic would allow
> us to use more configuration sources from /etc in the future should that be
But this sounds like something you need anyway, if you ever want to
support "generic" initrds that work everywhere, and whose sole source of
configuration is cmdline hence, right? With just one more option on the
kernel cmdline for usr= I don't really buy the "too crowded"
issue... Dunno. Do you see any further uses of this?
> * configure the 'sys-mounts' in /etc/fstab. This would require a heuristic to
> decide which mounts sohuld be taken care of by the initramfs and which to be
> taken care of by the real init. I could not come up with a non-hacky way of
> doing that. Perhaps there is use-case for mounting with one set of options in
> the initrd and remounting with a different set of options in the real init
> (like can be done for the rootfs)? Keeping everything in fstab would make
> that impossible.
Well, you could always introduce "x-initrd" as a mount option to set for
mounts, if you really want to be this generic, and then filter for
it. And also imply it for / and for /usr. But honestly, the usr= kernel
cmdline thingy sounds much simpler and sexier to me?
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel