我使用的是Ubuntu 14.10。
我刚安装systemd,我有一个失败的服务, proc-sys-fs-binfmt_misc.automount 。
我在这里看到这是systemd的一部分:
这个文件很重要吗? 我如何解决激活问题?
systemctl status的输出:
svassaux@vps127101:~$ systemctl status proc-sys-fs-binfmt_misc.automount -> '/org/freedesktop/systemd1/unit/proc_2dsys_2dfs_2dbinfmt_5fmisc_2eautomount' proc-sys-fs-binfmt_misc.automount - Arbitrary Executable File Formats File System Automount Point Loaded: loaded (/lib/systemd/system/proc-sys-fs-binfmt_misc.automount; static) Active: failed (Result: resources) Where: /proc/sys/fs/binfmt_misc Docs: https://www.kernel.org/doc/Documentation/binfmt_misc.txt http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
编辑:我的单位档案:
# 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=Arbitrary Executable File Formats File System Automount Point Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems DefaultDependencies=no Before=sysinit.target ConditionPathExists=/proc/sys/fs/binfmt_misc/ ConditionPathIsReadWrite=/proc/sys/ [Automount] Where=/proc/sys/fs/binfmt_misc
binfmt_misc机制用于注册处理程序以获得“异国情调”的二进制格式,以使内核直接执行这些文件。 就像普通的ELF二进制文件使用/lib*/ld-linux*.so.2来执行,不同的脚本是由它们的第一个“shebang”行执行的,任何其他的文件格式都可以通过告诉内核如何执行识别格式和运行内容。 binfmt_misc机制最常见的用户可能是WINE,它需要使用“./program.exe”来启动运行Windows可执行文件。
因此,除非你使用WINEfunction的这个function,否则即使使用了不起作用的binfmt_misc机制,你的系统也会正常工作。
至于为什么激活自动安装单元在您的系统上失败,那么不检查系统日志(至less)是不可能的。 自动化单位是非常轻量级,因此不太可能失败。 我猜你的问题可能与系统上的一些非标准安全或资源限制设置有关。
您可以使用journalctl _SYSTEMD_UNIT=proc-sys-fs-binfmt_misc.automount仔细查看失败的单元。 如果这样做没有帮助,请尝试使用journalctl -b ,查找单元未能启动的位置,并查看可能相关的错误。