Blog
Hal Hald wont start on Ubuntu Jaunty

Hal Hald wont start on Ubuntu Jaunty

While trying to upgrade a virtual machine running on Sun VirtualBox from a console only installation to a full X11 installation I experience a problem with Hald not starting. Not only did this prevent the running of X11, even the installation could not complete successfully. It turned out that the problem was in some way linked to the file: /var/cache/hald/fdi-cache. If this is not present, hald won't start.

Doing some research with using a well known search engine. I found that some people had solved their problem using:

sudo cp /var/cache/hald/fdi-cache~ /var/cache/hald/fdi-cache
sudo chmod 755 /var/cache/hald/fdi-cache

So I did this, and found that hald did then start and I was able to complete the installation of ubuntu-desktop. However, after a reboot, when the X11 login screen (gdm) appeared, the mouse didn't move and no keyboard input was accepted. After fiddling around a bit more, I found that the following solution worked (executed from a ssh login)

sudo su -
/etc/init.d/hal stop
cd /var/cache/hald
rm *
/usr/lib/hal/hald-generate-fdi-cache #this takes quite a while.
reboot

After executing the above commands I found that the directory /var/cache/hald didn't contain the file fdi-cache~ and the generated file /var/cache/hald/fdi-cache was in fact twice the size of /var/cache/hald/fdi-cache~ I had used before.

Guessing about what the problem might be, hald when it first runs, finds the directory empty, and so runs /usr/lib/hal/hald-generate-fdi-cache automatically. It probably doesn't wait long enough for it to execute, and kills the script assuming its crashed and then dies itself. Perhaps a longer timeout in hald would work.

Posted By: admin on Oct 09, 2009 01:54PM Category:Ubuntu Add Comment

thank you ! I stupidly removed /var/cache/ contents, and hal wouldn't start and was stucked.
your post solved my problem!

:)

Posted By: horatiu on Feb 20, 2011 04:42PM