11/23/2007
Having HAL ignore devices
Robin was having issues with a CD-ROM drive that caused his system to hard lock whenever HAL was started. Now HAL ships with hal-disable-polling that allows you disable polling of the CD-ROM drive for media changes however this still does not prevent HAL from scanning the drive when HAL starts up. When HAL starts up it sends your ATAPI devices a capabilities query and it appears this query is what’s causing robbat2’s issue. So we had to come up with a custom FDI file to make HAL ignore the device entirely.
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<match key="block.device" string="/dev/hda">
<merge key="info.ignore" type="bool">true</merge>
</match>
</device>
</deviceinfo>
Drop into a file and save it into /etc/hal/fdi/preprobe and viola, HAL will completely ignore this device and you will be all set.
Edit: I was asked to provide a license under which the above snippet is under. Basically, do with the above what you wish. So it’s under a 2-clause BSD license, copyright to me, Doug Goldstein (Doug Klima) effective from the date this post was made. A copy of a 2-clause BSD license is available at: http://www.freebsd.org/copyright/freebsd-license.html
Filed under: General, HAL, Linux
2 Responses to “Having HAL ignore devices”
Leave a Reply
November 27th, 2007 at 12:34 pm
Would this also help to make HAL ignore a RAMdisk I use for compiling?
I have this:
# mount | grep ramp
tmpfs on /mnt/ramportage type tmpfs (rw,size=2000m,mode=1777)
# grep ramp /mnt/root32/etc/make.conf
PORTAGE_TMPDIR=”/mnt/ramportage”
And I get an icon for this on my GNOME desktop and in the gnome-applet (named “Disk Mounter” I think).
Maybe your trick would help to hide it there as well?
What would the entry be as there is nothing like “/dev/hda” in my mount?
Thanks, greets, Stefan
February 27th, 2008 at 10:52 am
Interesting that you have having that occur for you. You could tweak that to match on volume.mount_point = /mnt/ramportage and it would work for you.