Auto mount second HD on boot

The new HD you got online finally arrived. After you open your computer and install it (and after looking for badblocks), you’ll need to mount it automatically on boot.

Type lsblk or mount to find the device (or dmesg if you’re brave). In my case, it was /dev/sdb1

/dev/sdb1 on /media/dth/HD2 type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)

Now get the device’s UUID and type with blkid

/dev/sdb1: LABEL="HD2" UUID="0d256b26-1782-4f3f-b192-468464DjhdS7" TYPE="ext4" PARTUUID="290cdbb5-01"

Then create the folder where the second HD will be mounted.

mkdir /HD2

Time to edit fstab.

vim /etc/fstab

And add to the end of the file your new line.

UUID=0d256b26-1782-4f3f-b192-468464DjhdS7 /HD2 ext4 defaults 0 2

If the driver is mounted, umount now.

umount /dev/sdb1

Finally, test for errors.

mount -a

No errors found? Awesome, now reboot your machine when you can and check one last time.

Leave a Reply

Your email address will not be published.

Loading Facebook Comments ...
Loading Disqus Comments ...