LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-15-2011, 10:12 PM   #1
jlavik
LQ Newbie
 
Registered: Aug 2010
Location: St. Paul, Minnesota
Posts: 15

Rep: Reputation: 0
Unmounted (and unwanted) partitions show up in Nautilus


I have been setting up my laptop as a dual boot with Win7 (yuckkk!) and Ubunutu 11.04. My HP Pavilion dm4 came with 4 primary partitions used by Windows! (Again, yuckkk!) I got rid of Windows_recover partition (I don't remember the exact name) converted that primary partition to an extended partition and then installed Ubuntu in virtual partitions. All that works.

What I don't like is that the partition HP_TOOLS shows up in Nautilus, and if you click on it, it self-mounts and makes that partition accessible. I would like that partition to just hide in the background.

Is there any way to make it stay hidden?
 
Old 07-15-2011, 10:24 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,771
Blog Entries: 28

Rep: Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316
You could try just remarking the relevant line out in /etc/fstab by preceding it with a number (pound) sign. If that doesn't have the desired result, you could just un-remark the line.
 
Old 07-15-2011, 10:27 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,225

Rep: Reputation: 2670Reputation: 2670Reputation: 2670Reputation: 2670Reputation: 2670Reputation: 2670Reputation: 2670Reputation: 2670Reputation: 2670Reputation: 2670Reputation: 2670
[QUOTEIs there any way to make it stay hidden?][/QUOTE]

You might check to see if it has an entry in /etc/mtab and if it does, put a hash mark (#) to the left of the line. Reboot to test.
 
Old 07-15-2011, 10:37 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,225

Rep: Reputation: 2670Reputation: 2670Reputation: 2670Reputation: 2670Reputation: 2670Reputation: 2670Reputation: 2670Reputation: 2670Reputation: 2670Reputation: 2670Reputation: 2670
Well, that didn't work. Tried it in Ubuntu 10.10 and was still able to access that windows 7 HP directory in Nautilus.
I don't have an entry for it in /etc/fstab.

Found this link but didn't try it:

http://ubuntuforums.org/showthread.php?t=1645942&page=2

Go to post 15, click the link there and on the next page go to post 54. This is on Ubuntu 10.10.

Last edited by yancek; 07-15-2011 at 10:51 PM.
 
Old 07-15-2011, 10:50 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,771
Blog Entries: 28

Rep: Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316
It's been a while since I tried to hide a partition (usually, I'm trying to mount one), but try umounting it, then remarking it out in fstab, then see what happens when you try to remount it.

I *think* fstab is read a boot and when you mount or umount a partition. Changing it might not have dynamically affected /etc/mtab.
 
Old 07-16-2011, 02:07 AM   #6
-demo-
LQ Newbie
 
Registered: Jul 2011
Location: $RANDOM
Posts: 4

Rep: Reputation: 0
Post Solution

The only way I know how to do this is with a udev script to tell udev not to show this device.

1) Create a file named 99-hide-disks.rules
This file is where we put the rule to tell the Linux kernel to hide the device.

2) Put the text below in the file you just created, but make sure to change the device name that applies to your case.
On mine I want to hide sda1 and sdb2. The general format is (this is case sensitive):

Code:
KERNEL==”device name“, ENV{UDISKS_PRESENTATION_HIDE}=”1″
In my example, I will write the following in 99-hide-disks.rules:
Code:
KERNEL==”sda1″, ENV{UDISKS_PRESENTATION_HIDE}=”1″
KERNEL==”sdb2″, ENV{UDISKS_PRESENTATION_HIDE}=”1″
Now move the file you've created to /etc/udev/rules.d/ and either restart udev or reboot.
 
Old 07-16-2011, 04:42 PM   #7
jlavik
LQ Newbie
 
Registered: Aug 2010
Location: St. Paul, Minnesota
Posts: 15

Original Poster
Rep: Reputation: 0
The udev approach didn't work for me in 11.04

Thanks for all the ideas. The partitions I don't want to see in Nautilus don't have entries in fstab, so I don't believe there is anything I can do with fstab.

The ideas about creating a udev rule seemed to have potential, but I created the rule as -demo- suggested...rebooted and the offending partitions still show up in Places. I also tried the version in the link suggested by yancek. Still no luck.

Any more ideas out there?
 
Old 07-17-2011, 09:34 AM   #8
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127

Rep: Reputation: 174Reputation: 174
HI jlavik,

First of all you must remember that Ubuntu is trying to make things easier for you. Canonical knows what you (should) want - sound like some other company we know? End of soapbox.

I had an issue with my netbook showing an icon for a 16 GB SD card on the desktop (I think it also opened in Nautilus when I logged in - it has been a while and I don't recall for sure). The card is always installed as additional storage as the SSD drive is only 16 GB itself. I was able to use gconf-editor and poke around under apps/nautilus/desktop to find "apps/nautilus/desktop/volumes_visible" By unchecking this I was able to disappear the SD card icon from the desktop. It mounts but does not open by itself.

You might have a look at gconf-editor. There are a LOT of settings there. Sort of like regedit so be careful. As to HP_TOOLS mounting when you click on it... just don't click

Ken
 
Old 07-17-2011, 11:26 AM   #9
jlavik
LQ Newbie
 
Registered: Aug 2010
Location: St. Paul, Minnesota
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks Ken. I had pretty much decided that "just don't click on it" was going to be my solution. Since this is a personal-use-only laptop, I don't really have to worry about someone else opening and making changes on those partitions.

I will take a look at gconf-editor and see if I find anything obvious, but I am generally overwhelmed by that many settings about which I have no clue. Regedit always gives me a stomach ache when I have to venture there.

Thanks again.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
show all unmounted disk labels? ninja master Linux - Hardware 3 02-05-2014 06:04 AM
Extra unwanted links to unmounted NTFS partitions in dolphin 'places' bar tomgibson Linux - Newbie 2 02-18-2009 09:35 AM
Checking for free space of unmounted partitions (cli) easuter Linux - Software 2 08-10-2007 02:17 AM
Local partitions are being spontaneously unmounted. HypoCee Linux - Server 3 12-19-2006 04:55 PM
how to see unmounted partitions Vensan Linux - General 1 09-07-2006 02:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:33 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
Open Source Consulting | Domain Registration