Modifying the initrd.img to run additional binaries in a PXE booted RHEL 6

Posted by Charles Long on Server Fault See other posts from Server Fault or by Charles Long
Published on 2012-05-31T08:43:52Z Indexed on 2012/06/03 10:42 UTC
Read the original article Hit count: 286

Filed under:
|

I am trying to add additional automation to our existing RHEL 6 (or Oralce's implementation thereof) PXE install process by running a script in the %pre section of my kickstart config that call hpacucli, HP's raid device configuration binary.

My approach has been to modify the PXE served initrd.img. I've unpacked the initrd.img and copied in the required libraries, binaries, and scripts but when the system boots using the modified initrd.img, the modified /lib (and /lib_64) are moved aside to /lib_old and /lib is linked to the /mnt/runtime/lib. How can I change this configuration so that the /lib is not moved (unlikely) or required libraries are available in the runtime /mnt/runtime/lib?

To test and confirm this I've been able to get the install process to move to the 6th virtual console, which allows me to see errors, and then open a shell (a useful debugging mechanism).

%pre
exec  /dev/tty6 2> /dev/tty6
chvt 6

/bin/sh

© Server Fault or respective owner

Related posts about pxeboot

Related posts about rhel6