Setup script for auto mount external hdd's on raspberry pi

Since I am using multiple raspberry pi's at my house for different tasks, I am also having one working as a cheap NAS server on my home network.

The setup is simple:

  • A raspberry pi
  • A USB hub with external power supply
  • An external hard drive

But the problem with multiple hard drives is to have each mounted on boot of the raspberry pi to the exact same mount location.

This can be solved by entering a bunch of shell commands to find out the UUID of the device, enter it in /etc/fstab and so on.

But today I made a simple bash script to have this task done for you:

You can download the script and view the readme at the GitHub Repo.