如何在启动时自动安装 SSD

如何在启动时自动安装 SSD

我的系统中有 3 个 NVME M2 内置 SSD,只有主 SSD 会自动挂载。其他 2 个我必须手动右键单击并选择挂载,以便我的游戏程序 Lutris 访问它。

如何在启动时自动挂载这个 Linux 格式的、单分区的、非共享的物理硬盘?

我的 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/nvme0n1p2 during installation
UUID=22e96bf2-fade-463d-8cc8-479247def942 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=E8A3-41F6  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0

这是$ sudo blkid我希望自动安装的“STEAM”M2 SSD

/dev/nvme2n1p1: LABEL="STEAM" UUID="39c64773-f637-41ee-b8ca-1439b61426b0" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="6b754125-761a-43a0-9592-c00ad3e55b26

答案是用这一行来编辑/添加到我的 fstab 吗?

/dev/sda /mnt/steam ext4 defaults, 0 0

或者我需要添加这个命令?

UUID=39c64773-f637-41ee-b8ca-1439b61426b0 /mnt/steam ext4 defaults 0 0

或者这个命令?

UUID=39c64773-f637-41ee-b8ca-1439b61426b0 /mnt/steam auto nosuid,nodev,nofail,x-gvfs-show 0 0

我知道有很多选择,这取决于用户想要做什么。首先,为了保持简单,我只希望自动安装内置固态硬盘,在手动安装后,系统运行正常,其他所有默认设置保持不变。感谢大家花时间和耐心学习 Linux。

听取大家的建议,这是我编辑的 fstab,经过测试mount -a

# /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/nvme0n1p2 during installation
UUID=22e96bf2-fade-463d-8cc8-479247def942 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=E8A3-41F6  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0
UUID=39c64773-f637-41ee-b8ca-1439b61426b0 /mnt/steam ext4 auto,nosuid,noatime,nodev,nofail,errors=remount-r,x-gvfs-show 0 0

相关内容