nixscripter n00b
Joined: 14 Jun 2008 Posts: 72 Location: Somewhere Cold, USA
|
Posted: Sat Jul 26, 2014 9:53 pm Post subject: [Solved] Getting Genkernel to load extra modules at boot |
|
|
I'm posting this for the next person who does a Google search on this. I hope also that someone working on genkernel will read this and update the man page.
I have an exotic 586 PC (no, that is not a typo) that I'm getting Gentoo set up on. I managed to get the thing to boot, but I couldn't get it to load the exotic IDE driver it needed ("via82cxxx" module). Genkernel didn't see that driver as important to copy over, apparently, so it wasn't in the initramfs. As a workaround, I had genkernel put all of the modules in the initramfs, and then I could manually modprobe the driver in the emergency shell. Once I did that, everything was fine.
But I didn't want to do that every time. So I tried to figure out how to get that added to the correct module group in genkernel, which was MODULES_PATA. After spending almost 2 hours trying and failing to get a callback hook to dynamically override the variable, digging deeper and deeper into the scripts, I discovered an undocumented feature in the genkernel "main" script.
All I had to do was put this into the genkernel config file:
Code: | AMODULES_PATA="via82cxxx" |
And that resulted in this nice message:
Code: | * Using genkernel.conf from /etc/genkernel.conf
* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86/config.sh ..
* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86/modules_load ..
* <config> Merged AMODULES_PATA:'via82cxxx' into MODULES_PATA
|
And then it was added to the initramfs.
Hope this helps someone. |
|