大网数据广告活动
服务器运维问答

fsck on boot leads to systemd dependency failure and subsequent boot failure

· 52CE 我爱测

If a fsck takes longer than 90 seconds during boot, the systemd unit times out and the system falls into emergency mode. This is obviously very unfortunate with headless devices without KVM, as the issue cannot not be fixed or at…

问题原文

原帖链接 · Zulakis · CC BY-SA 4.0

If a fsck takes longer than 90 seconds during boot, the systemd unit times out and the system falls into emergency mode. This is obviously very unfortunate with headless devices without KVM, as the issue cannot not be fixed or atleast diagnosed from the outside.

The exact lines given are:

[ TIME ] Timed out waiting for device dev-disk-by-partuuid-xxx
[DEPEND] Dependency failed for /boot
[DEPEND] Dependency failed for Local File Systems.
[DEPEND] Dependency failed for File System Check on /dev/disk/bypartuuid/xxx

The offending partition is the boot-partition (FAT-filesystem) on a raspberry pi. Even though the partition is only 41MB big, the fs-check takes longer than 90 seconds. I've never had this issue with ext2/3/4-partitions.

How can I fix this issue?

已采纳解答

原帖链接 · Zulakis · CC BY-SA 4.0

I found two methods to fix this:

a)

Increase DefaultTimeoutStartSec and DefaultTimeoutStopSec in /etc/systemd/system.conf.

b)

Add x-systemd.device-timeout=300s to the /etc/fstab options of the offending partition

This did not work:

  • adding a TimeoutSec line to /lib/systemd/system/systemd-fsck@.service
  • adding a JobTimeoutSec line to /lib/systemd/system/local-fs.target

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-08-25)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。