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

Mantas Mikulėnas grawity at gmail.com
Sun May 15 13:34:13 UTC 2016


On Sun, May 15, 2016 at 3:28 PM, fb.dev.gen <fb.dev.gen at gmail.com> wrote:

> 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)?
>

Asking the system to mount anything at / doesn't make much sense, because
the fact that systemd is running and can read its unit files already means
the rootfs is mounted... (There's always something mounted at /; if it's
not the real rootfs, then it's the initramfs or something.)

If you're just trying to *re*mount / with different options, that's not
done via .mount units – it's done by systemd-remount-fs, which always
parses the fstab. But in that case, why not specify the correct mount
options in the first place? Putting "rootflags=discard,noatime" in the
kernel command line should be enough.

-- 
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160515/0bd89bae/attachment.html>


More information about the systemd-devel mailing list