For odd reasons, I am attempting to add a driver to an initrd.img.
Using the exact same kernel as on the original media, I have built a driver module.
I have extracted pxeboot/initrd.img into: /tmp/img/original
I have extracted the /tmp/img/original/modules/modules.cgz file into: /tmp/img/moddir
I have added the properly built modules into: /tmp/img/moddir/2.6.18-8.el5/x86_64
I have manually edited: /tmp/img/original/modules/modules.dep
I rebuilt the initrd.img using these steps:
# cd /tmp/img/moddir # find 2.6.18-8.el5 -depth -print | cpio --quiet -H crc -o | gzip -9 > /tmp/modules.cgz # cd /tmp/img/original # cp /tmp/modules.cgz modules/ # find . | cpio --quiet -c -o | gzip -9 > ../initrd.img
I then copied the initrd.img to the proper PXE/TFTP directory, and tested a boot to it.
It starts an install with no obvious errors, but the modules won't load.
What did I miss?
I am doing it remote with no access to <ALT>F3 or <ALT>F4
I will attempt to get over to the system and try from there to provide additional info, but I was hoping someone could spot an idiot mistake in my steps.
Thanks for any help.
Phil Meyer wrote:
For odd reasons, I am attempting to add a driver to an initrd.img.
Using the exact same kernel as on the original media, I have built a driver module.
Hey Phil,
*Everytime* I've tried taking a shortcut and hacked the initrd.img I've hit some other issue that makes it not work. :/
Can I make a suggestion? Your best bet is to modify the kernel source rpm with your changes, rebuild the kernel, and then rebuild the distro using jkeating's pungi.
Yes, this takes longer than trying to hack the initrd.img, but in the long run you'll realize the "rebuild-kernel-rebuild-os" is much easier to do. :)
P.
Prarit Bhargava wrote:
Phil Meyer wrote:
For odd reasons, I am attempting to add a driver to an initrd.img.
Using the exact same kernel as on the original media, I have built a driver module.
Hey Phil,
*Everytime* I've tried taking a shortcut and hacked the initrd.img I've hit some other issue that makes it not work. :/
Can I make a suggestion? Your best bet is to modify the kernel source rpm with your changes, rebuild the kernel, and then rebuild the distro using jkeating's pungi.
This is not a good way of doing. better use *mkinitrd* it works for me. even hacking initrd works for me.
Yes, this takes longer than trying to hack the initrd.img, but in the long run you'll realize the "rebuild-kernel-rebuild-os" is much easier to do. :)
P.
-- Fedora-buildsys-list mailing list Fedora-buildsys-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-buildsys-list
buildsys@lists.fedoraproject.org