$ 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)
暂无评论