Compiling Custom “vmlinuz” PXE Kernel?

Home » CentOS » Compiling Custom “vmlinuz” PXE Kernel?
CentOS 3 Comments

Hello CentOS list, I still need help.

Does anyone know how I would go about creating my own “vmlinuz” PXE
kernel? I’m still trying to get the NUC6CAYH to load to a LiveCD, and I’m getitng nowhere with Intel.

My company wants to do hundreds of these per month; we’re not above paying for professional help at this point.

My current line of reasoning is to get whatever specialized memory and CPU
drivers the NUC6CAYH requires to recognize properly and bake them in to a custom vmlinuz PXE kernel that loads the initial ramdisk image. This kernel is located in a regular CentOS 7.3 DVD at CentOS-7-x86_64-DVD-1611/images/pxeboot/vmlinuz.

Has anyone done this before? Is there documentation online?

3 thoughts on - Compiling Custom “vmlinuz” PXE Kernel?

  • Hello,

    long time ago we did this for VMware Tools and CentOS/RHEL 5. Basically, you need to extract the vmlinuz using gzip/cpio, add the necessary information and pack again. If you search for something like ‘adding VMware Tools to RHEL 5’ you should get a quite descriptive result…

    If worked for RHEL5/6, so it will work for 7 as well.

    //Zdenek

  • If I understand correctly you are wanting to build a kernel to boot the install process with, i.e., boot to run anaconda. For some reason I never had any luck [with EL4] replacing the modules in the anaconda initrd.img with the ones for the kernel I built, so I took a more *brittle* path. I built a kernel that included *_all_* the drivers I needed (and only those *_needed_*) built into the kernel itself, i.e., *not* as modules. I then set the process up to boot from the vmlinuz I built. It was not right to ignore the mods in the initrd, but it worked enough to get us going, IIRC it was because some USB driver we needed was not built in and we were installing from a USB hard drive. Also note, you need to grab the kernel config for an EL kernel of your distro and start modifying from there because some of the later tools in the install chain expect most of the kernel to be configured as RH would do it.

    *_all_* – using this method you can’t depend on ANY modules, everything you need to activate all the hardware in the system has to be in the kernel image (vmlinuz). If you can figure out how to correctly mod the initrd then you can use some modules again, and then only the modules you need to boot and read the initrd have to be in vmlinuz. Also I don’t recall what they are, but there are some size limits to how big vmlinuz can be, so don’t just build every driver into the kernel.

    Good luck.