Here is the quick and easy guide to figure out how to “Automount” HDD’s / SSD’s during bootup [or reboot] on any version of Ubuntu *like Lubuntu, Xbuntu, etc*
These are the steps in CLI/terminal you’ll need to type [it will be similar on your system]:
- Check to see if mounted on system by typing
//Look for the HDD/SSD/USB HDD to see if it’s actually showing up in this list
- sudo fdisk -l
//shows the total # of HDD’s on server [bold text shows the external required to mount on this bullet point
Disk /dev/sdb: 2000.4 GB, 2000398933504 bytes
- In Lubuntu, Ubuntu, you’ll need to tell the hard drive where to place the new hdd to access by making the directory and then mounting the hard drive there:
//you can use either media or mnt in root directory **I prefer mnt = mount**
sudo mkdir /mnt/hdd
**Use whatever name you want to ID the directory**
- Now you need to tell the hdd where to mount on the new path made:
sudo mount /dev/sdb /mnt/hdd
- type in the command shown to verify you get a 0 to show it works! If you get a 1, the command failed!
- Once you’ve completed that, now let’s simply edit the correct file to tell it the new path permanently for automount:
sudo nano /etc/fstab
- Inside this file, place the following line at the bottom and press “ctrl+0 >> ctrl+x” to save:
/dev/sdb1 /mnt/hdd ntfs defaults 0 0
**PLEASE NOTE** -Your partition type will show up when you run sudo fdisk -l to use which will be something like NTFS,VFAT,etc [Change to the correct PARTITION type if you don’t use NTFS!]
- Type the following to reboot
OPTIONAL: You can also add a symlink to the desktop if you are using a GUI by typing the following command:
ln -s path/to/your/hdd path/to/desktop/hdd
- After all that has been completed, you should have a working automount you don’t have worry about mounting each time you reboot!
If you have any issues, also make sure to verify the drive is the correct one. I do not recommend using any type of package.
I actually also want to make note the following package doesn’t work by typing it into terminal: **I’ve seen a lot of automount tutorials online suggesting this which DOESN’T work**
sudo apt-get install pysdm
Support URL to verify: https://askubuntu.com/questions/237066/where-is-the-pysdm-package/237114
If you have any questions, please leave me a comment! Thanks!!