Tiny Core Base > TCB Q&A Forum
Kernel modules in multiple initrd files
qopit:
I'm trying to master an additional initrd (beyond core.gz) that has kernel modules in it.
eg: initrd=/tce/boot/core.gz,/tce/boot/scsi_drivers.gz
Is this possible, or do I need to remaster the "first" initrd (core.gz above) to include my new modules? This is what I have been doing so far, but isolating the initrd would be nice.
My confusion is on how to merge the dep data in the additional initrd with the original one. How is the initial dep data even loaded for kernel modules in the initrd? I gather that for tcz/extensions it is done dynamically via insmod, but... ??
Juanito:
You'd perhaps be better to start with rootfs.gz and modules.gz rather than core.gz
i.e. replace:
--- Code: ---initrd=/tce/boot/core.gz
--- End code ---
..with:
--- Code: ---initrd=/tce/boot/rootfs.gz, /tce/boot/modules.gz
--- End code ---
..then you'd only have to mess with the modules part of things
gerald_clark:
Dep data is in files modules.dep, modules.symbols, and modules.alias in /lib/modules/3.8.13-tinycore/
You would have to include these updated files in the second initrd.
Another option is to use the pretce boot option "pretce=RAM".
Add to your second initrd the executible file /tmp/onpre.sh that contains the following command.
depmod -a
This will cause tc-config to run the file before drives are mounted to access the tce directory.
qopit:
Juanito:
Thanks for the advice on dealing with rootfs.gz and modules.gz separately. I am definitely doing this.
gerald_clark:
If the modules.* files are included in the second initrd, won't they overwrite the ones from the first one? I don't understand how this would work.
The pretce option is a cool one. I did not know about that! However, I was curious how long that would take on every boot:
--- Code: ---$ time sudo depmod -a
real 0m 1.53s
user 0m 0.46s
sys 0m 0.35s
--- End code ---
Not enormous, but more than I want to pay if inclusion in the (re)master avoids it. :)
curaga:
--- Quote ---If the modules.* files are included in the second initrd, won't they overwrite the ones from the first one? I don't understand how this would work.
--- End quote ---
Yes, so they should be the complete dep files (for modules in all initrds). But the easiest way with no duplication is to remaster modules.gz with your added modules, and update the .dep there.
Navigation
[0] Message Index
[#] Next page
Go to full version