更换计算机机箱并移除网卡和 PCI ATA 控制器后,我无法启动 Ubuntu。
在此之前,它在几秒钟内就开始了:
Feb 1 09:02:20 mkskomp systemd[1]: Startup finished in 3.442s (kernel) + 11.089s (userspace) = 14.532s.
现在花费的时间几乎是原来的 5 倍,超过一分钟:
Feb 5 21:55:19 mkskomp systemd[1]: Startup finished in 58.857s (kernel) + 12.129s (userspace) = 1min 10.986s.
我syslog
没有发现任何问题。如何以及在哪里可以找到问题所在?
系统版本:
mks@mkskomp:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
信息:
mks@mkskomp:~$ systemd-analyze blame | head -n 20
8.129s NetworkManager-wait-online.service
7.518s apt-daily.service
849ms dev-sda2.device
628ms ModemManager.service
461ms nmbd.service
431ms accounts-daemon.service
421ms samba-ad-dc.service
368ms gpu-manager.service
368ms grub-common.service
344ms networking.service
326ms timidity.service
310ms thermald.service
299ms apport.service
279ms speech-dispatcher.service
271ms ondemand.service
240ms pppd-dns.service
238ms rsyslog.service
235ms systemd-user-sessions.service
213ms NetworkManager.service
195ms avahi-daemon.service
我发现命令 dmesg 显示了系统启动时发生的情况。这是什么意思?
[ 2.665226] scsi 0:0:0:0: Direct-Access ATA GOODRAM 22.3 PQ: 0 ANSI: 5
[ 2.665499] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 2.665524] sd 0:0:0:0: [sda] 468862128 512-byte logical blocks: (240 GB/224 GiB)
[ 2.665804] sd 0:0:0:0: [sda] Write Protect is off
[ 2.665807] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 2.665906] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 2.668204] sda: sda1 sda2 sda3
[ 2.668480] sd 0:0:0:0: [sda] Attached SCSI disk
[ 2.992139] clocksource: Switched to clocksource tsc
[ 7.703694] ata2.00: link is slow to respond, please be patient (ready=0)
[ 11.175502] ata2.00: SRST failed (errno=-16)
[ 12.523436] ata2.01: failed to resume link (SControl 0)
[ 17.719139] ata2.00: link is slow to respond, please be patient (ready=0)
[ 21.190947] ata2.00: SRST failed (errno=-16)
[ 22.538882] ata2.01: failed to resume link (SControl 0)
[ 27.734583] ata2.00: link is slow to respond, please be patient (ready=0)
[ 56.237002] ata2.00: SRST failed (errno=-16)
[ 56.237009] ata2.00: limiting SATA link speed to 1.5 Gbps
[ 56.237014] ata2.01: limiting SATA link speed to 1.5 Gbps
[ 57.584931] ata2.01: failed to resume link (SControl 0)
[ 57.740987] ata2.00: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 57.740999] ata2.01: SATA link down (SStatus 0 SControl 0)
[ 57.782855] ata2.00: ATA-7: ST3250620AS, 3.AAC, max UDMA/133
[ 57.782859] ata2.00: 488397168 sectors, multi 0: LBA48 NCQ (depth 0/32)
[ 57.849488] ata2.00: configured for UDMA/133
[ 57.849648] scsi 1:0:0:0: Direct-Access ATA ST3250620AS C PQ: 0 ANSI: 5
[ 57.849887] sd 1:0:0:0: Attached scsi generic sg1 type 0
[ 57.849902] sd 1:0:0:0: [sdb] 488397168 512-byte logical blocks: (250 GB/233 GiB)
[ 57.850006] sd 1:0:0:0: [sdb] Write Protect is off
答案1
问题出在第二张光盘(SDB)上。当我更换 SATA 端口时,问题就消失了。
2 月 17 日 13:50:42 mkskomp systemd[1]: 启动完成用时 4.111 秒(内核)+ 14.636 秒(用户空间)= 18.748 秒。