最近
Debian
系统启动非常耗时,每次启动都要等待1分30秒的任务超时才能启动,屏幕显示“A start job is running for /dev/disk/by-uuid/...a71b-4040-9b53-e92525f6803e
”,如下图:
1 2 3 4 5 6 7 8 |
$ sudo cat /var/log/syslog | grep disk ................ Aug 15 00:01:34 debian udisksd[597]: Unmounted /dev/sr0 on behalf of uid 1000 Aug 15 00:02:06 debian systemd[1]: dev-disk-by\x2duuid-197c3d31\x2da71b\x2d4040\x2d9b53\x2de92525f6803e.device: Job dev-disk-by\x2duuid-197c3d31\x2da71b\x2d4040\x2d9b53\x2de92525f6803e.device/start timed out. Aug 15 00:02:06 debian systemd[1]: Timed out waiting for device /dev/disk/by-uuid/197c3d31-a71b-4040-9b53-e92525f6803e. Aug 15 00:02:06 debian systemd[1]: Dependency failed for /dev/disk/by-uuid/197c3d31-a71b-4040-9b53-e92525f6803e. Aug 15 00:02:06 debian systemd[1]: dev-disk-by\x2duuid-197c3d31\x2da71b\x2d4040\x2d9b53\x2de92525f6803e.swap: Job dev-disk-by\x2duuid-197c3d31\x2da71b\x2d4040\x2d9b53\x2de92525f6803e.swap/start failed with result 'dependency'. Aug 15 00:02:06 debian systemd[1]: dev-disk-by\x2duuid-197c3d31\x2da71b\x2d4040\x2d9b53\x2de92525f6803e.device: Job dev-disk-by\x2duuid-197c3d31\x2da71b\x2d4040\x2d9b53\x2de92525f6803e.device/start failed with result 'timeout'. |
查询磁盘挂载信息如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
$ cat /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=c24d55e5-45f6-4520-adea-ef08fcd762f4 / ext4 errors=remount-ro 0 1 # swap was on /dev/sda5 during installation UUID=197c3d31-a71b-4040-9b53-e92525f6803e none swap sw 0 0 /dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0 /dev/sr1 /media/cdrom1 udf,iso9660 user,noauto 0 0 |
可见 UUID=197c3d31-a71b-4040-9b53-e92525f6803e
的设备是系统安装时候的一个交换分区,这个分区其实已经不存在了。我们只需要移除这个分区即可。
执行如下命令:
1 |
$ sudo sed -i 's/UUID=197c3d31/# UUID=197c3d31/g' /etc/fstab |