Boot
什麼是邪惡的在啟動過程中花了這麼長時間?
這是 openSUSE 13.2 上的 wicked 0.6.12 和 systemd 210。未安裝網路管理器。網路介面配置有靜態 IPv4 地址。普利茅斯沒有安裝,因為我更喜歡看看發生了什麼。
開機時間長的離譜。在圖形目標出現之前,系統只是坐在那裡顯然什麼都不做。
sudo journalctl -b | ack -C 25 wicked
(時間間隔發生在 之前)的輸出11:29:01
:Nov 14 11:28:48 ascorbic lvm[458]: /dev/sdb: open failed: No medium found Nov 14 11:28:48 ascorbic lvm[458]: No volume groups found Nov 14 11:28:48 ascorbic kernel: EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: acl,user_xattr Nov 14 11:28:48 ascorbic systemd-journal[320]: Runtime journal is using 8.0M (max allowed 396.9M, trying to leave 595.3M free of 3.8G available → current limit 396.9M). Nov 14 11:28:48 ascorbic avahi-daemon[494]: Found user 'avahi' (UID 491) and group 'avahi' (GID 489). Nov 14 11:28:48 ascorbic avahi-daemon[494]: Successfully dropped root privileges. Nov 14 11:28:48 ascorbic avahi-daemon[494]: avahi-daemon 0.6.31 starting up. Nov 14 11:28:49 ascorbic kernel: vboxdrv: Found 2 processor cores. Nov 14 11:28:49 ascorbic kernel: vboxdrv: fAsync=0 offMin=0x2a8 offMax=0x17a3 Nov 14 11:28:49 ascorbic kernel: vboxdrv: TSC mode is 'synchronous', kernel timer mode is 'normal'. Nov 14 11:28:49 ascorbic kernel: vboxdrv: Successfully loaded version 4.3.18_OSE (interface 0x001a0008). Nov 14 11:28:49 ascorbic avahi-daemon[494]: Loading service file /etc/avahi/services/sftp-ssh.service. Nov 14 11:28:49 ascorbic avahi-daemon[494]: Loading service file /etc/avahi/services/ssh.service. Nov 14 11:28:49 ascorbic avahi-daemon[494]: Network interface enumeration completed. Nov 14 11:28:49 ascorbic avahi-daemon[494]: Registering HINFO record with values 'X86_64'/'LINUX'. Nov 14 11:28:49 ascorbic avahi-daemon[494]: Server startup complete. Host name is ascorbic.local. Local service cookie is 142331764. Nov 14 11:28:49 ascorbic avahi-daemon[494]: Service "ascorbic" (/etc/avahi/services/ssh.service) successfully established. Nov 14 11:28:49 ascorbic avahi-daemon[494]: Service "ascorbic" (/etc/avahi/services/sftp-ssh.service) successfully established. Nov 14 11:28:49 ascorbic kernel: NET: Registered protocol family 17 Nov 14 11:28:49 ascorbic kernel: No iBFT detected. Nov 14 11:28:49 ascorbic kernel: vboxpci: IOMMU not found (not registered) Nov 14 11:28:49 ascorbic vboxdrv[493]: Starting VirtualBox kernel modules..done Nov 14 11:28:49 ascorbic kernel: r8169 0000:03:00.0 enp3s0: link down Nov 14 11:28:49 ascorbic kernel: r8169 0000:03:00.0 enp3s0: link down Nov 14 11:28:49 ascorbic kernel: IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready Nov 14 11:28:49 ascorbic wickedd[528]: lo: address 127.0.0.1 covered by a static lease Nov 14 11:28:49 ascorbic dns-resolver[606]: ATTENTION: You have modified /etc/resolv.conf. Leaving it untouched... Nov 14 11:28:49 ascorbic dns-resolver[608]: You can find my version in /etc/resolv.conf.netconfig Nov 14 11:28:49 ascorbic wickedd[528]: dns-resolver: ATTENTION: You have modified /etc/resolv.conf. Leaving it untouched... Nov 14 11:28:49 ascorbic wickedd[528]: dns-resolver: You can find my version in /etc/resolv.conf.netconfig Nov 14 11:28:49 ascorbic wickedd[528]: ATTENTION: You have modified /etc/resolv.conf. Leaving it untouched... Nov 14 11:28:49 ascorbic wickedd[528]: You can find my version in /etc/resolv.conf.netconfig ... Nov 14 11:28:49 ascorbic wickedd[528]: subprocesses exited with error Nov 14 11:28:49 ascorbic wickedd[528]: failed to install generic settings Nov 14 11:28:49 ascorbic wickedd[528]: lo: address ::1 covered by a static lease Nov 14 11:28:49 ascorbic dns-resolver[733]: ATTENTION: You have modified /etc/resolv.conf. Leaving it untouched... Nov 14 11:28:49 ascorbic dns-resolver[735]: You can find my version in /etc/resolv.conf.netconfig Nov 14 11:28:49 ascorbic wickedd[528]: dns-resolver: ATTENTION: You have modified /etc/resolv.conf. Leaving it untouched... Nov 14 11:28:49 ascorbic wickedd[528]: dns-resolver: You can find my version in /etc/resolv.conf.netconfig Nov 14 11:28:49 ascorbic wickedd[528]: ATTENTION: You have modified /etc/resolv.conf. Leaving it untouched... Nov 14 11:28:49 ascorbic wickedd[528]: You can find my version in /etc/resolv.conf.netconfig ... Nov 14 11:28:49 ascorbic wickedd[528]: subprocesses exited with error Nov 14 11:28:49 ascorbic wickedd[528]: failed to install generic settings Nov 14 11:28:51 ascorbic kernel: r8169 0000:03:00.0 enp3s0: link up Nov 14 11:28:51 ascorbic kernel: IPv6: ADDRCONF(NETDEV_CHANGE): enp3s0: link becomes ready Nov 14 11:28:51 ascorbic avahi-daemon[494]: Joining mDNS multicast group on interface enp3s0.IPv4 with address 192.168.222.165. Nov 14 11:28:51 ascorbic avahi-daemon[494]: New relevant interface enp3s0.IPv4 for mDNS. Nov 14 11:28:51 ascorbic avahi-daemon[494]: Registering new address record for 192.168.222.165 on enp3s0.IPv4. Nov 14 11:28:51 ascorbic dns-resolver[877]: ATTENTION: You have modified /etc/resolv.conf. Leaving it untouched... Nov 14 11:28:51 ascorbic dns-resolver[879]: You can find my version in /etc/resolv.conf.netconfig Nov 14 11:28:51 ascorbic wickedd[528]: dns-resolver: ATTENTION: You have modified /etc/resolv.conf. Leaving it untouched... Nov 14 11:28:51 ascorbic wickedd[528]: dns-resolver: You can find my version in /etc/resolv.conf.netconfig Nov 14 11:28:51 ascorbic wickedd[528]: ATTENTION: You have modified /etc/resolv.conf. Leaving it untouched... Nov 14 11:28:51 ascorbic wickedd[528]: You can find my version in /etc/resolv.conf.netconfig ... Nov 14 11:28:51 ascorbic wickedd[528]: subprocesses exited with error Nov 14 11:28:51 ascorbic wickedd[528]: failed to install generic settings Nov 14 11:28:52 ascorbic avahi-daemon[494]: Joining mDNS multicast group on interface enp3s0.IPv6 with address fe80::5246:5dff:fea0:251e. Nov 14 11:28:52 ascorbic avahi-daemon[494]: New relevant interface enp3s0.IPv6 for mDNS. Nov 14 11:28:52 ascorbic avahi-daemon[494]: Registering new address record for fe80::5246:5dff:fea0:251e on enp3s0.*. Nov 14 11:29:01 ascorbic wicked[532]: lo up Nov 14 11:29:01 ascorbic wicked[532]: enp3s0 up Nov 14 11:29:01 ascorbic sshd-gen-keys-start[969]: Checking for missing server keys in /etc/ssh Nov 14 11:29:01 ascorbic cron[967]: (CRON) INFO (Syslog will be used instead of sendmail.) Nov 14 11:29:01 ascorbic cron[967]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 95% if used.) Nov 14 11:29:01 ascorbic cron[967]: (CRON) INFO (running with inotify support) Nov 14 11:29:01 ascorbic iscsiadm[981]: iscsiadm: No records found Nov 14 11:29:01 ascorbic sshd[982]: Server listening on 0.0.0.0 port 22. Nov 14 11:29:01 ascorbic sshd[982]: Server listening on :: port 22. Nov 14 11:29:01 ascorbic chronyd[986]: chronyd version 1.29.1 starting Nov 14 11:29:01 ascorbic chronyd[986]: Could not open RTC file (null) for reading Nov 14 11:29:01 ascorbic chronyd[986]: Set system time, error in RTC = 0.000000 Nov 14 10:29:01 ascorbic chronyd[986]: Linux kernel major=3 minor=16 patch=6 Nov 14 10:29:01 ascorbic chronyd[986]: hz=100 shift_hz=7 freq_scale=1.00000000 nominal_tick=10000 slew_delta_tick=833 max_tick_bias=1000 shift_pll=2 Nov 14 10:29:01 ascorbic chronyd[986]: Frequency 10.585 +/- 0.080 ppm read from /var/lib/chrony/drift Nov 14 10:29:01 ascorbic chronyd[986]: Can't initialise from real time clock, driver not loaded Nov 14 10:29:01 ascorbic chronyd[974]: Starting chronyd: ..done Nov 14 10:29:01 ascorbic display-manager[987]: /etc/vconsole.conf available Nov 14 10:29:01 ascorbic display-manager[987]: KEYMAP: de-latin1-nodeadkeys Nov 14 10:29:01 ascorbic display-manager[987]: Command: localectl set-keymap de-latin1-nodeadkeys Nov 14 10:29:01 ascorbic dbus[505]: [system] Activating via systemd: service name='org.freedesktop.locale1' unit='dbus-org.freedesktop.locale1.service' Nov 14 10:29:01 ascorbic dbus[505]: [system] Successfully activated service 'org.freedesktop.locale1' Nov 14 10:29:01 ascorbic display-manager[987]: Starting service kdm..done Nov 14 10:29:01 ascorbic pdns_recursor[973]: PowerDNS Recursor 3.6.2 (jenkins@autotest.powerdns.com) (C) 2001-2014 PowerDNS.COM BV Nov 14 10:29:01 ascorbic pdns_recursor[973]: Using 64-bits mode. Built on 20141030174804 by abuild@cloud108, gcc 4.8.1 20130909 [gcc-4_8-branch revision 202388]. Nov 14 10:29:01 ascorbic pdns_recursor[973]: PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2. Nov 14 10:29:01 ascorbic pdns_recursor[973]: Reading random entropy from '/dev/urandom'
DHCP 超時需要很長時間。編輯和更改和
/etc/sysconfig/network/dhcp
的值。DHCLIENT_WAIT_AT_BOOT``DHCLIENT6_WAIT_AT_BOOT
嘗試執行
systemd-analyze critical-chain
。我認為輸出比日誌更容易閱讀。好吧,它可能只是證實 wicked 是罪魁禍首。我還沒有 wicked 的經驗,但我會嘗試在 strace 下啟動它以查看它掛起/超時的位置,或者並行執行 tcpdump 以查看它試圖在網上做什麼。編輯:哎呀,我錯過了你的情節連結。所以我猜關鍵鏈確實只會表明 wicked 是罪魁禍首……所以試試 strace 和/或 tcpdump。
Edit2:使用 strace 我會嘗試
ExecStart=/usr/bin/strace -ff -o /tmp/wicked.str -ttt -T /usr/sbin/wicked --systemd ifup all
在邪惡的單位文件中。
免責聲明:未經測試。抱歉,手頭沒有合適的測試系統。