[systemd-devel] [PATCH 1/2] fstab-generator: Support root on tmpfs (or other deviceless FS)
Tobias Hunger
tobias.hunger at gmail.com
Tue Mar 24 02:59:20 PDT 2015
On Tue, Mar 24, 2015 at 5:12 AM, Zbigniew Jędrzejewski-Szmek
<zbyszek at in.waw.pl> wrote:
> This wouldn't work if fstype was NULL. We also have a list of network filesystems,
> whic I assume don't require a device, and we can consult this list instead of including
> it here. I pushed the patch with those changes.
Hmmm, you are right. I was thinking about tmpfs, procfs and such where
the device can be anything, so I did not feel too comfortable to
include the network filesystems as those usually need to point to some
specific server or something. Of course that distinction does not make
too much sense, but I was so focused on my use case that I missed
that. Sorry.
> This list contains a lot of old cruft... OTOH, this doesn't hurt, so maybe
> it's fine.
>
> I wonder if we should support "nodev" fstab option. Then we could remove everything
> except overlayfs,ramfs,tmpfs from this list and tell people to use nodev for other
> cases.
The best solution would be to just check /proc/filesystems. That way
there is no user configuration required and the list keeps up to date
automagically. I can try my hand at parsing that file if you are ok
with this.
I did not want to just go ahead and start parsing new files as parsing
tends to be more expensive than checking some static list, network
filesystems did the same and finally parsing adds the requirement for
that file being available. I am not sure whether it is safe to assume
/proc/filesystems will be generally available in initrds.
Best Regards,
Tobias
More information about the systemd-devel
mailing list