boxmoe_header_banner_img

希望是美好的,也许是人间至善,而美好的事物永不消逝

文章导读

fstab挂载不稳定磁盘


avatar
hydrangea 17 8 月, 2026 40
$ sudo vim /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>
/dev/mapper/vgubuntu-root /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda2 during installation
UUID=2278-45D8  /boot/efi       vfat    umask=0077      0       1
/dev/mapper/vgubuntu-swap_1 none            swap    sw              0       0

UUID=a8797f76-ef30-47f0-939a-05deb2ddcba0 /home/user/media/G2000    ext4    defaults,nofail    0    0
~                                                                                                            

lsblk 查看磁盘UUID

defaults意味使用文件系统的默认挂载参数,例如 ext4 的默认参数为:rw,suid,dev,exec,autonouser,async

nofail可以在启动时若设备不存在则直接忽略它而不报错



评论(0)

查看评论列表

暂无评论


发表评论

表情 颜文字
插入代码