depmod & initrd.gz

Using applications, configuring, problems
Post Reply
Message
Author
Sunny
Posts: 35
Joined: Tue 20 Oct 2009, 23:11

depmod & initrd.gz

#1 Post by Sunny »

I am trying to make some minor modifications to initrd.gz (PuppyPrecise and Fatdog64-521). I want to run depmod on the initrd directory, but it complains: "WARNING: Can't read module ... Exec format error" for all the modules when I run the following command from the extracted initrd directory:

depmod -b $(pwd) -a

All the kernel modules in initrd are compressed in the gz format (for example, "cryptoloop.ko.gz"), Note that the original "modules.dep" file that is included in initrd.gz lists all files with a .gz suffix, so it must be possible to run depmod on gzipped modules.

So the question is, how do I run depmod when the kernel modules are compressed with gzip?

EDIT1: The depmod command supplied with these older distributions don't (but probably should) handle compressed modules. I found that the later Fatdog64 releases (which used a humongous initrd) did not use compressed modules in initrd. I was able to use the fatdog-split-initrd.sh command to access the initrd kernel modules, make my modifications, and rebuild initrd successfully. The newer Fatdog64-710 boot parameters simplified my project. (I wanted to boot from a Firewire Drive on a system whose bios does not recognize this as a boot drive)

EDIT2: For the PuppyPrecise release, it looks like there is depmod command supplied in initrd (in the bin subdirectory) which links to busybox. This depmod handles the gzipped modules properly. So for my original question, it looks like I should have run the command from the extracted initrd directory as:
bin/depmod -b $(pwd) -a
Also, since all the other modules were in the gz format, I gzipped the firewire modules that I added before running depmod.

Post Reply