[systemd-devel] mounting the root file system using systemd unit file
killermoehre
killermoehre at gmx.net
Sun May 15 13:09:07 UTC 2016
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160515/15985142/attachment.sig>
More information about the systemd-devel
mailing list