Dracut: add drivers to your initrd
29 May 2011 by David (admin)
My HP 8150w laptop has this neat lis3lv02d accelerometer to be able to detect when it's falling and to park the harddisk to prevent damage. I use this instrument to detect whether I'm on the road or at the office. This way, I can set preferences at boot-time, even before the network settings are loaded.
I have added a few scripts to my initrd, which are not very interesting. But what is, is the driver required to do this.
I created a file named /etc/dracut.conf.d/tilt.conf which contains:
add_drivers="$add_drivers hp_accel lis3lv02d input_polldev"
After creating a new initrd by running dracut, my scripts can see the x/y/z tilt of the machine by reading from /sys/devices/platform/lis3lv02d/position© GeekLabInfo 
