0

I am quite confused if hal is really in use or just udev.

What I understood:

  • In general, HAL is an abstraction layer that allows an operating system to interact with a hardware device.

  • And daemon hald is different from HAL. It is a service which provides HAL and is used for identifying devices and then mounting them (and where they would be, under /dev?) or configuring them automatically for applications' use.

  • And it is now deprecated by udev, which also does a similar thing i.e., automounting the devices as they are connected by reading messages from kernel and naming according to the predefined rules.

  • And currently only few GUI based applications like GNOMe use hald, to get notification about newly connected devices (while the mounting is still taken care by udev?)

    So my question is if hal is only used for notifiying GUI based applications about newly connected hardware as it can communicate through DBUS, but udev doesn't have dbus implementation. And for automounting devices, only udev does that and no where hal is used?

And I am paricularly talking about Redhat 5,6 and 7.

Thanks.

GP92
  • 599
  • 2
  • 6
  • 25

1 Answers1

2

Some background: udev has existed for ages (since the 2.5 kernel) and (for RHEL) it is the thing that sets up device nodes when drivers announce announce hardware. Even on systems that were using HAL, there was still udev underneath. udev itself can call out to other programs when it "spots" changes and HAL was an attempt to abstract away the announcement and configuration of certain pieces of new hardware for desktop *nix systems (not just Linux but others like FreeBSD too). Eventually, people did away with certain pieces of HAL but not all pieces of HAL were movable into udev - some of it split off into other daemons. By about 2012, most cutting edge Linux distros had abandoned HAL and these days (start of 2019) the aforementioned daemons are things like udisks, upower etc. There's a nice summary of what happened over on https://en.wikipedia.org/wiki/HAL_(software)...

So given that RHEL is loosely based off Fedora (a rough mapping can be seen on https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux#Relationship_with_Fedora ) and given we know it was Fedora 16 that was HAL-free:

  • RHEL 5 will definitely have hald
  • RHEL 6 will likely have hald
  • RHEL 7 does not have hald and other daemons will have taken over things udev couldn't be convinced to do.

How to find[ ]out if haldaemon is being used or udev in RHEL server?

Just start the appropriate version of RHEL and do something like:

rpm -qa "*hal*"

(Oh no I've just realised you've hidden multiple questions in one :-( )

And daemon hald is different from HAL. It is a service which provides HAL and is used for identifying devices and then mounting them (and where they would be, under /dev?) or configuring them automatically for applications' use.

Devices are under /dev but whether I then need to "mount" a device is context dependent. I might mount a disk (e.g. under /mnt but there are other places things get mounted too) but I don't mount a scanner (announcing/finding scanners is something that HAL dealt with).

And it is now deprecated by udev, which also does a similar thing i.e., automounting the devices as they are connected by reading messages from kernel and naming according to the predefined rules.

Sometimes it's done only by udev, sometimes other services get involved too. /dev device naming is under udev control, yes.

And currently only few GUI based applications like GNOM[E] use hald, to get notification about newly connected devices (while the mounting is still taken care by udev?)

Well, modern systems don't have hald so your question is weird and complicated. Further, even on systems that did, the answer is "it depends". Yes udev can do mounting but sometimes things like attaching attaching a USB camera via the PTP protocol is handled pretty much by GNOME userspace (although I guess you can argue about the whole FUSE angle).

So my question is if hal is only used for notifiying [sic] GUI based applications about newly connected hardware as it can communicate through DBUS, but udev doesn't have dbus implementation.

Is this a question? HAL was used for notifying GUI apps but it could also trigger other things (e.g. tweaking power rules/mounting of disks) upon device changes.

And for automounting devices, only udev does that and no where hal is used?

Again it's a joint effort. Yes, udev rules to do a lot but depending on context other things may be involved (e.g. if you need to start prompting the user) and that's where things like udisks start getting involved.

I guess there's a subtext here though: why are you asking about whether HAL is used? You might be better off just asking that question directly...

(These multi-part questions are painful :-( )

Anon
  • 1,210
  • 10
  • 23