anx*_*anx 5 boot mount upstart
我正在尝试在 14.04.2 LTS 上调试一个不连续/挂起的系统启动(新贵)。root 是 luks 容器中的 ext4 文件系统。文件系统处于干净状态。
启动过程在 upstart-socket-bridge 之后停止(不一定在该特定服务之后,例如安装 cups-daemon 之后,它就停止了)。init -v
也不是很有帮助。唯一不只是记录各种服务的启动/停止的日志条目是关于 init 之前的 udev。
Begin: Running /scripts/init-bottom ... done.
udev exit failed --rc=2
Run Code Online (Sandbox Code Playgroud)
(编辑)重新安装根 rw 最初似乎总是导致干净启动,但事实是,它有点不可预测,无论哪种方式我都失败并成功启动。什么?
观察:一切似乎都很好,系统只是不重新挂载可写的 root 或继续引导。
问:我如何确定导致启动过程卡住的服务有问题?
initctl list
在挂断后运行,这些是正在运行的作业mountnfs-bootclean.sh start/running
udev start/running, process 438
upstart-udev-bridge start/running, process 432
plymouth start/running, process 122
resolvconf start/running
ssh start/running, process 767 <-- this one was manually started
mountall start/running, process 337
mountkernfs.sh start/running
mountnfs.sh start/running
bootmisc.sh start/running
upstart-socket-bridge start/running, process 745**
cryptdisks start/running
mountdevsubfs.sh start/running
mtab.sh start/running
network-interface (lo) start/running
network-interface (eth0) start/running
plymouth-ready (startup) start/running, process 315
plymouth-upstart-bridge start/running, process 316
mountall-bootclean.sh start/running
network-interface-security (network-interface/eth0) start/running
network-interface-security (network-interface/lo) start/running
Run Code Online (Sandbox Code Playgroud)
init 5
用来让卡住的系统继续正常启动。看来是ureadahead
s的错。清除它导致 5 个干净的靴子没有任何问题。我将把这个问题(和 100 个额外的代表)留给任何感兴趣或知道原始问题答案的人:如果不是通过随机试验,我本可以解决这个问题。
作为参考,我尝试过的(不成功的)调试步骤,但对其他人很有用:
sash
,然后更改内核命令行(在 grub 中使用 e 键或编辑 grub.cfg/cmdline.txt)并添加init=/bin/sash
,重新引导,检查该 shell 上的情况,然后使用exec init
继续引导init
与交换机一起使用-v
以增加日志记录mount -o remount,rw /
) - 这允许更多日志记录/var/log/upstart
getty -n -l /bin/bash 38400 tty2 &
- 这有助于检查系统所处的状态(例如ps -Af
,iotop
)initctl list
确定哪些服务处于哪个状态 归档时间: |
|
查看次数: |
1952 次 |
最近记录: |