How to put VMware guest drivers in the initrd

rhel5vmware-esx

I am trying to get a Red Hat 5.8 box booting via pxe. The box is a virtual machine on ESX5.0 it has a Paravirtual SCSI Controller and VMXNET3 network driver. Now these drivers do not come default in the RHEL5.8 kernel so I have followed some steps on the net to make my own initrd.img file. This is not yet working and any advice on how to get this done would be appreciated. However the main aim of my question is the following:

on my imported repo there is at least two places where initrd.img files are available:
cobbler/ks_mirror/OEL5.8-x86_64/isolinux/
cobbler/ks_mirror/OEL5.8-x86_64/images/pxeboot/

I am curious to understand what the difference is. A small white lie, I am using Oracle Linux… not by choice, but is should be the same for all intents and purposes.

I would also like to understand what the difference is between the initrd.img file that can be found in the /boot directory after a server is installed and the one found on the CDROM and/or cobbler repository. If I copy the initrd.img file from a box with vmwaretools installed, I get a kernel panic when trying to boot of the initrd.img file. There is a size difference so I have assumed that essentially the difference is that one contains more drivers and the other only drivers important to the server, but why the kernel panic.

I feel that I am following instructions on the web on building or adding more drivers to my kernel a bit blindly and that if I understand slightly better what I am doing then maybe I will know where it goes wrong.

Best Answer

You're making it a bit hard on yourself. You should really use the PVSCSI drivers for data partitions and filesystems. It's a shame, since the drivers are in the kernel for EL6. Make the vmware-tools installation part of your post-installation or kickstart script, though.