红联Linux门户
Linux帮助

ubuntu16.04系统每次开机都会有1分30秒的等待时间

发布时间:2016-04-28 11:28:57来源:linux网站作者:谈小龙

ubuntu16.04系统每次开机都会有1分30秒的等待时间, 按f12 显示 A start job is running for dev-disk-by/x2uuid-7ea*.device(**/1min30s )


搜索一下发现是磁盘交换分区的问题, 首先查看磁盘挂载列表:

mrtan@mrtan:~$ cat /etc/fstab

# 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/sdb1 during installation
UUID=c1cde614-8bc5-418d-b139-4ca7aa3ab2e1 / ext4    errors=remount-ro 0 1
# swap was on /dev/sda2 during installation
UUID=7ae87bd9-c01a-49f4-8324-dfee69416d35 none swap    sw 0 0
# swap was on /dev/sdb5 during installation
UUID=65990696-e85b-46b6-a90d-41726b0bb98b none swap    sw 0 0
#/server on /dev/sd4
UUID=daad101f-a97c-4ffb-ac51-26b0b8414a63 /server ext4    defaults 0 2

发现存在两个交换分区,而且其中一个uuid就是开机耽误时间的那个。


查看所有的磁盘uuid:

mrtan@mrtan:~$ sudo blkid

/dev/sda1: UUID="5156b171-5f73-4dcc-b5dd-b721a5a04bd3" TYPE="ext4" PARTUUID="abdd42ba-5100-49ea-9a0a-703d927f7a26"
/dev/sda4: UUID="daad101f-a97c-4ffb-ac51-26b0b8414a63" TYPE="ext4" PARTUUID="e6441575-b44e-4027-a84e-12102be0cc14"
/dev/sdb1: UUID="c1cde614-8bc5-418d-b139-4ca7aa3ab2e1" TYPE="ext4" PARTUUID="c77d2ef7-01"
/dev/sdb5: UUID="65990696-e85b-46b6-a90d-41726b0bb98b" TYPE="swap" PARTUUID="c77d2ef7-05"
/dev/sdc1: UUID="2016-04-20-22-29-52-00" LABEL="Ubuntu 16.04 LTS amd64" TYPE="iso9660" PTUUID="0e0e8e70" PTTYPE="dos" PARTUUID="0e0e8e70-01"
/dev/sdc2: SEC_TYPE="msdos" UUID="B1F5-0A13" TYPE="vfat" PARTUUID="0e0e8e70-02"


发现并没有开机检查的那个磁盘的uuid,于是:

mrtan@mrtan:~$ sudo vim /etc/fstab

注释掉那个多余的交换分区,重启系统:

mrtan@mrtan:~$ sudo rebot

解决问题。


本文永久更新地址:http://www.linuxdiyf.com/linux/20170.html