[systemd-devel] mounting the root file system using systemd unit file

fb.dev.gen fb.dev.gen at gmail.com
Sun May 15 14:48:33 UTC 2016


@Mikhail: thank you for your answer.

@killermoehre: my special reason to not use `/etc/fstab` is that I'm
testing Clear Linux <https://clearlinux.org/> which do not provides any
`/etc/fstab` configuration file and uses extensively all systemd
versatility.

@all: any other suggestion about -.mount unit file regarding sections
and options?


-- Ben

On Sun, 2016-05-15 at 15:09 +0200, killermoehre wrote:
> Am 15.05.2016 um 14:28 schrieb fb.dev.gen:
> > 
> > Hi all,
> > 
> > What should be the way to mount the root file system using systemd
> > unit
> > file (i.e: without any `/etc/fstab` configuration file)?
> > 
> > Could it be right to do it like that:
> > 
> > ```
> > # cat > /etc/systemd/system/root.mount << EOF
> > [Unit]
> > Description = Root file system mount point controlled and
> > supervised by
> > systemd
> > 
> > [Mount]
> > What = /dev/root
> > Where = /
> > Type = ext4
> > Options = default,discard,noatime 0 0
> > 
> > [Install]
> > WantedBy = multi-user.target
> > EOF
> > 
> > ```
> > 
> > ...or is there a better "systemd way" to do it?
> > 
> > 
> > -- Ben
> Hi Ben,
> 
> according to the systemd.mount man page, »In general, configuring
> mount
> points through /etc/fstab is the preferred approach«. So /etc/fstab
> is
> already the systemd way to do it.
> Do you have any special reasons not to use /etc/fstab?
> 
> Regards
> killermoehre
> 
> 
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel


More information about the systemd-devel mailing list