gpt4 book ai didi

linux - 无法在 systemd 中为/dev 创建自定义挂载点

转载 作者:太空宇宙 更新时间:2023-11-04 13:03:52 26 4
gpt4 key购买 nike

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

我收到以下错误无法为单元 dev.mount 添加依赖作业,忽略:单元 dev.mount 加载失败:参数无效

最佳答案

摘自文档 systemd.mount

Some file systems have special semantics as API file systems for kernel-to-userspace and userspace-to-userspace interfaces. Some of them may not be changed via mount units, and cannot be disabled.

另见: API file systems

关于linux - 无法在 systemd 中为/dev 创建自定义挂载点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33242232/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com