Dracut: add drivers to your initrd

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 Dracut: add drivers to your initrd is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
Categories: IT

Leave a Reply