Possible Duplicate:
Automatically mount NTFS drive when I login

I have a second, internal hard drive for the purpose of backup. I use Back in Time to backup every hour onto this second drive. The problem is that, unlike Windows, Ubuntu fails to see the second drive on boot up. I have to manually mount it which is a pain for me and a real pain for my non technical wife. Is there any simple way to automate this process? In fact, why does Ubuntu not see it and mount it automatically, like Windows?

  • Can you please add the content of sudo fdisk -l to your question? Jan 29, 2012 at 12:21

2 Answers 2


You can add the mount to /etc/fstab file as well. The syntax

# <file system> <mount point>   <type>  <options>       <dump>  <pass>

so it would be something like

  /dev/sdb1   /backup      ext4    defaults 0  1

assuming the device name is sdb1 and mount point is /backup.

I would recommend to backup existing /etc/fstab file so that you can revert if something goes wrong.

To edit /etc/fstab in Graphical mode (in case you dont know emacs and (g)vi(m) which is more text based, use

gksudo gedit  /etc/fstab

Yes You have to edit Your start up script or add it to the autorun programs. Which version of Ubuntu do You use? You didn't give us the info about the version so below You have quite general solution. But dependently on OS version there are more comfy ways to do it. See in preferences or administration if You have option called: startup apps or something similar. And then add there Your script.

Create a file:

sudo gedit /etc/init.d/myMountScript.autostart

and write there Your mount command. Change it's properties to executable and then:

sudo update-rc.d myMountScript.autostart defaults 80

Did it work?

  • Thank you both for your replies. Unfortunately, they are a bit too technical for me. I'm worried about buggering my computer if I go around altering scripts. Is there an easier way? How about adding a button in Disk Utility to 'auto mount this drive'? I'm running Ubuntu 11.04 on a Dell Dimension 3100. Feb 1, 2012 at 14:57

Not the answer you're looking for? Browse other questions tagged .