Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How Do I Go About Customizing a Genkernel Created initramfs?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
eno2001
Tux's lil' helper
Tux's lil' helper


Joined: 20 Oct 2006
Posts: 136

PostPosted: Wed Jul 02, 2008 3:25 pm    Post subject: How Do I Go About Customizing a Genkernel Created initramfs? Reply with quote

I am running Gentoo as a virtual machine on the VirtualIron platform. One of the more recent changes to VirtualIron is that they now have source code available for their VSTools virtualization assistance drivers and software. I got it to build using the gentoo-sources-2.6.16 kernel in Portage. I've modified the RedHat script for starting the statistics daemon so it will work by adding /etc/init.d/vi_os_statsd start|stop to /etc/conf.d/local.start|stop. The kernel modules can load just fine, but... this is where I hit a snag. When I rebooted the system and told VirtualIron that VSTools were installed on the VM, the system failed to find the root filesystem. This is because one of the drivers is the 'xen_vbd' driver which presents a xen virtual block device to the guest for improved disk I/O. This driver takes the place of the QEMU virtual disk system. The solution, as far as I can tell, is to get the VSTools xen drivers into initramfs. I prefer to use Genkernel to build my kernels and initramfs as they're pretty rock solid. But, I have yet to find any good resources for how I go about modifying a Genkernel created initramfs. I've found a few articles on how to create one from scratch, but I really want to avoid that if at all possible. Ideally, I'd love to know if there is some way to tell Genkernel to include extra modules from a specific location into initramfs. Something like (which doesn't exist as far as I can tell):

genkernel --initramfs-additions=/lib/modules/2.6.16-gentoo-r13/virtualiron/

My second choice would be to use the already built initramfs, extract it, modify it to include the modules, then rebuild it to work with my kernel. But this seems like quite an undertaking. I could be wrong... but it just doesn't seem as easy. And since it's likely I'll only be doing this when there are VirtualIron upgrades, it won't be a frequent occurrence. So it would, sadly be easy to forget even in light of documentation. Anyone have any suggestions?
Back to top
View user's profile Send private message
nativemad
Developer
Developer


Joined: 30 Aug 2004
Posts: 918
Location: Switzerland

PostPosted: Wed Jul 02, 2008 5:01 pm    Post subject: Reply with quote

Hi,

It is under /usr/share/genkernel/gen_initramfs.sh
I would enter something like
Code:

cp /lib/modules/2.6.16-gentoo-r13/virtualiron/* ${INSTALL_MOD_PATH}

under append_modules()


But be aware, that it gets overwritten with the next emerge of genkernel...

Cheers! :P
_________________
Power to the people!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum