![Ubuntu 启动时间过长(8-10 分钟)](https://linux22.com/image/935900/Ubuntu%20%E5%90%AF%E5%8A%A8%E6%97%B6%E9%97%B4%E8%BF%87%E9%95%BF%EF%BC%888-10%20%E5%88%86%E9%92%9F%EF%BC%89.png)
我在联想机器上安装了 Ubuntu 20.04(三重启动,带 Windows 10/kali 2020.4)。以下是我的硬件信息:
- 内存——8GB
- 磁盘类型 - SSD
- 磁盘空间 - 50 GB
- 架构——amd64
- 处理器 - 英特尔(酷睿 i7)第 10 代
我的 Windows 在 4-5 秒内启动,而 ubuntu 大约一个月以来一直需要 8-10 分钟,我不知道如何调试。
我运行dmesg
并得到以下日志
- 片段1:
[ 2.556631] audit: type=1400 audit(1616666280.585:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libreoffice-xpdfimport" pid=651 comm="apparmor_parser"
[ 92.015617] kauditd_printk_skb: 37 callbacks suppressed
- 片段2:
[ 127.766206] audit: type=1400 audit(1616646605.387:69): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.snap-store.snap-store" pid=3756 comm="apparmor_parser"
[ 473.393428] kauditd_printk_skb: 19 callbacks suppressed
是什么意思
kauditd_printk_skb: 抑制了 37 个回调
systemd-analyse
输出:
Startup finished in 2.426s (firmware) + 7.991s (loader) + 1.468s (kernel) + 1min 51.594s (userspace) = 2min 3.480s
graphical.target reached after 1min 51.577s in userspace
systemd-analyze blame
输出 :
21.031s plymouth-quit-wait.service
4.388s NetworkManager-wait-online.service
3.804s fwupd.service
1.730s snapd.service
1.488s fstrim.service
693ms snap-snapd-11107.mount
683ms snap-code-58.mount
619ms snap-core18-1944.mount
586ms snap-gtk\x2dcommon\x2dthemes-1514.mount
423ms snap-core18-1988.mount
403ms snap-code-59.mount
363ms dev-nvme0n1p7.device
347ms systemd-logind.service
334ms snap-core-10859.mount
283ms dev-loop0.device
239ms snap-gtk\x2dcommon\x2dthemes-1506.mount
237ms snap-snap\x2dstore-498.mount
213ms snap-canonical\x2dlivepatch-95.mount
213ms dev-loop2.device
204ms snap-gnome\x2d3\x2d34\x2d1804-60.mount
203ms snap-gnome\x2d3\x2d34\x2d1804-66.mount
200ms snap-snap\x2dstore-518.mount
193ms tuned.service
192ms dev-loop3.device
181ms dev-loop8.device
175ms systemd-resolved.service
165ms dev-loop4.device
165ms networkd-dispatcher.service
151ms systemd-timesyncd.service
148ms udisks2.service
138ms dev-loop11.device
127ms dev-loop5.device
120ms systemd-rfkill.service
117ms accounts-daemon.service
111ms systemd-fsck@dev-disk-by\x2duuid-05cdca1f\x2d6222\x2d4ec0\x2d8675\x2d862db39f842a.service
104ms upower.service
101ms apparmor.service
96ms [email protected]
88ms dev-loop9.device
88ms dev-loop7.device
87ms dev-loop12.device
79ms systemd-journal-flush.service
77ms dev-loop13.device
72ms dev-loop6.device
69ms systemd-journald.service
66ms polkit.service
66ms bluetooth.service
65ms systemd-udev-trigger.service
65ms avahi-daemon.service
61ms NetworkManager.service
60ms switcheroo-control.service
58ms systemd-udevd.service
52ms snap-core-10908.mount
51ms keyboard-setup.service
systemd-analyze critical-chain
输出 :
graphical.target @1min 51.577s
└─multi-user.target @1min 51.577s
└─snapd.seeded.service @1min 35.340s +21ms
└─basic.target @1min 30.453s
└─sockets.target @1min 30.452s
└─snapd.socket @1min 30.451s +651us
└─sysinit.target @1min 30.439s
└─systemd-timesyncd.service @1.091s +151ms
└─systemd-tmpfiles-setup.service @1.067s +21ms
└─local-fs.target @1.063s
└─run-snapd-ns-snap\x2dstore.mnt.mount @1min 35.053s
└─run-snapd-ns.mount @1min 34.150s
└─local-fs-pre.target @351ms
└─keyboard-setup.service @300ms +51ms
└─systemd-journald.socket @296ms
└─system.slice @294ms
└─-.slice @294ms
cat /etc/fstab
输出:
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme0n1p7 during installation
UUID=e1e7a401-980c-44c4-9567-cf04951b42a2 / ext4 errors=remount-ro 0 1
# /boot was on /dev/nvme0n1p8 during installation
UUID=05cdca1f-6222-4ec0-8675-862db39f842a /boot ext4 defaults 0 2
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=C0A5-904E /boot/efi vfat umask=0077 0 1
# swap was on /dev/nvme0n1p9 during installation
UUID=56534486-e9b5-4a7b-b03d-71f87ad9d8df none swap sw 0 0
我是新手,如何解决此启动延迟问题?
答案1
原来UUID
我的 的swap partition
不知何故/dev/nvme0n1p9
被更改了。我安装了它gparted
来检查我的交换分区的 UUID(/dev/nvme0n1p9
),在 中更改了它,/etc/fstab
现在启动过程正常,大约需要 5-6 秒。检查这个启动缓慢 — “正在为 dev-disk-by 运行启动作业...”解决方案以获取更多信息。
答案2
这是用于个人电脑吗,还是用于搭载关键系统?
我问这个问题的原因是,除非你得到更好的答案,否则我会重新安装 Ubuntu 并重新开始。似乎存在一些严重的冲突。我希望你能得到比这更好的答案,但我的做法是重新安装。
您询问了有关 Kauditd 的问题...请查看...https://stackoverflow.com/a/58162487
您的系统正在向外界发送有关损坏的软件包或存在冲突的系统积压事件。