Results 1 to 9 of 9

Thread: removing partition from Places menu

  1. #1
    Join Date
    Jan 2009
    Beans
    13

    removing partition from Places menu

    My PC has a fat32 Windows recovery partition. How do I keep that partition from showing up in the Places menu? Thanks.

  2. #2
    Join Date
    Jan 2008
    Location
    /us/al/home/mb_webguy
    Beans
    2,339
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: removing partition from Places menu

    In the terminal, enter the following commands:
    Code:
    sudo mkdir /usr/share/hal/fdi/preprobe/95userpolicy
    sudo gedit /usr/share/hal/fdi/preprobe/95userpolicy/10ignore-disks.fdi
    Copy and paste the following to the file.
    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>
    Change "/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.

    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.

  3. #3
    Join Date
    Jan 2009
    Beans
    13

    Re: removing partition from Places menu

    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?

  4. #4
    Join Date
    Dec 2007
    Location
    New York
    Beans
    323

    Re: removing partition from Places menu

    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.

  5. #5
    Join Date
    Jun 2009
    Beans
    76

    Re: removing partition from Places menu

    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 ????????

  6. #6
    Join Date
    Nov 2009
    Beans
    16

    Post Re: removing partition from Places menu

    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!
    Code:
    sudo cp /etc/fstab /etc/fstab_back
    Then edit /etc/fstab:
    Code:
    gksudo gedit /etc/fstab
    In my case the file 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
    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 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
    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 did
    Code:
    sudo mount -a
    to update the places menu.

    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

  7. #7
    Join Date
    Feb 2010
    Beans
    4

    Re: removing partition from Places menu

    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

  8. #8
    Join Date
    Apr 2007
    Beans
    3,137
    Distro
    Ubuntu

    Re: removing partition from Places menu

    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.

  9. #9
    Join Date
    Mar 2007
    Location
    Portsmouth, UK
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: removing partition from Places menu

    Mounting the drive somewhere other than /media will stop it showing up in places:

    Code:
    /dev/sdb1       /mnt/archive    ext3   defaults  1  2
    I didn't use a UUID because I'm lazy.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •