Linux 在启动过程中暂停 2 分钟

Linux 在启动过程中暂停 2 分钟

我的 Ubuntu Ubuntu 20.04.1 出现了一个奇怪的问题。实际上发布版本并不重要,因为这个问题甚至在发布升级之前就存在了。每次启动时,系统都会执行 2 分钟的操作。dmesg 显示以下内容:

[    3.882138] ata3.00: ATA-10: ST2000DM008-2FR102, 0001, max UDMA/133
[    3.882831] ata3.00: 3907029168 sectors, multi 16: LBA48 NCQ (depth 32), AA
[    3.933436] ata3.00: configured for UDMA/133
[    3.934299] scsi 2:0:0:0: Direct-Access     ATA      ST2000DM008-2FR1 0001 PQ: 0 ANSI: 5
[    3.935284] sd 2:0:0:0: Attached scsi generic sg1 type 0
[    3.935293] sd 2:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[    3.936220] scsi 3:0:0:0: Direct-Access     ATA      ST2000DX002-2DV1 CC41 PQ: 0 ANSI: 5
[    3.936749] sd 2:0:0:0: [sdb] 4096-byte physical blocks
[    3.937663] sd 3:0:0:0: Attached scsi generic sg2 type 0
[    3.937710] sd 3:0:0:0: [sdc] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[    3.937711] sd 3:0:0:0: [sdc] 4096-byte physical blocks
[    3.937719] sd 3:0:0:0: [sdc] Write Protect is off
[    3.937720] sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
[    3.937732] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.938193] sd 2:0:0:0: [sdb] Write Protect is off
[    3.942949] sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[    3.942960] sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.951078]  sdc: sdc1
[    3.951910] sd 3:0:0:0: [sdc] Attached SCSI disk
[    3.991298] sd 2:0:0:0: [sdb] Attached SCSI disk
[    4.013571] random: fast init done
[    4.028472] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    4.028473] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    4.028504] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    4.153986] raid6: sse2x4   gen() 15011 MB/s
[    4.201978] raid6: sse2x4   xor() 10212 MB/s
[    4.249981] raid6: sse2x2   gen() 12737 MB/s
[    4.297979] raid6: sse2x2   xor()  8628 MB/s
[    4.345979] raid6: sse2x1   gen() 10930 MB/s
[    4.393982] raid6: sse2x1   xor()  7474 MB/s
[    4.394456] raid6: using algorithm sse2x4 gen() 15011 MB/s
[    4.394916] raid6: .... xor() 10212 MB/s, rmw enabled
[    4.395369] raid6: using ssse3x2 recovery algorithm
[    4.396664] xor: automatically using best checksumming function   avx
[    4.397942] async_tx: api initialized (async)
[    4.405574] device-mapper: raid: Loading target version 1.14.0
[    4.428421] md/raid1:mdX: active with 2 out of 2 mirrors
[    9.604725] random: crng init done
[    9.605236] random: 8 urandom warning(s) missed due to ratelimiting
[  120.809255] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[  132.661535] systemd[1]: Inserted module 'autofs4'

/etc/fstab输出:

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
UUID=5b736f72-d735-45ca-a5db-fd0a4eef2fa7 /               ext4    errors=remount-ro 0       1
UUID=C824-BAB7  /boot/efi       vfat    defaults      0       1
UUID=d986c290-d182-474b-a05b-91b649aea538                                 none            swap    sw              0       0
UUID=942e0b01-4bf8-4dfe-a9ee-5d4a59dcb0ce       /mnt/mirror     ext4    errors=remount-ro,x-systemd.device-timeout=300 01
UUID=f2c269d7-9346-4686-b697-325d44ad1023       /mnt/storage    ext4    errors=remount-ro       0       1

当我在启动期间查看监视器时,我看到一些关于检查根文件系统的信息。但后来我在日志中的任何地方都找不到此条目。此外,在这 2 分钟的暂停期间,我听到 HDD 的使用率很高,尽管我的根文件系统位于 SDD 上(我有 2 个镜像 HDD)。

会是什么问题呢?虽然不是大问题,但还是有点烦人。

答案1

此消息通常是由于某些原因耗尽了系统上的熵池而导致的。这通常会随着时间的推移通过各种操作(例如磁盘活动、键盘计时、鼠标移动等)重新填充。最简单的解决方案是使用类似以下内容的方法haveged

apt-get install haveged

要使其在启动时启动,请使用以下命令:

update-rc.d haveged defaults

相关内容