How to stop mounting all hard drives at startup in Ubuntu?
I am running Ubuntu precise (12.04).
I installed and ran ntfs-config because I was an error while trying to copy files from my hard drive to a usb device. After checking the 'enable write support for external file' box that issue was fixed; however, all my hard drives got mounted for some reason. I unmounted them with: $ sudo umount /dev/... but when I restart the computer they are all monted again. Is there a way to make sure that they don't mount upon startup? |
If they are in /etc/fstab, you could set the mount to "noauto."
Here's a line from my fstab. Where it says "auto," substitute "noauto." Then you will have to mount them manually, either from the command line or through the file manager: Code:
UUID=7900ade7-de36-41e5-88b5-2d7aaa8adcd4 /media/sdb5 ext3 rw,user,auto 0 1 You can learn more about fstab here: http://pclosmag.com/html/Issues/200709/page07.html |
Thanks for your quick reply; unfortunatelly, I don't see 'auto' option anywhere, so would really appreciate your help. Here's the file's contents. Out of the once listed I only need sde5 mounted.
Code:
# /etc/fstab: static file system information. |
defaults is actually many options i.e.
rw, suid, dev, exec, auto, nouser, async, and relatime The simplest would be to use defaults,noauto. The noauto takes precedence over the defaults. |
I was thinking I should have said more, and I see that michaelk has added a most useful post.
If you are not sure which partition is represented by a particular entry in your fstab, you can use the blkid command. For example: Code:
$ /sbin/blkid |
Isn't there something about automounting usb media?
|
Yes... You can disable the gnome automount setting via gui dconf-editor or the CLI tool gsettings. I assume that you are using gnome.
settings set org.gnome.desktop.media-handling automount false |
I tried installing dconf-editor and unchecking the box for 'org.gnome.desktop.media-handling automount' but to no avail. I'm afraid to mess with /etc/fstab file without really knowing what I am doing. From the posts above I gather that I can substitute
Code:
defaults,noauto Code:
defaults,nls=utf8,umask=0222 Code:
defaults,noauto,nls=utf8,umask=0222 Code:
noauto,nls=utf8,umask=0222 UPDATE: Okay I looked in the /etc and found a file called fstab-ntfs-cofig-save so I just replaced the fstab file with it and everything started working as desired :) |
All times are GMT -5. The time now is 10:30 PM. |