无法在systemd中为/ dev创建自定义安装点

时间:2015-10-20 16:44:30

标签: linux ubuntu upstart systemd

我在嵌入式系统中工作,我们正在从upstart迁移到systemd。我试图在rootfs中为/ dev编写.mount文件。但这失败了。有人可以帮忙吗?

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=/dev Directory
Documentation=man:hier(7)
Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
DefaultDependencies=no
Conflicts=umount.target
Before=local-fs.target umount.target

[Mount]
What=tmpfs
Where=/dev
Type=tmpfs
Options=mode=1777

我的文件名为dev.mount

我收到以下错误 Cannot add dependency job for unit dev.mount, ignoring: Unit dev.mount failed to load: Invalid argument

1 个答案:

答案 0 :(得分:0)

摘自文档 systemd.mount

  

某些文件系统具有特殊语义作为用于内核到用户空间和用户空间到用户空间接口的API文件系统。其中一些可能无法通过安装单元进行更改,也无法禁用。

另见: API file systems

相关问题