【问题标题】:Cannot create custom mount point for /dev in systemd无法在 systemd 中为 /dev 创建自定义挂载点
【发布时间】:2015-10-20 16:44:30
【问题描述】:

我在嵌入式系统中工作,我们正在从 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

【问题讨论】:

    标签: linux ubuntu upstart systemd


    【解决方案1】:

    摘自 systemd.mount

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

    另请参阅: API file systems

    【讨论】:

      猜你喜欢
      • 2020-02-01
      • 1970-01-01
      • 2021-03-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多