15

I have a dual boot Windows 7, Ubuntu 11.10 system. Ubuntu was pretty much a vanilla installation and it was able to automount my two Win partitions.

I used to see them in Nautilus. To recover this problem I manipulated the /etc/fstab which is operated under roots and that I am not able to unmount from Nautilus as Admin (unless I sudo from terminal)

How can I restore the original behavior (from my admin non-root account)? Thank you

3
  • 1
    Has your question been answered? I ask in case there is something that has been missed
    – ckhatton
    Nov 6, 2013 at 23:32
  • Many answers but indeed I could not make it work
    – ray
    Nov 29, 2013 at 22:41
  • 1
    possible duplicate of How to automount a partition on login?
    – Lucio
    May 25, 2014 at 16:21

4 Answers 4

17

The visual way

(for versions Ubuntu 12.10 Quantal Quetza or higher)

This guide is referenced from here.

  1. Make sure the drive/partition you would like to attach is attached to your system and is turned on.
  2. Open "Disks" application (can be found by directly searching disks under applications). On its main window, "Disks" graphically shows you your current partition layout, as in the following screenshot. example_disk_dual
  3. Now choose the NTFS partition that you want to automatically mount on boot (as in the previous screenshot), then click on the small gears icon slightly below it. From the menu choose Edit Mount Options...
  4. From the next window that is shown, move the slider button to the left to gain access to the settings. Depending on the Ubuntu version you are running the label next to the slider can be either Automatic Mount Options or User Session Default. example_edit_mntopt
  5. Keep the check-marked option Mount at startup. Select/Fill the next four options if you wish. "Display Name" is a handy visual aid in Nautilus (file manager).
  6. Once done, click on the OK button at the bottom. When asked, enter your administrative password.
  7. Reboot the computer and you are done.

Extra:

If you wish to have the drive as read-only, add ,ro to the end of the field that says nosuid,nodev,nofail,x-gvfs-show (without a space).

Note:

If you have more than one NTFS partition, then follow the same steps for each one individually.

8

The command-line way

Make sure the drive/partition you would like to attach is attached to your system and is turned on.

This guide is taken from here (it is for 12.04, but should work for other versions of Ubuntu) and bits from here.


Press Ctrl + Alt + T on your keyboard to open Terminal and type:

sudo blkid

This will list the drives on your system, with handle labels, where available.

Take note of the UUID of the drive you wish to automatically mount.

Now the "fstab" file needs editing:

sudo gedit /etc/fstab

OR

sudo nano /etc/fstab

Add this line to the bottom of the file, replacing the UUID with your noted UUID and choose a mount point name (the space character is created by using "\040" in the fstab):

UUID=xxxxxxxxxxx /mnt/Your\040Chosen\040Name ntfs-3g defaults,windows_names,locale=en_US.utf8  0 0

Also replace the local to one suitable for your location and language if you are not in the USA. You can find your locale by typing in the terminal:

locale

The "ntfs-3g" (a Kernel module) is a lower level software tool in almost all GNU/Linux distributions.

Save the file and close it.

Now type this into the terminal:

sudo mkdir "/mnt/Your Chosen Name"

Next, make yourself the owner of the mount point by typing:

sudo chown <username> "/mnt/Your Chosen Name"

Replacing with your username (your username is always lower-case). This will prevent other users from touching it.

Restart your computer and enjoy!

2

Try this program.

sudo apt-get install pysdm
sudo pysdm

This will help you configure your drives that are mounted at startup.

In the program, select your windows partition. When it asks you to configure, click 'Ok'. Then click on the assistant. It's pretty clear from there.

2
  • 1
    I tried but what it does it is just to edit /etc/fstab. So the final effect is the same: I can unmount it from nautilus
    – ray
    Apr 19, 2012 at 7:42
  • Okay, that's pretty weird. One final thing: I've had some trouble with windows drives when I haven't install ntfs-3g. Try installing that if it isn't already.
    – A. Hayes
    Apr 19, 2012 at 23:53
0

In the "options" field in /etc/fstab (fourth space-delimited field) add the "user" option. So

/dev/sda5    /windows    ntfs-3g    defaults    0 0

becomes

/dev/sda5    /windows    ntfs-3g    defaults,user    0 0

This extra parameter will "allow a user to mount".

Source: man fstab.

1
  • I didn't put the user option and this is allowing nautilus as mounted "devices". Nevertheless I cannot unmount them as this would require root. I could do in terminal with sudo but actually at the first boot I didn't need to do that (I could unmount directly from nautilus)
    – ray
    Apr 18, 2012 at 21:22

You must log in to answer this question.

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