Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
    
Has your question been answered? I ask in case there is something that has been missed –  Crimbo Nov 6 '13 at 23:32
    
Many answers but indeed I could not make it work –  ray Nov 29 '13 at 22:41
    
possible duplicate of How to automount a partition on login? –  Lucio May 25 at 16:21

5 Answers 5

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!

share|improve this answer

The visual way

(if you are using version Ubuntu 12.10 Quantal Quetza or higher)

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

This guide is referenced from here.


Click on the "Dash" icon on your Unity taskbar (Ubuntu icon) and enter:

disks

Click on "Disks" to open up the program.

Once opened, on its main window, "Disks" graphically shows you your current partition layout.

Now simply choose the NTFS partition that you want to automatically mount on boot, then click on the small gears icon slightly below it. From the menu choose:

‘Edit Mount Options…’

From the next window that is shown, move the slider button to the left, next to the ‘Automatic Mount Options’ label, to gain access to the settings.

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).

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).

Once done, click on the ‘OK’ button at the bottom. When asked, enter your administrative password.

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

Restart your computer and enjoy!

share|improve this answer

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.

share|improve this answer
    
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 '12 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 '12 at 23:53

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.

share|improve this answer
    
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 '12 at 21:22

Try this Link http://www.howtogeek.com/60817/how-to-auto-mount-partitions-at-linux-startup-the-easy-way/

share|improve this answer
    
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  Eliah Kagan Jun 29 '12 at 9:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.