You are not logged in.

#1 2011-12-14 14:53:22

s0ma
Member
From: Lansing, MI
Registered: 2009-06-02
Posts: 5
Website

[SOLVED] UDev and initramfs

What is the proper way to add new udev rules to the initramfs?

A little background:  I am running a luks encrypted root file system.  The key to decrypt the luks filesystem is stored on a usbkey between the mbr and the first partition.  I cannot rely on the drive being mounted as /dev/sdx every time I reboot so I have added a udev rule that creates a symlink to /dev/usbkey.  Putting this rule in /"etc/udev/rules.d/" does not work.  Putting the udev rule into the end of "/lib/udev/rules.d/60-persistent-storage.rules" and rebuilding initramfs does work.  I know adding the rule here isn't the best idea as these files can be overwritten in updates. 

I am not terribly familiar with the etiquette in early userspace and want to make sure I learn to do this the "Correct" way.  (I know "Correct" is arbitrary) big_smile

Last edited by s0ma (2011-12-14 18:45:34)

Offline

#2 2011-12-14 17:17:36

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] UDev and initramfs

Create a new rule file (in /etc/udev/rules.d probably) and add it to FILES= in /etc/mkinitcpio.conf. Regenerate your image.

Offline

#3 2011-12-14 18:45:12

s0ma
Member
From: Lansing, MI
Registered: 2009-06-02
Posts: 5
Website

Re: [SOLVED] UDev and initramfs

falconindy wrote:

Create a new rule file (in /etc/udev/rules.d probably) and add it to FILES= in /etc/mkinitcpio.conf. Regenerate your image.

Thanks Falconindy big_smile

Offline

Board footer

Powered by FluxBB