Find the fdisk list command to see all drives and their partitions.
1
sudofdisk-l
The blkid command allows you to display information about available block devices. This will allow you to view the filesystem type, UUID, labels, and more.
1
sudoblkid
Edit fstab file
1
cd/etc/
create a copy of fstab file for backup.
1
sudocpfstabfstab.backup
Edit our fstab file. Add line with information like below for the drive that you want to mount it automatically.
Universally Unique Identifier for the partition. This ensures a persistent identifier for the filesystem, even if device names like /dev/sda1 change.
Mount Point
/media/duc/Backup
Directory where the filesystem will be mounted. The partition will be accessible at this path after mounting.
Filesystem Type
ext4
Filesystem type for the partition. In this case, it’s an ext4 filesystem, which is commonly used in Linux.
Mount Options
defaults
Set of default mount options, which includes: rw (read/write), suid, dev, exec, auto (automatically mount at boot), nouser (only root can mount), async.
Dump Field
0
Indicates whether the filesystem should be backed up using the dump utility. 0 means it will not be included in backups.
Pass Field
0
Controls the order of filesystem checking by fsck during boot. 0 means it will not be checked. 1 means check first (usually for root), 2 means check after root.