Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
is there a way to "blacklist" a hardware device from hal? i have problems with my toshiba cdrw/dvdrw and hal, and I want to configure it to run without listening for events on this device.
Try editing /etc/fstab by puting your own entry for the device in fstab. Do so while the device is not connected or hal will autogenerate an entry for the device. If you do this properly, hal will respect your entry and not attempt to autogeneragte a fstab entry for the device when it is connected. At least that's what I've found.
Originally posted by kilgoretrout Try editing /etc/fstab by puting your own entry for the device in fstab. Do so while the device is not connected or hal will autogenerate an entry for the device.
thanks. the device (/dev/hdb) is my cd/dvd drive in a laptop so I hessitate to physically disconnect it. maybe i can kill hald, edit fstab, and then restart it?
is there a kernel parameter to ignore a device at boot?
I've only tried this trick with usb devices that were giving hal problems and it worked. I assumed your drive was one that connected through the pcmcia slot, i.e. it was removable. That type of device would normally be picked up by hal. Please post your fstab. Try something like this for hdb:
/dev/hdb <mount point> auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec,users 0 0
you're right, hal won't write over that line if it there. I replaced the "managed" line for hdb with your suggestion, ran /etc/init.d/haldaemon restart and the new line remained unchanged. My problem didn't get fixed. I get the messages
Code:
Oct 11 08:19:05 oszver kernel: ATAPI device hdb:
Oct 11 08:19:05 oszver kernel: Error: Not ready -- (Sense key=0x02)
Oct 11 08:19:05 oszver kernel: Incompatible medium installed -- (asc=0x30, ascq=0x00)
Oct 11 08:19:05 oszver kernel: The failed "Read Cd/Dvd Capacity" packet command was:
Oct 11 08:19:05 oszver kernel: "25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "
every 2 seconds in /var/log/messages if my drive is empty. Killing hald is the only way I have been abble to stop these messages, but I do not _KNOW_ it's hal. These messages persist after putting your line of code in fstab, so maybe it is more complicated than hal and my cd?
the config files seem to be xml located somewhere in /usr/share/hal. The article will give you some overview of how hal is implemented in FC. It references some command line utilities, lshal, hal-get-property, hal-set-property, and hal-device-manager. Hal-device-manager is a gui tool and might be a good place to start. Perhaps you can reset some properties for the device there.
the above article give a good crash course in how hal identifies and works with devices.
OK, I have a work around until they fix the above refrence bug.
which was at the end of my file. I'm not sure what the info.addons key does, but some experimentation with hal options indicated that that the
storage.media_check_enabled variable set to "true" is not the culprit. There could be unknown (to me) consequences as well! All I know is that the horrible
erro message is now written three times at boot, and never more! Maybe this will help someone else out too.
Glad you found a workaround. I was curious and looked into this a bit myself. Apparrently to blacklist a device, you have to create an fdi file for it somewhere in /usr/share/hal/fdi. Those are all xml files and I have no idea on how to even start doing that. Worse yet, there is very little documentation on hal or fdi configuration. The whole thing is bringing back nightmares of editing the windows registry.
this should, i think, tell hal to skip the append key action for /dev/hdb, but it will continue the append key action for other storage devices (i.e., it woun't mess with hal's hadling of usb drives, cameras etc...
i'll post a follow up if it works. the errors at boot will be gone as well, or at least that's my guess.
from being applied to my cd/dvd drive. that is, "storage.media_check_enabled" bool="true" is no longer a "match". Now I am speaking out of school, but killing this append key stops my error messages without killing the same feature for cameras etc... here's some evidence that all is as I think it is from the output of lshal
I updated my kernel to 2.6.15-1.1830_FC4smp i686 today (with yum update kernel), and the hal problem is gone as is verified by commenting out the above code and restarting haldaemon with
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.