linux – 在启动期间自动挂载单独分区时的systemd / udev依赖性失败

前端之家收集整理的这篇文章主要介绍了linux – 在启动期间自动挂载单独分区时的systemd / udev依赖性失败前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
编辑:当我尝试使用具有ANY挂载点的单独分区时,会发生这种情况,而不仅仅是/ var.

我正在使用Buildroot来构建嵌入式Linux系统.我正在尝试为/ var使用单独的分区,但这适用于任何挂载点.我的init系统是systemd,udev用于设备管理.我把我的fstab编辑为:

# <file system> <mount pt>     <type>   <options>                <dump> <pass>
/dev/root       /              ext2     rw,noauto                0      1
/dev/mmcblk0p4  /var           ext2     defaults                 0      2
proc            /proc          proc     defaults                 0      0
devpts          /dev/pts       devpts   defaults,gid=5,mode=620  0      0
tmpfs           /dev/shm       tmpfs    mode=0777                0      0
tmpfs           /tmp           tmpfs    defaults                 0      0
sysfs           /sys           sysfs    defaults                 0      0
tmpfs           /run           tmpfs    defaults                 0      0

一旦系统启动,我收到一条消息“Expecting device dev-mmcblk0p4.device …”,最后接着是:

“等待设备dev-mmcblk0p4.device超时.”

“/ var的依赖失败”

“本地文件系统的依赖性失败.”

如果我使用/ var2或其他任何东西作为挂载点而不是/ var,也会发生同样的事情.一旦启动失败,它就进入紧急模式,然后安装将成功发生.然后,我可以退出系统维护,一切都按预期工作.是什么导致了这种延迟安装?我错过了一步吗?

输出屏幕截图:

解决方法

我在这里使用systemd-208与内核3.13.1和3.14.4在Exherbo(类似于Gentoo)下有类似的问题:我的单独分区(/ var,/ home,/ boot和even / swap)安装在所需的根目录下地点.一切都很好.然后,升级到systemd 213,启动进程在该位置停止,其中分区应该已经安装了消息:’启动作业正在运行dev-sdxx.device’,直到超时1分30秒.之后我处于紧急模式.
摘录
$journalctl -xb

Jun 09 13:50:29 exathlon systemd[1]: Job dev-disk-by\x2dlabel-BAK_A4.device/start timed out.
Jun 09 13:50:29 exathlon systemd[1]: Timed out waiting for device dev-disk-by\x2dlabel-BAK_A4.device.
Jun 09 13:50:29 exathlon systemd[1]: Dependency Failed for /mnt/BAK_A4.
Jun 09 13:50:29 exathlon systemd[1]: Dependency Failed for Local File Systems.
Jun 09 13:50:29 exathlon systemd[1]: Triggering OnFailure= dependencies of local-fs.target.
Jun 09 13:50:29 exathlon systemd[1]: Dependency Failed for /export/LinuxMint13_KDE_64.
Jun 09 13:50:29 exathlon systemd[1]: Dependency Failed for /export/SystemRescueCD-x86.
Jun 09 13:50:29 exathlon systemd[1]: Dependency Failed for File System Check on /dev/disk/by-label/BAK_A4.
Jun 09 13:50:29 exathlon systemd[1]: Job dev-sdb11.device/start timed out.
Jun 09 13:50:29 exathlon systemd[1]: Timed out waiting for device dev-sdb11.device.
Jun 09 13:50:29 exathlon systemd[1]: Dependency Failed for /var.
Jun 09 13:50:29 exathlon systemd[1]: Dependency Failed for Update UTMP about System Boot/Shutdown.
Jun 09 13:50:29 exathlon systemd[1]: Dependency Failed for Load/Save Random Seed.
Jun 09 13:50:29 exathlon systemd[1]: Dependency Failed for File System Check on /dev/sdb11.
Jun 09 13:50:29 exathlon systemd[1]: Job dev-sdb8.device/start timed out.
Jun 09 13:50:29 exathlon systemd-journal[1044]: Forwarding to syslog missed 15 messages.
Jun 09 13:50:29 exathlon systemd[1]: Timed out waiting for device dev-sdb8.device.
Jun 09 13:50:29 exathlon systemd[1]: Dependency Failed for /home.
Jun 09 13:50:29 exathlon systemd[1]: Dependency Failed for File System Check on /dev/sdb8.
Jun 09 13:50:29 exathlon systemd[1]: Job dev-sda6.device/start timed out.
Jun 09 13:50:29 exathlon systemd[1]: Timed out waiting for device dev-sda6.device.
Jun 09 13:50:29 exathlon systemd[1]: Dependency Failed for /boot.
Jun 09 13:50:29 exathlon systemd[1]: Dependency Failed for File System Check on /dev/sda6.
Jun 09 13:50:29 exathlon systemd[1]: Job dev-sdb5.device/start timed out.
Jun 09 13:50:29 exathlon systemd[1]: Timed out waiting for device dev-sdb5.device.
Jun 09 13:50:29 exathlon systemd[1]: Dependency Failed for /dev/sdb5.

显示systemd安装失败的尝试.

在查找互联网后,我能够找到配置内核的补救措施

CONFIG_FHANDLE=y (before: n)

请参阅“systemd System and Service Manager”

REQUIREMENTS:
 CONFIG_FHANDLE (libudev,mount and bind mount handling)

来源:http://cgit.freedesktop.org/systemd/systemd/tree/README

之后问题解决了,所有分区再次安装.

我不知道为什么这不会发生/或者不需要systemd 208.

原文链接:https://www.f2er.com/linux/394319.html

猜你在找的Linux相关文章