How can I disable or configure udev for initrd?
I've recently updated my Slackware 13.1 system to the Slackware current. Although I have created my "initrd" image without specifying the "-u" option to "mkinitrd" it still starts up "udev".
That is causing me some difficulty because I am using "dmraid" to detect my RAID arrays. I had created my own device names such as "/dev/sdr2" for my root partition. With 13.1 I had no problem, since "udev" was not started by the "initrd" unless the "-u" option was provided. The current version seems to start up "udev" even without that option.
Is there a way to disable "udev" in the "initrd", or is there a way to specify custom "udev" rules for an "initrd"? I tried placing a "10-local.rules" file in the "etc/udev/rules.d" directory of the "initrd-tree" but that file had no effect on the device names generated by "udev" during the "initrd".
Here is my script that creates the "initrd".
In Slackware 13.1 and previous versions, the "/dev/sdr2" device was found in the "dev" directory of the "initrd" image because my script creates it. The current version runs "udev" and does not see the actual "dev" directory. I have been able to get the system to boot by substituting the name "/dev/dm-2" instead of "/dev/sdr2" but I would like to use the same name that I use for the other partitions "/dev/sdrN" (N=1 to 7).
The "init" script is slightly modified to include one extra statement. Here is an excerpt of the modified section.
Here is my normal "udev" rules file, named "10-local.rules" that works after Linux is booted.
At the time the "initrd" tries to mount the root device the "/dev/sdr2" device has not yet been created by the normal "udev" rules. In the past I had solved that problem by creating "/dev/sdr2" in the "dev" directory of the "initrd" and the "/dev" directory of the root file-system. In previous versions of Slackware, the device "/dev/dm-2" did not exist until after the "initrd" and normal "init" script had finished.
The "menu.lst" file for "grub" has this entry to boot Linux.
It will be helpful for me to understand "udev" issues related to an "initrd" because I will eventually try to use "mdadm" instead of "dmraid". So far I have only been able to get my system to boot from the RAID array using "dmraid" and I often run into new problems when I update Linux. Still, Slackware has proven to have the best support for booting from my RAID array because of the user community, documentation and flexibility.
Partly solved - can configure udev rules for initrd
It occurred to me that perhaps even though "udev" was starting, it was not being completely included in the "initrd" because of the omission of the "-u" option to "mkinitrd". I added "-u" and now the "initrd" does pay attention to the rules in its "etc/udev/rules.d" directory. Those "initrd" rules apparently stay in effect until the normal "udev"
rules are invoked. I am able to boot using the "/dev/sdr2" name again.
Changes in bold below.
Hopefully I will not have too many issues with "mdadm" and I can move to 64-bit Slackware in the near future.
|All times are GMT -5. The time now is 07:04 AM.|