Persistent Local Mount at Boot
Objective: Mount a disk persistently using /etc/fstab so it automatically mounts at boot.
-
1. Create Mount Point
sudo mkdir -p /backups
-
2. Identify Device to Mount
lsblkCheck available devices to find the one you want to mount.
-
3. Mount Device Temporarily
sudo mount /dev/sdb1 /backupsVerify the mount:
lsblk
-
4. Add Device to
/etc/fstabsudo blkid /dev/sdb1 sudo nano /etc/fstabExample fstab entry using UUID:
UUID=your-uuid-here /backups ext4 defaults,nofail 0 2defaults– default mount optionsnofail– system still boots if device is missing0– do not dump2– fsck order (non-root filesystem)
-
5. Verify fstab Configuration
sudo mount -aIf no errors appear, fstab is correctly configured.
-
6. Reboot and Confirm Persistent Mount
sudo reboot lsblkEnsure the device is still mounted at
/backupsafter reboot.