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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-15-2011, 10:12 PM
|
#1
|
LQ Newbie
Registered: Aug 2010
Location: St. Paul, Minnesota
Posts: 15
Rep:
|
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?
|
|
|
07-15-2011, 10:24 PM
|
#2
|
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
|
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.
|
|
|
07-15-2011, 10:27 PM
|
#3
|
LQ Guru
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,225
|
[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.
|
|
|
07-15-2011, 10:37 PM
|
#4
|
LQ Guru
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,225
|
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.
|
|
|
07-15-2011, 10:50 PM
|
#5
|
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
|
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.
|
|
|
07-16-2011, 02:07 AM
|
#6
|
LQ Newbie
Registered: Jul 2011
Location: $RANDOM
Posts: 4
Rep:
|
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.
|
|
|
07-16-2011, 04:42 PM
|
#7
|
LQ Newbie
Registered: Aug 2010
Location: St. Paul, Minnesota
Posts: 15
Original Poster
Rep:
|
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?
|
|
|
07-17-2011, 09:34 AM
|
#8
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127
Rep: 
|
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
|
|
|
07-17-2011, 11:26 AM
|
#9
|
LQ Newbie
Registered: Aug 2010
Location: St. Paul, Minnesota
Posts: 15
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 06:33 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|