I have a custom RHEL7.8 installation ISO which works exactly as expected when I burn it to a DVD and install using that disk using UEFI. Now I am trying to update this to support installation from USB. I am able to generate an ISO and selected it as the boot device on my test system, however when I make my selection in the grub menu to trigger the installation I get an error:
error: file '/images/pxeboot/vmlinuz' not found.
error: you need to load the kernel first.
Press any key to continue...
What does this error mean and how do I fix this?
I have updated the /EFI/BOOT/grub.conf
entry to reflect the media being USB rather than DVD
menuentry 'Option 1' --class fedora --class gnu-linux --class gnu --class os {
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=MY_USB_LABEL quiet inst.ks=hd:LABEL=MY_USB_LABEL:/config/opt1/anaconda-ks-option1.cfg
initrdefi /images/pxeboot/initrd.img
}
as well as copied the update grub.conf
into images/efiboot.img
.
mount images/efiboot.img /tmp/img
cp EFI/BOOT/grub.conf /tmp/img/EFI/BOOT/grub.conf
umount /tmp/img
The kickstart file is also updated to reflect the USB media (and I can use it successfully via Legacy Boot)
repo --name="USB Media" --baseurl=file:///mnt/install/repo # Added for USB install, not sure if necessary
install
harddrive --partition=LABEL=MY_USB_LABEL --dir=/ # in lieu of cdrom for DVD installation
I'm generating the ISO itself via mkisofs
mkisofs -quiet -o test.iso \
-b isolinux/isolinux.bin \
-J -R -l \
-c isolinux/boot.cat \
-no-emul-boot \
-boot-load-size 4 \
-boot-info-table \
-eltorito-alt-boot \
-e images/efiboot.img \
-no-emul-boot \
-graft-points \
-joliet-long \
-V MY_USB_LABEL iso_source/
isohybrid -uefi test.iso
implantisomd5 test.iso
and then "burn" it to the USB device
dd if=test.iso of=/dev/sda
sync
Thanks for any ideas, thoughts, or other feedback!
Finally figured out what's going on... there's a
search
line in thegrub.conf
which also needs to be updated with the label of the drive. In a nutshell, for CD/DVD use this line isn't really necessary (it appears), meaning that when preparing this for DVD installation a few years back I assumed it was akin to the title that appears inisolinux.cfg
. Consequently this this was written as:whereas in reality this is used to determine where the boot partition for the installer is and should read
Not sure why it worked when installing from DVD, but I guess there's a "backup" mechanism to look for the boot partition on the DVD?