hal hint for annoying partition mounts

Tom Horsley tom.horsley at att.net
Sat Nov 17 03:25:37 UTC 2007


I found it remarkably irritating that Fedora 8
mounts all the partitions which I deliberately
left out of the FSTAB because I didn't want to
access them.

After some help from the hal mailing list, I found
how to make it stop:

Create a .fdi file (the name at least some distros
use is no-fixed-drives.fdi) in the /etc/hal/fdi/policy/
directory, and stick this xml in it:

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->

<deviceinfo version="0.2">
  <device>
    <match key="@block.storage_device:storage.hotpluggable" bool="false">
      <match key="@block.storage_device:storage.removable" bool="false">
        <merge key="volume.ignore" type="bool">true</merge>
      </match>
    </match>
  </device>
</deviceinfo>

This will tell hal not to blab about fixed disks and so gnome will
never get told to mount them. By the same token, I fixed my problem
with the USB backup disk I don't want anyone to mount by creating
the stop-hal-stop.fdi file that looks very similar:

<?xml version="1.0" encoding="UTF-8"?>

<deviceinfo version="0.2">
  <device>
    <match key="volume.label" string="BACKUP">
       <merge key="volume.ignore" type="bool">true</merge>
    </match>
  </device>
</deviceinfo>

In this case I specifically look for the label I put on the
partition.




More information about the fedora-list mailing list