How do I make GPT-formatted partitions appear only once in GNOME and KDE?

Hello and good morning!

I have a question regarding GNOME 2 and KDE 4. On my Mac running FreeBSD with the mentioned window managers, when I open a new Nautilus window, on the left part where the list of partitions appear, there are, as you can see from the attached image, a repetition of each partition. In my Mac I have 2 hard disks:
  • One GPT-formatted SSD with the names "Maverick" (named after the upcoming release of OS X, a case sensitive partition), two Recovery HD partitions (for reinstalling OS X) and games (where I store apps and games that don't support case sensitivity).
  • And one regular 5400 rpm MBR formatted drive with a partition named "Users" (where I store the OS X user files), one FreeBSD partition as well as a "BOOTCAMP" partition where I run Windows (Macs love to call the Windows partition for "BOOTCAMP").

As I hope you can see from the description above, all of the GPT partitions appear three times each, and the MBR formatted partitions only appear once. If I insert a GPT-formatted USB, the partitions in that USB also appears more than once.

My question is: How can I make the GPT formatted partitions appear only once in that list?

Thanks in advance. :)
 

Attachments

  • Screenshot3.jpg
    Screenshot3.jpg
    51.9 KB · Views: 483
Possibly this is due to HAL detecting the GPT partitions in multiple ways. It may be possible to edit the entries in the HAL fdi directories to prevent this, but it's been years since I've had HAL installed and don't recall the details.
 
I also think that part of the problem is that GPT partitions have at least two device nodes (or three if we include the symbolic links) in /dev:
  1. /dev/adaXpY and /dev/adXpY
  2. /dev/gpt/name

If you, on the other hand, take a look at a disk formatted with MBR, there are no /dev/mbr, so that the only nodes in /dev (as far as disks are concerned), are /dev/adaXsY.

It's just a thought, and I may be wrong, and if I am, please correct me. :)
 
I solved it by adding the following lines to /usr/local/etc/hal/fdi/preprobe/10-ignore-partitions.fdi:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
  <device>
    <match key="block.device" string="/dev/ada0p1">
      <merge key="info.ignore" type="bool">true</merge>
    </match>
  </device>
  <device>
    <match key="block.device" string="/dev/ada0p2">
      <merge key="info.ignore" type="bool">true</merge>
    </match>
  </device>
  <device>
    <match key="block.device" string="/dev/ada0p3">
      <merge key="info.ignore" type="bool">true</merge>
    </match>
  </device>
  <device>
    <match key="block.device" string="/dev/ada0p4">
      <merge key="info.ignore" type="bool">true</merge>
    </match>
  </device>
  <device>
    <match key="block.device" string="/dev/ada0p5">
      <merge key="info.ignore" type="bool">true</merge>
    </match>
  </device>
</deviceinfo>
 
andersbo87 said:
I also think that part of the problem is that GPT partitions have at least 2 device nodes (or 3 if we include the symbolic links) in /dev:
1) /dev/adaXpY and /dev/adXpY, and
2) /dev/gpt/name

If you, on the other hand, take a look at a disk formatted with MBR, there are no /dev/mbr, so that the only nodes in /dev (as far as disks are concerned), are /dev/adaXsY.

It's just a thought, and I may be wrong, and if I'm, please correct me. :)

You're correct. It varies. Partitions may not have GPT labels, and filesystems can have labels which will add yet another thing for HAL to detect, even on an MBR disk.
 
Back
Top