![Ubuntu 启动需要很长时间](https://linux22.com/image/890399/Ubuntu%20%E5%90%AF%E5%8A%A8%E9%9C%80%E8%A6%81%E5%BE%88%E9%95%BF%E6%97%B6%E9%97%B4.png)
我目前在使用 Ubuntu 16.04 时遇到了一个问题,就是启动时间太长了。以前启动时间大约为 10-15 秒,但现在需要一分钟以上。我有以下日志文件,但我不知道该怎么做才能解决这个问题。我刚开始使用 Ubuntu,所以请考虑一下。
文件:https://drive.google.com/file/d/0B-9K5tqHdJPEUW9sdGsyb3EwSU0/view?usp=sharing
编辑,内容/etc/fstab
:
# /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/sda1 during installation
UUID=ecad285f-b614-47b5-981b-95b29a1a3fbf / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sdb1 during installation
#UUID=62C8-F74B /boot/efi vfat umask=0077 0 1
# swap was on /dev/sda2 during installation
UUID=9ac7eade-b72b-492f-8551-5b887cfbdc13 none swap sw 0 0
# swap was on /dev/sdb3 during installation
UUID=09a31adc-9b70-4b13-8dc6-6623b43398e2 none swap sw 0 0
UUID=B208-F7D9 /boot/efi vfat defaults 0 1
答案1
您那里有 2 个交换分区。使用 gparted 删除一个。在终端中执行以下操作:
cat /proc/swaps
查看哪一个已安装并删除另一个。
然后在fstab中删除它
sudo nano /etc/fstab
Ctrl+O保存,Ctrl+X退出并重新启动。
答案2
查看日志---方括号中的数字是秒数:
[ 15.039685] audit: type=1400 audit(1485495450.622:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/cupsd//third_party" pid=739 comm="apparmor_parser"
[ 15.040640] audit: type=1400 audit(1485495450.622:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/ippusbxd" pid=740 comm="apparmor_parser"
[ 15.257862] Adding 4095996k swap on /dev/sda2. Priority:-1 extents:1 across:4095996k FS
[ 99.312609] vboxdrv: module verification failed: signature and/or required key missing - tainting kernel
[ 99.316717] vboxdrv: Found 4 processor cores
..似乎延迟发生在交换激活之后,这可能是分区挂载。
您是否尝试安装一些网络共享或类似的东西?
另一个可能的罪魁祸首可能是 VirtualBox --- 但我不知道为什么。
在我的系统中,交换激活后立即systemd-udevd
启动:
[ 7.254716] Adding 16383996k swap on /dev/sda2. Priority:-1 extents:1 across :16383996k SSFS
[ 7.344977] systemd-udevd[382]: starting version 204
[ 7.390723] lp: driver loaded but no devices found
[ 7.407371] smsc47b397: found SMSC SCH5317 (base address 0x0480, revision 1)
[ 7.408311] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
因此可能是设备出现故障,或者磁盘本应存在但却不存在。请编辑您的问题并添加 的内容/etc/fstab
。