LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 02-03-2013, 10:15 AM   #1
sysbox
Member
 
Registered: Jul 2005
Posts: 117

Rep: Reputation: 15
Turn off Automatic Mounting of FAT32 and NTFS partitions


I have an external USB hard drive with several partitions: ext3, FAT32, NTFS. Whenever I plug this drive into my CentOS machine (running Gnome), it automatically mounts the FAT32 and NTFS partitions. I don't want that to happen. How can I configure it to not automatically mounts the FAT32 and NTFS partitions.

ps. It doesn't automatically mount the ext3 partition because I used e2label to label the partition and set it to 'noauto in /etc/fstab.
 
Old 02-03-2013, 03:31 PM   #2
Philip Lacroix
Member
 
Registered: Jun 2012
Distribution: Slackware, FreeBSD
Posts: 198

Rep: Reputation: 106Reputation: 106
I'm not a Gnome3 user and I installed it just to try, so I might be wrong, but I can't see anything, in the "System settings", to configure the behaviour of removable drives. I also looked in the Nautilus settings and it's the same (while Xfce's Thunar, for example, has a fine-tuning section in its preferences manager).

I would personally edit fstab (first making a copy of it) adding explicit entries for the partitions you'd like to leave unmounted. If you want to try this, first you'll need to get the UUID (universally unique identifier) of each partition and append it to fstab, using blkid (as root). For example, for an hypotetical /dev/sdc1 partition, type:

Code:
blkid /dev/sdc1 >> /etc/fstab
Pay attention to type >> and not > (otherwise you'll overwrite fstab instead of appending to it). Open fstab and you'll see something like this at the end of the file:

Code:
/dev/sdc1: UUID="D34TG678RGRT564" type="ntfs"
Now, clean the line a little bit, leaving the partition's UUID only, without "" :

Code:
UUID=D34TG678RGRT564
Then complete the line adding a valid mount point for the partition, the filesystem type ("vfat" for FAT, "ntfs-3g" for NTFS), the "defaults", "user" and "noauto" options (the latter will prevent the partition from being automatically mounted) separated by comma with no spaces. Finally, set the dump and pass options to 0. The result will be like the following:

Code:
UUID=D34TG678RGRT564 /home/user/mnt ntfs-3g defaults,user,noauto 0 0
The line will affect that partition only, thanks to the UUID. You'll have to do the same work for the other partitions you want to control through fstab.

Regards,
Philip
 
1 members found this post helpful.
Old 02-03-2013, 04:04 PM   #3
John VV
Guru
 
Registered: Aug 2005
Posts: 13,034

Rep: Reputation: 1740Reputation: 1740Reputation: 1740Reputation: 1740Reputation: 1740Reputation: 1740Reputation: 1740Reputation: 1740Reputation: 1740Reputation: 1740Reputation: 1740
CentOS 6.3 uses Gnome 2

but the above will work
 
Old 02-03-2013, 04:38 PM   #4
sysbox
Member
 
Registered: Jul 2005
Posts: 117

Original Poster
Rep: Reputation: 15
Thanks! That worked.
 
Old 02-03-2013, 05:34 PM   #5
Philip Lacroix
Member
 
Registered: Jun 2012
Distribution: Slackware, FreeBSD
Posts: 198

Rep: Reputation: 106Reputation: 106
Glad it did!
 
  


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
[SOLVED] Cannot write to NTFS or FAT32 partitions porphyry5 Slackware 4 03-23-2011 10:47 AM
[SOLVED] Access to other partitions: NTFS and FAT32 Lorax Linux - Newbie 13 12-13-2009 08:33 PM
accessing my FAT32 and NTFS partitions d0tc0mguy Linux - Newbie 2 04-21-2005 03:42 PM
ntfs and fat32 partitions not appearing in /dev shurik Linux - Newbie 14 09-14-2004 01:05 PM
Editing NTFS and FAT32 partitions under linux? eire Linux - Hardware 2 12-07-2003 06:54 PM


All times are GMT -5. The time now is 03:12 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration