Automounting Drives
Mount extra drives and partitions automatically at boot with fstab.
Extra internal drives (a second SSD, a data HDD) don't mount automatically
unless you tell the system to. The standard way is an entry in /etc/fstab,
keyed to the partition's UUID so it survives disks being re-ordered.
For removable USB drives you don't need any of this — the file manager mounts them on click. This page is for fixed drives you want available on every boot.
Find the partition and its UUID
lsblk -fNote the partition (e.g. sda1) and its UUID. You can also read UUIDs with
sudo blkid.
Create a mount point
sudo mkdir -p /mnt/dataAdd the fstab entry
Open /etc/fstab (sudo nano /etc/fstab) and add one line — replace the UUID
and filesystem type with yours:
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /mnt/data ext4 defaults,nofail,x-gvfs-show 0 2nofail— boot continues even if the drive is missing. Leave this in.x-gvfs-show— makes the drive show up in the file manager sidebar.- For an NTFS (Windows) drive, use
ntfs3as the type instead ofext4.
Test before rebooting
sudo systemctl daemon-reload
sudo mount -aIf mount -a returns with no errors, the entry is valid and the drive is
mounted at /mnt/data.
A bad fstab line — especially without nofail — can drop the system into
emergency mode at boot. Always test with sudo mount -a first, and keep a
snapshot handy. See the
Arch Wiki: fstab for every option in
detail.