Browsed by
Category: Filesystem

Adding an external HDD to fstab

Adding an external HDD to fstab

In order to permanently add an external HDD, the best way is to first identfy the UUID and the corresponding file system by typing

sudo blkid

with that information one can edit the fstab

sudo vim /etc/fstab

and enter then there a line with the format

UUID=<UUID> \tab <mountPoint> \tab <filesystem> \tab <options> \tab 0 \tab 1

Here, the values for <UUID> and <filesytem> we get from the blkid command, the mount point is ‘free choice’ and as option, I choose e.g. errors=remount-ro

Once the fstab is populated like this, just try to mount the disc by typing

sudo mount -a