Installation of UEFI system using PXE boot with grub2 bootloader grubx64.efi
fails with error File not found
.
- error: ../../grub-core/net/tftp.c:281:File not found.
- error: ../../grub-core/loader/i386/efi/linux.c:93:you need to load the kernel first.
-
- Press any key to continue..._
This error indicates that the grub bootloader was able to load the grub configuration file but it has not found either the kernel or the initramfs files paths which are defined in it.
Verify the tree of the tftp home directory which is usually /var/lib/tftpboot
to check the path of the kernel and the intramfs files with respect to the tftp home directory.
- # tree /var/lib/tftpboot/
- /var/lib/tftpboot/
- └── uefi
- ├── grub.cfg
- ├── grubx64.efi
- ├── images
- │ ├── initrd.img
- │ └── vmlinuz
- └── shimx64.efi
-
- # ls -lanR uefi/
- uefi/:
- total 3412
- drwxr-xr-x. 3 0 0 74 Jul 28 11:28 .
- drwxr-xr-x. 4 0 0 33 Jul 28 11:27 ..
- -rw-r--r--. 1 0 0 1503 Jul 28 11:28 grub.cfg
- -r-xr-xr-x. 1 0 0 2285512 Jul 28 11:28 grubx64.efi
- drwxr-xr-x. 2 0 0 39 Jul 28 11:27 images
- -r-xr-xr-x. 1 0 0 1202928 Jul 28 11:28 shimx64.efi
-
- uefi/images:
- total 83556
- drwxr-xr-x. 2 0 0 39 Jul 28 11:27 .
- drwxr-xr-x. 3 0 0 74 Jul 28 11:28 ..
- -rw-r--r--. 1 0 0 75530980 Jul 28 11:27 initrd.img
- -rwxr-xr-x. 1 0 0 10026352 Jul 28 11:27 vmlinuz
In the above example the path for vmlinuz
file relative to tftp home directory is uefi/images/vmlinuz
and the path of the initramfs file with respect to tftp home directory is uefi/images/initrd.img
. Setting these appropriate paths grub should be able to find the paths and start the installation.
- menuentry 'PXE Install Red Hat Enterprise Linux 8.4' --class fedora --class gnu-linux --class gnu --class os {
- linuxefi uefi/images/vmlinuz inst.stage2=http://
/ - initrdefi uefi/images/initrd.img
- }
grub
bootloader for UEFI for UEFI based systems grubx64.efi
takes the arguments for filepaths with relative to the tftp home directory.