Ubuntu 16.04 启动缓慢

Ubuntu 16.04 启动缓慢

首先,抱歉,我的英语不好。

这个问题在这里被问过很多次了,但我看到的现有答案都没有帮助。最近我的 Ubuntu 启动非常慢,我无法确定问题所在。

我的电脑:

HP 笔记本电脑

处理器:Intel® Core™ i5-6200U CPU @ 2.30GHz × 4

显卡:英特尔® 高清显卡 520 (Skylake GT2)

6GB 内存

驱动器:1 TB HDD(Ubuntu 的 200 GB 分区)

以下是关键链:

graphical.target @22.883s
└─multi-user.target @22.883s
  └─getty.target @22.883s
    └─[email protected] @22.883s
      └─rc-local.service @22.875s +1ms
        └─network-online.target @22.875s
          └─network.target @19.124s
            └─wpa_supplicant.service @20.581s +210ms
              └─basic.target @16.851s
                └─sockets.target @16.851s
                  └─snapd.socket @16.825s +25ms
                    └─sysinit.target @16.800s
                      └─swap.target @16.800s
                        └─dev-disk-by\x2duuid-dd0eab86\x2d0736\x2d4b29\x2d96db\x2d248bbda4b5fd.swap @16.799s
                          └─dev-disk-by\x2duuid-dd0eab86\x2d0736\x2d4b29\x2d96db\x2d248bbda4b5fd.device @16.601s

以下是 systemd-analyze blame 的顶部:

     14.133s dev-sda6.device
     12.085s ufw.service
      8.470s systemd-udevd.service
      4.863s grub-common.service
      4.803s irqbalance.service
      4.759s apport.service
      4.749s ondemand.service
      4.748s speech-dispatcher.service
      4.543s lightdm.service
      3.748s NetworkManager-wait-online.service
      3.341s systemd-tmpfiles-setup-dev.service
      3.201s ModemManager.service
      3.124s snapd.service
      2.939s accounts-daemon.service
      2.077s [email protected]
      1.969s NetworkManager.service
      1.657s keyboard-setup.service
      1.318s systemd-modules-load.service
      1.239s thermald.service
      1.102s systemd-journald.service
       844ms sys-kernel-debug.mount

Fstab 和 blkid 显示匹配的 UUID 如下所示(/dev/sda6 是安装 Ubuntu 的分区):

系统状态

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda6 during installation
UUID=ab656f95-a5bc-474e-b32e-dd5fd628df0c /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
# UUID=82F4-308F  /boot/efi       vfat    umask=0077      0       2
# swap was on /dev/sda7 during installation
UUID=dd0eab86-0736-4b29-96db-248bbda4b5fd none            swap    sw              0       0
/dev/disk/by-uuid/e37e65a4-be47-4d23-ae24-f6b594e1af73 /mnt/e37e65a4-be47-4d23-ae24-f6b594e1af73 auto nosuid,nodev,nofail,noauto 0 0
/dev/disk/by-uuid/5236F1FE36F1E341 /mnt/5236F1FE36F1E341 auto nosuid,nodev,nofail,noauto 0 0

和 blkid:

/dev/sda1: UUID="82F4-308F" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="c9c3486b-c904-4c41-add9-fe592e5f80c7"
/dev/sda2: PARTLABEL="Microsoft reserved partition" PARTUUID="407c2ae6-5977-4e64-885f-f3d2d17f6f82"
/dev/sda3: LABEL="Windows" UUID="5236F1FE36F1E341" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="977a7aba-d73c-4a4b-ac90-eaaff77a8d48"
/dev/sda4: LABEL="Windows RE tools" UUID="723A90143A8FD40F" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="05b2b999-21a8-4c9e-b0ff-fbc31fb5553e"
/dev/sda5: LABEL="RECOVERY" UUID="F89A631C9A62D722" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="7e8d4340-8605-421d-9171-1513af182d23"
/dev/sda6: UUID="ab656f95-a5bc-474e-b32e-dd5fd628df0c" TYPE="ext4" PARTUUID="90367f00-0a2b-4953-8719-3bf793a7d6e6"
/dev/sda7: UUID="dd0eab86-0736-4b29-96db-248bbda4b5fd" TYPE="swap" PARTUUID="4ed3d6b5-0a84-4d22-90c3-914c4cab03fd"
/dev/sda8: PARTUUID="88586d67-7d48-43ad-87b7-ec151c78b3a1"
/dev/sda9: UUID="e37e65a4-be47-4d23-ae24-f6b594e1af73" TYPE="ext4" PARTUUID="227c7963-f676-4d86-bb73-06b1a54ca4fb"

任何帮助都非常感谢!如果我能提供更多信息,请告诉我。

编辑:

来自 dmesg 的片段:

[    7.770069] lp: driver loaded but no devices found
[    7.795242] ppdev: user-space parallel port driver
[    8.092089] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   18.504979] EXT4-fs (sda6): re-mounted. Opts: errors=remount-ro
[   18.527181] systemd-journald[247]: Received request to flush runtime journal from PID 1

存在某种安装问题吗?

编辑2:

systemd 分析时间:

Startup finished in 3.660s (firmware) + 3.717s (loader) + 4.267s (kernel) + 23.213s (userspace) = 34.859s

答案1

我建议两件事:

  • fsck(文件系统检查)你的硬盘
  • 暂时注释掉 /etc/fstab 中的两个挂载

要检查 Ubuntu 分区上的文件系统...

  • 启动到 GRUB 菜单
  • 选择高级选项
  • 选择恢复模式
  • 选择 Root 访问
  • 在 # 提示符下,输入sudo fsck -f /
  • fsck如果有错误则重复命令
  • 类型reboot

并尝试使用 /etc/fstab 中注释掉的这些行进行测试...

注意:使用上述方法进入 root 提示符。您可能必须手动将驱动器重新安装为 r/w,以便sudo mount -o rw,remount /能够编辑/保存编辑,然后sudo pico /etc/fstab

/dev/disk/by-uuid/e37e65a4-be47-4d23-ae24-f6b594e1af73 /mnt/e37e65a4-be47-4d23-ae24-f6b594e1af73 auto nosuid,nodev,nofail,noauto 0 0
/dev/disk/by-uuid/5236F1FE36F1E341 /mnt/5236F1FE36F1E341 auto nosuid,nodev,nofail,noauto 0 0

相关内容