[systemd-devel] [PATCH 1/2] fstab-generator: Support root on tmpfs (or other deviceless FS)

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Tue Mar 24 06:03:39 PDT 2015


On Tue, Mar 24, 2015 at 12:48:15PM +0000, Zbigniew Jędrzejewski-Szmek wrote:
> On Tue, Mar 24, 2015 at 10:59:20AM +0100, Tobias Hunger wrote:
> > 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.
Argh, dreisner pointed out on irc that "nodev" in /proc/filesystems is
completely different than "nodev" in /etc/fstab. I confused "nodev"
with "_netdev" ;)

So there's no fstab options with this meaning currently. So nothing
to do atm, which is fine I guess.

> > 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'm not sure if parsing it buys us anything. It only contains a list of
> filesystems for which modules have been loaded, so it cannot be used
> to reliably detect the type of a filesystem we will mount in the future.

Zbyszek


More information about the systemd-devel mailing list