My PC has a fat32 Windows recovery partition. How do I keep that partition from showing up in the Places menu? Thanks.
My PC has a fat32 Windows recovery partition. How do I keep that partition from showing up in the Places menu? Thanks.
In the terminal, enter the following commands:Copy and paste the following to the file.Code:sudo mkdir /usr/share/hal/fdi/preprobe/95userpolicy sudo gedit /usr/share/hal/fdi/preprobe/95userpolicy/10ignore-disks.fdiChange "/dev/sda1" to the device that corresponds to the unmounted partition you want to hide (which you can find out with the command "sudo fdisk -l"). If you have more than one partition you want to hide, copy everything from <device> to </device>, paste it before </deviceinfo>, and change the device string accordingly. Save and exit, then reboot for the changes to take effect.Code:<?xml version="1.0" encoding="UTF-8"?> <deviceinfo version="0.2"> <device> <match key="block.device" string="/dev/sda1"> <merge key="info.ignore" type="bool">true</merge> </match> </device> </deviceinfo>
EDIT: If you're typing instead of copying, that's a lower-case L in the fdisk command, not the numeral 1.
Last edited by mb_webguy; February 4th, 2009 at 10:30 PM.
This post is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License
Thanks, mb_webguy, but it didn't work. I still see the partition in the Places menu and on the left side of Nautilus. Any other ideas?
thanks webguy, I've always wanted to do this...
but i rebooted and it didnt work, am i doing it right?
Code:<?xml version="1.0" encoding="UTF-8"?> <deviceinfo version="0.2"> <device> <match key="block.device" string="/dev/sda1"> <merge key="info.ignore" type="bool">true</merge> </match> </device> <device> <match key="block.device" string="/dev/sdb1"> <merge key="info.ignore" type="bool">true</merge> </match> </device> <device> <match key="block.device" string="/dev/sdc1"> <merge key="info.ignore" type="bool">true</merge> </match> </device> </deviceinfo>
Last edited by Johnny B; June 1st, 2009 at 09:41 PM.
i think what u r talking about is related to this http://ubuntuforums.org/showthread.p...76#post7383676 if some gave us the answer why there is that difference and what causes it we will be able to edit that that thing and hide and show what we want in partitions ,specially ubuntu dosnt have fstab entries for logicall partions and editing fstab willnot work very good in ur thread ,did u try it ????????
Hi I'm new to ubuntu and this forum, but I might know an another way to do this. I also had windows partitions showing up in the places menu (dual boot setup), but I would never use these partitions when running ubuntu. In order to stop these from showing up I edited /etc/fstab.
The Windows partitions I wanted to hide were sda1 ans sda2, which initially didn't show in fstab. After I declared entries for the partitions in a specific manner the partitions were gone from the places menu!
Before trying any of this please make a backup of the /etc/fstab file!
Then edit /etc/fstab:Code:sudo cp /etc/fstab /etc/fstab_back
In my case the file looked like this:Code:gksudo gedit /etc/fstab
in which sda7 is a mounted NTFS partition that I want to use with ubuntu, created it with 'ntfs-config'. I added two entries for ignoring the two partitions sda1 and sda2, with filesystem defined as 'ignore', so the /etc/fstab looked like this:Code:# /etc/fstab: static file system information. # # -- This file has been automaticly generated by ntfs-config -- # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 # Entry for /dev/sda5 : UUID=ac83da58-6e80-4602-bffa-9d6b4b30e34f / ext4 errors=remount-ro 0 1 # Entry for /dev/sda6 : UUID=013e3395-57a2-4c4d-92ea-663f02043a14 none swap sw 0 /dev/sda7 /media/DATA ntfs-3g defaults,locale=en_US.UTF-8 0 0
I'm not sure if the specified mount point or other options really matter and the directories /mnt/SDA1 and /mnt/SDA2 don't even exist.. but it seems to work this way. I think I didCode:# /etc/fstab: static file system information. # # -- This file has been automaticly generated by ntfs-config -- # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 # Entry for /dev/sda5 : UUID=ac83da58-6e80-4602-bffa-9d6b4b30e34f / ext4 errors=remount-ro 0 1 # Entry for /dev/sda6 : UUID=013e3395-57a2-4c4d-92ea-663f02043a14 none swap sw 0 0 /dev/sda1 /mnt/SDA1 ignore defaults,locale=en_US.UTF-8 0 0 /dev/sda2 /mnt/SDA2 ignore defaults,locale=en_US.UTF-8 0 0 /dev/sda7 /media/DATA ntfs-3g defaults,locale=en_US.UTF-8 0 0
to update the places menu.Code:sudo mount -a
Please note that this is kind of an 'empirical' solution, not based on real knowledge. I found the ignore option in the fstab manual (type 'man fstab' in terminal). The solution presented in post #2 seems to help for other people so try that first I'd say. Please reply if you have any comments on the way I did this![]()
Hi everybody,
I also wanted to eliminate 2 Windows partitions from appearing in the Places menu and stumbled onto this thread when looking for a solution. I followed the instructions in post #2 without success. The strategy in post #6 did work for me.
As a heads up, I am not very adept with Linux, just able to get around and follow some instructions. With that said are there any more savvy users that can confirm this is a safe method?
Through elimination I was able to reduce the fstab edit to this:
/dev/sda1 /mnt/SDA1 ignore defaults
/dev/sda2 /mnt/SDA2 ignore defaults
I have 9.10 installed.
Regards,
Jon
I support the method given by MoarningSun (Post 6). It is the old, foolproof method of mounting partitions using /etc/fstab. It is most suited for partitions that are on fixed disks within your computer. I would not recommend this for external USB disks (unless you know you never want to disconnect them).
@raindogxxL "ignore" would cause the line to be "ignored", so this does not work. You need to specify the file system of the partition there (for example ext3, or ntfs, or vfat). The output of "sudo blkid" tells you the file system of the partition.
Mounting the drive somewhere other than /media will stop it showing up in places:
I didn't use a UUID because I'm lazy.Code:/dev/sdb1 /mnt/archive ext3 defaults 1 2
Bookmarks