Auto mount secondary drive - Ubuntu

Stillie

Expert Member
Joined
Dec 10, 2009
Messages
3,216
Reaction score
308
Location
Cape Town
Hi all,

I have an ubuntu system with Kodi installed and all my movies and series on the secondary drive. Problem with it is that when i restart the PC, i have to basically open the secondary drive after the restart to sort of "mount" the drive or Kodi wont play the movies or my network drive will be disconnected? how can i sort of auto mount the drive on start up or just have the drive open up on startup so i dont have to click the drive once its started each time?
 
make a backup copy of fstab first, before making changes to etc/fstab. That way if things go wrong you can revert using a recovery disk.
 

This will work fine but a little more reliable way of mounting is by the drive UUID.

To find the UUID do the following.
sudo blkid

This is what the storage partition on my media drive comes up as.
/dev/sdb1: LABEL="storage" UUID="d06744b5-e3af-4a2d-bcd3-f2ca67d36310" TYPE="ext4" PARTUUID="0009296d-01"

Now you just replace /dev/sdb1 with UUID="d06744b5-e3af-4a2d-bcd3-f2ca67d36310" in the fstab file.

Above is just an example of my setup, you will have to identify the disk in your setup first. The "Disks" app comes pre installed and has a gui so it's easy to id your disks.
 
Ubuntu official online documentation has all these answers.

Best to get familiar with their website and go there first thing for most questions.

Best documentation for Linux in general.
 
This will work fine but a little more reliable way of mounting is by the drive UUID.

To find the UUID do the following.


This is what the storage partition on my media drive comes up as.


Now you just replace /dev/sdb1 with UUID="d06744b5-e3af-4a2d-bcd3-f2ca67d36310" in the fstab file.

Above is just an example of my setup, you will have to identify the disk in your setup first. The "Disks" app comes pre installed and has a gui so it's easy to id your disks.

+1 Used ODTech's advice some time ago mounting my drives. Mine looks like below.

All on the same line. "media/server/" is the path and "W1" is the drive name.

UUID=517f3736-c3cd-43f8-9234-c5e6c9844489 /media/server/W1 ext4 defaults 0 1
 
You can try through the gui but its a bit of a hit and miss.

Go to the disks app then click the drive you want and select the settings gears.
Next the edit mount options and then use the automatic mount options from there.

Fstab is the best way though.
 
You can try through the gui but its a bit of a hit and miss.

Go to the disks app then click the drive you want and select the settings gears.
Next the edit mount options and then use the automatic mount options from there.

Fstab is the best way though.


Interesting.

Does it add the line to Fstab for you? Or is it more of a login script with the GUI?
 
Top
Sign up to the MyBroadband newsletter
X