Connecting an external USB driveYou would think connecting an external USB drive to a Pi would be automatically mounted and made available like it is on Windows systems, well it is if you're running a GUI, but I'm not, so I need to do it manually. There are applications like usbmount that will do this for you, but the mount points can vary between boots, and I wanted to set up the external drive to always mount at the same device at the same location all the time with no exception, I did this with the following instructions...First you will need to create the mount point directory and make it world writable with these commands
Please note I had previously formatted the external drive in EXT4 on a Linux machine, but you can use NTFS which is wot Windoze uzes.Don't use FAT32 which is what it will be formatted as when new, otherwise the maximum file size you can store will be limited to 4GB.You will only need the following command if you're using a Windows formatted drive (NTFS), which will install the best device driver for the external drive.
Now if you run the blkid (BLKID) command without the drive connected and note the output, then connect the drive through the powered hub and run it again you end up with something like this...
The new entry at /dev/sda1 is your external drive, so note down the UUID number (87a91a41-a13a-4b6c-92b8-2d7b6e3fd31c) and the TYPE entry (ext4) then use the command...
and using the cursor keys to scroll down, enter this line at the bottom...
Please use your values instead of mine and that's a tab space between the values.Doing this will always auto mount the USB drive automatically at /media/external at startup.BTW, usbmount works, but doesn't always mount at the same location in the filesystem, which will be a problem with some scripts used later on.Now you need to either reboot
or use the command to mount drives as according to fstab
And that's it