Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can not boot RHEL 7.3 by using iPXE
2016-12-20, 07:12
Post: #10
RE: Can not boot RHEL 7.3 by using iPXE
I found a way using the CentOS 7.3 kernel to make this work, but it's largely inspired by allenb CentOS 7 post : http://forum.ipxe.org/showthread.php?tid...0#pid12480

Instead of using the ELRepo Kernel, I just went with the currently updated 7.3 kernel version:

Code:
mkdir POC && cd $_
wget http://<your-centos-mirror>/centos/7.3.1611/updates/x86_64/Packages/kernel-3.10.0-514.2.2.el7.x86_64.rpm
wget http://<your-centos-mirror>/centos/7.3.1611/os/x86_64/images/pxeboot/initrd.img
mkdir {kernel,initrd,pxe-images}

This gave me the following starting structure:

Code:
/home/mathp/POC/
|-- initrd/
|-- initrd.img
|-- kernel/
|-- kernel-3.10.0-514.2.2.el7.x86_64.rpm
`-- pxe-images/

3 directories, 2 files

The following steps match the ones described by "allenb", but with a few differences in the compression used and the depmod command. I also needed to load extra modules, but that is probably just a dependency of my kickstart pre-scripts (I create a ram drive to save some settings to be used between the pre and post script).

Code:
cd kernel/
rpm2cpio ../kernel-3.10.0-514.2.2.el7.x86_64.rpm | cpio -idum
cp boot/vmlinuz-3.10.0-514.2.2.el7.x86_64 ../pxe-images/
cd ../initrd
xz -dc < ../initrd.img | cpio --quiet -i --make-directories
rm -rf usr/lib/modules/3.10.0-514.el7.x86_64
cd ..
rsync -a kernel/lib/modules/3.10.0-514.2.2.el7.x86_64 initrd/usr/lib/modules
depmod -ae -F kernel/boot/System.map-3.10.0-514.2.2.el7.x86_64 -b /home/mathp/POC/initrd
mkdir initrd/etc/modules-load.d
echo -e "loop" > initrd/etc/modules-load.d/loop.conf
echo -e "libcrc32c\nxfs" > initrd/etc/modules-load.d/xfs.conf
echo -e "fat\nvfat" > initrd/etc/modules-load.d/fat.conf
echo -e "jbd2\nmbcache\next4" > initrd/etc/modules-load.d/ext4.conf
echo -e "brd" > initrd/etc/modules-load.d/brd.conf
cd initrd/
find . 2>/dev/null | cpio --quiet -c -o | xz -9 --format=lzma >../pxe-images/initrd.img-3.10.0-514.2.2.el7.x86_64
cd ../pxe-images
ls -l
-rw-r--r-- 1 root root 52900032 Dec 19 23:04 initrd.img-3.10.0-514.2.2.el7.x86_64
-rwxr-xr-x 1 root root  5393328 Dec 19 22:49 vmlinuz-3.10.0-514.2.2.el7.x86_64

I then use the resulting vmlinuz / initrd in the very straight forward iPXE fashion:

Code:
set my-initrd initrd.img-3.10.0-514.2.2.el7.x86_64
set my-vmlinuz vmlinuz-3.10.0-514.2.2.el7.x86_64

imgfree
initrd --name initramfs ${boot-images}/${os}/${os-version}/${my-initrd}
kernel ${boot-images}/${os}/${os-version}/${my-vmlinuz} initrd=initramfs ${params}

Output:
Code:
http://[removed]/ai/boot-images/centos/7.3.1611/initrd.img-3.10.0-514.2.2.el7.x86_64... ok
http://[removed]/ai/boot-images/centos/7.3.1611/vmlinuz-3.10.0-514.2.2.el7.x86_64... ok
...
[    0.000000] Linux version 3.10.0-514.2.2.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Tue Dec 6 23:06:41 UTC 2016
[    0.000000] Command line: vmlinuz-3.10.0-514.2.2.el7.x86_64 initrd=initramfs inst.ks=http://[removed]/ai/auto-config/centos/kickstart/7.3.1611/ks-7.3.1611-server.cfg ip=dhcp BOOTIF=01-2c-60-0c-d0-ab-52 inst.sshd inst.vnc inst.text console=tty0 console=ttyS1,115200n8
...


The only thing that I found in the kernel RPM change log between the "stock" centos 7.3 kernel and this published updated version that I think might be applicable is:

Quote:* Fri Nov 04 2016 Frantisek Hrbata <fhrbata@hrbata.com> [3.10.0-514.2.1.el7]
- [firmware] efi: Fix usage of illegal alignment on efi_low_alloc (Lenny Szubowicz) [1392044 1387689]

I'm not certain where to look to find any information on that patch...

Anyway, this is by far not an ideal solution, more like an ugly patch to the problem, but at least it works, and using centos / RHEL provided kernel. I'm quite certain this is not an iPXE problem but really a problem with the stock pxelinux/vmlinuz kernel in the installation media / repo.

Hope this helps.

Math.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Can not boot RHEL 7.3 by using iPXE - mathp - 2016-12-20 07:12



User(s) browsing this thread: 1 Guest(s)