initrd kernel replacement

ssd2 edited this page Aug 17, 2016 · 6 revisions

If your hardware is newer than the CentOS release you are using, network or other drivers required to successfully install may be missing.

The following solutions are available to fix this:

  1. Upgrade to a newer release of CentOS
  2. Rebuild the kernel roll from rocks source and a sufficently up to date linux kernel source tarball
  3. If you have a working kernel (via yum or otherwise) that supports the hardware, you can inject it into the initrd disk with the following quick and dirty procedure
It would be interesting to add a rocks command to do this procedure.

Table of Contents

Quick and dirty pxe boot kernel replacement

Note that version numbers listed here are relevant to Rocks 6.1, adjust as necessary.

Update your kernel (if necessary)

Rebuild from source or yum update kernel or use existing updated kernel

Build a replacement initrd

unpack distribution initrd

 mkdir newinitrd ; cd newinitrd
 lzma -d < /tftpboot/pxelinux/initrd.img-6.1-x86_64 | cpio -id

remove the modules from the previous kernel

   rm -rf modules/2.6.32-431.el6.x86_64

copy modules from a newer kernel already installed on the system

   cp -R /lib/modules/2.6.32-431.el6.x86_64 modules/

repack the initrd

  find . | sudo cpio --create --format='newc' | lzma -9 > ../initrd.img-2.6.32-431.el6.x86_64
  cd ..

Install the new kernel and initrd for pxeboot

 cp initrd.img-2.6.32-431.el6.x86_64 /boot/vmlinuz-2.6.32-431.el6.x86_64 /tftpboot/pxelinux/

Create a new bootaction entry

calculate the necessary ramdisk size

 size=`du -sk newinitrd | awk '{print int($1/1000)*1000+1000}'` ; echo $size

examine the existing install bootactions

 rocks list bootaction | grep ^install

add a new bootaction (note: use options from above but replace kernel, ramdisk, and ramdisk_size)

 rocks add bootaction action=install-431 kernel=vmlinuz-2.6.32-431.el6.x86_64 ramdisk=initrd.img-2.6.32-431.el6.x86_64  "args=ks ramdisk_size=170000 lang= devfs=nomount pxe kssendmac selinux=0 noipv6 ksdevice=bootif"

set a node to use the new kernel at install pxeboot (for example, or replace the default install action)

  rocks set host installaction action=install-431 compute-0-0


Anaconda will pop up a "unsupported hardware" warning which requires you to click on OK and then it will continue. This can be done from a serial console if you create a headless configuration.

Alternately, add


to the kickstart file. Apparently this fix is for CentOS 6.4, so you would need at least Rocks 6.1.1 for it to work. Possibly, also, a newer kernel may not have this issue. For example kernel 2.6.32-573 includes support for Broadwell EP (E5-26XX v4).

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.