在启动过程中自动安装单独的分区时,systemd/udev依赖项失败 [英] systemd/udev dependency failure when auto mounting separate partition during startup

查看:557
本文介绍了在启动过程中自动安装单独的分区时,systemd/udev依赖项失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用具有任何挂载点的单独分区而不只是/var时,会发生这种情况.

我正在使用Buildroot来构建嵌入式linux系统.我正在尝试为/var使用单独的分区,但是对于任何安装点都会发生这种情况.我的初始化系统是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

系统启动后,我会收到一条消息"正在等待设备dev-mmcblk0p4.device ... ",最后出现以下消息:

"等待设备dev-mmcblk0p4.device超时."

"/var的依赖性失败."

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


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

输出屏幕截图:

解决方案

我在Exherbo(类似于Gentoo)下使用带有3.13.1和3.14.4内核的systemd-208遇到了类​​似的问题:我的单独分区(/var ,/home,/boot甚至/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系统和服务管理器"

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

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

此问题解决后,所有分区再次挂载.

我不知道为什么不发生这种情况,或者Systemd 208不需要这样做.

EDIT: This occurs when I am trying to use a separate partition with ANY mount point, not just /var.

I am using Buildroot to build an embedded linux system. I am trying to use a separate partition for /var, but this occurs for ANY mount point. My init system is systemd, udev for device management. I've edited my fstab to:

# <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

Once the system boots, I receive a message "Expecting device dev-mmcblk0p4.device...", eventually followed by:

"Timed out waiting for device dev-mmcblk0p4.device."

"Dependency failed for /var."

"Dependency failed for Local File Systems."


Same thing happens if I use /var2, or anything else, as the mount point instead of /var. Once the boot fails, it enters emergency mode and the mount will then successfully occur. I can then exit system maintenance and everything works as expected. What is causing this delayed mount?? Have I missed a step?

Screenshot of output:

解决方案

I had a similar issue here using systemd-208 with kernel 3.13.1 and 3.14.4 under Exherbo (similar to Gentoo): my separate partitions (/var, /home, /boot and even /swap) were mounted under the desired root location. Everything worked fine. Then, upgrading to systemd 213 the boot process stopped at the point, where the partitions should have been mounted with the message: 'A start job is running for dev-sdxx.device' until timeout of 1 min 30 sec. Afterwards I was in Emergency Mode. Excerpt of

$ 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.

shows the failed attempts of mounting by systemd.

After looking up the internet I was able to find a remedy in configuring the kernel with

CONFIG_FHANDLE=y (before: n)

see 'systemd System and Service Manager' under

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

source: http://cgit.freedesktop.org/systemd/systemd/tree/README

Afterwards the problem was solved, all partitions mounted again.

I cannot tell, why this was not happening / or was not required with systemd 208.

这篇关于在启动过程中自动安装单独的分区时,systemd/udev依赖项失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆