Ubuntu – Mount two hard drives on start up

drivemountstartup

I have two hard-drives (one internal and one external) that I want to mount on start up (ntfs, but it doesn’t matter).

I can mount them fine with the "Disk Utility" aplication and I can mount them fine with the comands

/usr/bin/udisks –mount /dev/disk/by-uuid/21318E3E64707B4D

/usr/bin/udisks –mount /dev/disk/by-uuid/6439FB1D652606C4

respectively (I followed this tutorial; https://help.ubuntu.com/community/AutomaticallyMountPartitions#Per-User_Mounts and used the Per-User Mounts).

But when I put these commands, separated by a semicolon, in the Startup Application to run on startup, it only mounts one of the partitions (always the same one). Why is this and how to fix it?

(At first I tried to have each mounting-command as a separate "startup program" but then the start-up program removed one of the programs, leaving me with only one mounted hard drive…)

I'm using Ubuntu 12.04 LTS.

Thank's in advance!

Best Answer

To mount hard drives on startup, you need to edit the /etc/fstab file. Just open the file in your favourite editor(be sure to use sudo)

sudo gedit /etc/fstab

and add the appropriate lines for your hard drives

UUID="UUID here" /mount/point filesystem-type defaults 0 0

Just put in the UUID, mount point and filesystem type. See this for more info.