Hello!

/etc/systemd/system/root.mount change to /etc/systemd/system/-.mount

As I remember, unit naming depends on path, where partition is to be mounted. So, schema is: /home -> home.mount; /my/mountpoint/ -> my-mountpoint.mount; / -> -.mount and so on.


UPD: man systemd.mount:
=====
Mount units must be named after the mount point directories they
control. Example: the mount point /home/lennart must be configured in a
unit file home-lennart.mount. For details about the escaping logic used
to convert a file system path to a unit name, see systemd.unit(5).
=====

15.05.2016 15:28, 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
_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to