为什么启动过程不断引用驱动器/分区?

为什么启动过程不断引用驱动器/分区?

我最近用一块 4TB 的硬盘替换了两块 1TB 的硬盘。

为了确保新驱动器能够冗余工作,我测试了该nofail选项(请参阅fstab 手册页了解详情)。我会关闭系统,拔下驱动器,然后查看系统是否仍能启动。在测试期间,我遇到了启动过程中的冻结。一旦我成功启动,系统就会在进入锁定屏幕后挂断。

现在情况似乎稳定了。我使用以下命令查看了日志:journalctl,但我不确定要寻找什么,程序输出了数百行信息。

然后我尝试了一下sudo cat /var/log/boot.log,结果如下:

[**    ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[***   ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[ ***  ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[  *** ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[   ***] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[    **] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[     *] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[    **] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[   ***] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[  *** ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[ ***  ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[***   ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[**    ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[*     ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[**    ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[***   ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[ ***  ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[  *** ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[   ***] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[    **] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[     *] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[    **] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[   ***] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[  *** ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[ ***  ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[***   ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[**    ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[*     ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[**    ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[***   ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[ ***  ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[  *** ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[   ***] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[    **] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[     *] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[    **] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[   ***] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[  *** ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[ ***  ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[***   ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[**    ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[*     ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[**    ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[***   ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[ ***  ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[  *** ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[   ***] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[    **] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[     *] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[    **] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[   ***] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…35\x2d43a7\[  *** ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…5\x2d43a7\x[ ***  ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…5\x2d43a7\x[***   ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…2d43a7\x2d9[**    ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…2d43a7\x2d9[*     ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…2d43a7\x2d9[**    ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…2d43a7\x2d9[***   ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…2d43a7\x2d9[ ***  ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…2d43a7\x2d9[  *** ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…2d43a7\x2d9[   ***] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…2d43a7\x2d9[    **] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…2d43a7\x2d9[     *] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…2d43a7\x2d9[    **] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…2d43a7\x2d9[   ***] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…2d43a7\x2d9[  *** ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…2d43a7\x2d9[ ***  ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…2d43a7\x2d9[***   ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…2d43a7\x2d9[**    ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…2d43a7\x2d9[*     ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…2d43a7\x2d9[**    ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…2d43a7\x2d9[***   ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[ ***  ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[  *** ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[   ***] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[    **] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[     *] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[    **] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[   ***] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[  *** ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[ ***  ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[***   ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[**    ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[*     ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[**    ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[***   ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[ ***  ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[  *** ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[   ***] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[    **] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[     *] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[    **] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[   ***] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[  *** ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[ ***  ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[***   ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[**    ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[*     ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[**    ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[***   ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[ ***  ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[  *** ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[   ***] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[    **] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[     *] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[    **] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[   ***] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[  *** ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[ ***  ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[***   ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[**    ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[*     ] A start job is running for dev-disk-by\x2duuid-168dfcf7\x2d…d43a7\x2d9a[ TIME ] Timed out waiting for device dev-disk-by\x2duuid-168dfcf7\x2d7635\x2d43a7\x2d9a22\x2dcce4598b8844.device.
[DEPEND] Dependency failed for File System Check on /dev/disk/by-uuid/168dfcf7-7635-43a7-9a22-cce4598b8844.
[DEPEND] Dependency failed for /mnt/media2.
[DEPEND] Dependency failed for Local File Systems.
[DEPEND] Dependency failed for Clean up any mess left by 0dns-up.
         Starting Set console font and keymap...
[  OK  ] Reached target Bluetooth.
[  OK  ] Reached target Login Prompts.
         Starting Set console scheme...
[  OK  ] Started Stop ureadahead data collection 45s after completed startup.
[  OK  ] Closed Syslog Socket.
[  OK  ] Reached target Timers.
         Starting Tell Plymouth To Write Out Runtime Data...
         Starting Create Volatile Files and Directories...
         Starting AppArmor initialization...
[  OK  ] Started Emergency Shell.
[  OK  ] Reached target Emergency Mode.
[  OK  ] Reached target Paths.
[  OK  ] Reached target Sockets.
[  OK  ] Started Set console font and keymap.
[  OK  ] Started Set console scheme.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Started Create Volatile Files and Directories.
         Starting Update UTMP about System Boot/Shutdown...
         Starting Network Name Resolution...
         Starting Network Time Synchronization...
[  OK  ] Started Tell Plymouth To Write Out Runtime Data.
[  OK  ] Started Update UTMP about System Boot/Shutdown.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.
[  OK  ] Started Network Name Resolution.
[  OK  ] Reached target Host and Network Name Lookups.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Started AppArmor initialization.
         Starting Raise network interfaces...
[  OK  ] Started Raise network interfaces.
[  OK  ] Reached target Network.
[  OK  ] Reached target Network is Online.

当我再次运行该命令时,我得到了相同的输出,除了第一行的重复部分。UUID(168dfcf7-7635-43a7-9a22-cce4598b8844)是替换硬盘之一上的唯一分区。它实际上仍然存在 - 虽然被注释掉了 - 在我的/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/sda2 during installation
UUID=766c6a6f-98fc-4c26-868c-c2d542ad373a /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=4DD5-F9C6  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/sda3 during installation
UUID=09724afe-6b53-4b29-afb8-0760ed0a1b01 /home           ext4    defaults        0       2
/swapfile                                 none            swap    sw              0       0

#UUID=3fe702f9-bf22-4690-99c4-d7dc5be8079b  /mnt/media  ext4    defaults    0   2
#UUID=168dfcf7-7635-43a7-9a22-cce4598b8844  /mnt/media2 ext4    defaults    0   2
UUID=41aed6f4-8336-48ef-95d0-9911d81e9f75   /mnt/vault  ext4    defaults,nofail 0   2

为什么启动过程会引用该驱动器/分区?我没有正确地将其从系统中删除吗?我以为将其从文件中注释掉/etc/fstab就足够了?这是否与我在测试较大硬盘时遇到的系统不稳定有关?

笔记:操作系统安装在单独的固态硬盘上。

输出内容如下sudo lsblk -f

NAME   FSTYPE  LABEL     UUID                                 MOUNTPOINT
loop0  squashf                                                /snap/gnome-logs/4
loop1  squashf                                                /snap/gnome-calcul
loop2  squashf                                                /snap/gnome-system
loop3  squashf                                                /snap/gnome-calcul
loop4  squashf                                                /snap/gnome-3-26-1
loop5  squashf                                                /snap/gnome-logs/6
loop6  squashf                                                /snap/gtk-common-t
loop7  squashf                                                /snap/core/7270
loop8  squashf                                                /snap/gnome-3-28-1
loop9  squashf                                                /snap/core/7396
loop10 squashf                                                /snap/gnome-charac
loop11 squashf                                                /snap/gtk-common-t
loop12 squashf                                                /snap/gnome-charac
loop13 squashf                                                /snap/core18/1074
loop14 squashf                                                /snap/gnome-3-26-1
loop15 squashf                                                /snap/vlc/1049
loop16 squashf                                                /snap/gnome-system
loop17 squashf                                                /snap/gnome-3-28-1
sda                                                           
├─sda1 vfat              4DD5-F9C6                            /boot/efi
├─sda2 ext4              766c6a6f-98fc-4c26-868c-c2d542ad373a /
└─sda3 ext4              09724afe-6b53-4b29-afb8-0760ed0a1b01 /home
sdb                                                           
└─sdb1 ext4    The_Vault 41aed6f4-8336-48ef-95d0-9911d81e9f75 /mnt/vault
sr0                                                           

答案1

/etc/fstab/ 中的更改

UUID=41aed6f4-8336-48ef-95d0-9911d81e9f75   /mnt/vault  ext4    defaults,nofail 0   2

UUID=41aed6f4-8336-48ef-95d0-9911d81e9f75   /mnt/vault  ext4  user,noauto,nofail 0   0

期权默认意味着

rw, suid, dev, exec,汽车、nouser 和 async

相关内容