...
Code Block |
---|
mount /dev/sda2 /mnt/10T |
Auto-mount USB mass storage in booting
The first thing you need to do is to get UUID for the required disk partition by blkid as following
Code Block |
---|
# sudo blkid |
Then you will see the table like below
Code Block |
---|
/dev/sda1: PARTLABEL="Microsoft reserved partition" PARTUUID="12b9f5c9-e4f0-4731-9205-0ee066317ede"
/dev/sda2: UUID="04E6-6014" TYPE="exfat" PTTYPE="dos" PARTLABEL="Basic data partition" PARTUUID="636e9a0f-5fdf-43ca-8158-8f1af0a84f29"
/dev/sdb1: SEC_TYPE="msdos" UUID="473B-DFF7" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="ac9b3a25-7c96-4eca-8731-af37434ab252"
/dev/sdb2: UUID="a98c1217-d399-44ce-8e0e-3d6433d5b849" TYPE="xfs" PARTUUID="767fa4ae-e5f2-4fb6-ac9f-7fe6f37d97e7"
/dev/sdb3: UUID="5Rmufk-9xFj-hLgz-SsKs-PjoI-6RRl-CIweXh" TYPE="LVM2_member" PARTUUID="759b5d26-916e-46f0-aa47-14a032741904"
/dev/mapper/centos-root: UUID="53f9a30e-528c-4169-9835-13a6f47264d8" TYPE="xfs"
/dev/mapper/centos-swap: UUID="a59b7e29-a2a0-4548-9db0-fc1fcc267395" TYPE="swap" |
In my case, I will mount /dev/sda2 above and its UUID is 636e9a0f-5fdf-43ca-8158-8f1af0a84f29. We will add it at /etc/fstab
Code Block |
---|
UUID=636e9a0f-5fdf-43ca-8158-8f1af0a84f29 /mnt/10T ext4 defaults |
Now you can check the partition in the USB mass storage will be automatically mounted after system booting.