LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-20-2014, 08:57 PM   #1
judoka
Member
 
Registered: Jul 2009
Distribution: Ubuntu 14.04 LTS, CentOS
Posts: 218

Rep: Reputation: 16
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?

Last edited by judoka; 06-20-2014 at 09:00 PM.
 
Old 06-20-2014, 09:08 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,871
Blog Entries: 18

Rep: Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340
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
If the entry in your fstab is significantly different, post it here and we'll help you.

You can learn more about fstab here: http://pclosmag.com/html/Issues/200709/page07.html

Last edited by frankbell; 06-20-2014 at 09:13 PM.
 
Old 06-20-2014, 09:27 PM   #3
judoka
Member
 
Registered: Jul 2009
Distribution: Ubuntu 14.04 LTS, CentOS
Posts: 218

Original Poster
Rep: Reputation: 16
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.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>

proc	/proc	proc	nodev,noexec,nosuid	0	0
#Entry for /dev/sde5 :

Last edited by judoka; 06-21-2014 at 02:21 AM.
 
Old 06-20-2014, 09:44 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,428

Rep: Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938
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.
 
Old 06-20-2014, 10:16 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,871
Blog Entries: 18

Rep: Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340
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
/dev/sda1: UUID="ad52eed9-c80c-41fe-81a6-e8a9a71e6f19" TYPE="ext3" 
/dev/sda5: TYPE="swap" UUID="35f7217b-f73b-4cd1-b513-571bd0482a18" 
/dev/sdb1: UUID="1655a198-15a7-471f-9e99-e3fc9fd92ca0" TYPE="ext3" 
/dev/sdb5: UUID="7900ade7-de36-41e5-88b5-2d7aaa8adcd4" TYPE="ext3"
 
Old 06-20-2014, 10:27 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 17,178

Rep: Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562
Isn't there something about automounting usb media?
 
Old 06-20-2014, 10:50 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,428

Rep: Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938
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

Last edited by michaelk; 06-20-2014 at 10:52 PM.
 
Old 06-21-2014, 01:13 AM   #8
judoka
Member
 
Registered: Jul 2009
Distribution: Ubuntu 14.04 LTS, CentOS
Posts: 218

Original Poster
Rep: Reputation: 16
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
where ever I have
Code:
defaults,nls=utf8,umask=0222
that is do I do change the previous line to example 1:
Code:
defaults,noauto,nls=utf8,umask=0222
or to example 2:
Code:
noauto,nls=utf8,umask=0222
Also I think that the problem that I am experiencing now is a result of installing ntfs-config which overwrote my original /etc/fstab is there a way to get those settings back?

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

Last edited by judoka; 06-21-2014 at 02:17 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting Foreign USB drives with fstab on startup M4DM4NZ Linux - General 2 04-09-2014 11:36 PM
Mounting Hard Drives In Ubuntu MSBeckman Linux - Hardware 8 03-13-2005 08:41 PM
Help Mounting Hard Drives on Ubuntu! MSBeckman Linux - Newbie 3 03-13-2005 06:37 PM
Mounting Hard drives at startup Marvel Fedora 4 11-29-2004 04:30 AM
Auto-mounting drives at startup MandrakeDave Linux - General 7 09-29-2003 06:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration