Problem: OS not booting from local disk after loded usin pxe+uefi
Expected outcome: it will boot from local disk after loading
Foreman and Proxy versions: 3.16
Hello,
When I install OEL8 using pxe+UEFI. OS is installed.It did not boot OS from local disk after loading.
i got below error
I used below templates for loading for
provisioning twmplate: Kickstart template
PXEGrub2 template: Kickstart PXE Grub2 template
This file was deployed via ‘Kickstart PXEGrub2’ template
set default=0
set timeout=10
menuentry ‘Kickstart PXEGrub2’ {
linuxefi boot/oel8-2-AVDTsljARKBR-vmlinuz ks=http://201.201.9.18/unattended/provision network ksdevice=bootif ks.device=bootif BOOTIF=00-00-50-56-8d-d7-c4 kssendmac ks.sendmac inst.ks.sendmac BOOTIF=01-$net_default_mac
initrdefi boot/oel8-2-AVDTsljARKBR-initrd.img
}
PXELinux template: Preseed PXE GRub2
This file was deployed via ‘Preseed PXEGrub2’ template
Supported host/hostgroup parameters:
blacklist = module1, module2
Blacklisted kernel modules
lang = en_US
System locale
set default=0
set timeout=10
menuentry ‘Preseed PXEGrub2’ {
linux boot/oel8-2-AVDTsljARKBR-vmlinuz interface=auto url=http://201.201.9.18/unattended/provision ramdisk_size=10800 root=/dev/rd/0 rw auto hostname=ol08tst02.sstech.com console-setup/ask_detect=false console-setup/layout=USA console-setup/variant=USA keyboard-configuration/layoutcode=us localechooser/translation/warn-light=true localechooser/translation/warn-severe=true locale=en_US BOOTIF=01-$net_default_mac
initrd boot/oel8-2-AVDTsljARKBR-initrd.img
}
Please help me
lzap
August 24, 2020, 11:07am
2
Can you do this command on the OEL8:
find /boot
Pastebin the output. It probably have a different /EFI subtree structure.
[root@ol08ctl00 ~]# find /boot
/boot
/boot/efi
/boot/efi/EFI
/boot/efi/EFI/redhat
/boot/efi/EFI/redhat/BOOTX64.CSV
/boot/efi/EFI/redhat/mmx64.efi
/boot/efi/EFI/redhat/fonts
/boot/efi/EFI/redhat/grubx64.efi
/boot/efi/EFI/redhat/grubenv
/boot/efi/EFI/redhat/shimx64.efi
/boot/efi/EFI/redhat/grub.cfg
/boot/efi/EFI/BOOT
/boot/efi/EFI/BOOT/BOOTX64.EFI
/boot/efi/EFI/BOOT/fbx64.efi
/boot/grub2
/boot/grub2/grubenv
/boot/loader
/boot/loader/entries
/boot/loader/entries/6e5b4e46fc2646dbb211d687ec7995d7-4.18.0-193.el8.x86_64.conf
/boot/loader/entries/6e5b4e46fc2646dbb211d687ec7995d7-0-rescue.conf
/boot/loader/entries/6e5b4e46fc2646dbb211d687ec7995d7-5.4.17-2011.1.2.el8uek.x86_64.conf
/boot/loader/entries/6e5b4e46fc2646dbb211d687ec7995d7-4.18.0-193.1.2.el8_2.x86_64.conf
/boot/loader/entries/6e5b4e46fc2646dbb211d687ec7995d7-5.4.17-2011.2.2.el8uek.x86_64.conf
/boot/loader/entries/6e5b4e46fc2646dbb211d687ec7995d7-4.18.0-193.14.3.el8_2.x86_64.conf
/boot/loader/entries/6e5b4e46fc2646dbb211d687ec7995d7-5.4.17-2011.5.3.el8uek.x86_64.conf
/boot/vmlinuz-4.18.0-193.el8.x86_64
/boot/System.map-4.18.0-193.el8.x86_64
/boot/config-4.18.0-193.el8.x86_64
/boot/.vmlinuz-4.18.0-193.el8.x86_64.hmac
/boot/symvers-4.18.0-193.el8.x86_64.gz
/boot/initramfs-4.18.0-193.el8.x86_64.img
/boot/vmlinuz-0-rescue-6e5b4e46fc2646dbb211d687ec7995d7
/boot/initramfs-0-rescue-6e5b4e46fc2646dbb211d687ec7995d7.img
/boot/vmlinuz-5.4.17-2011.1.2.el8uek.x86_64
/boot/System.map-5.4.17-2011.1.2.el8uek.x86_64
/boot/config-5.4.17-2011.1.2.el8uek.x86_64
/boot/.vmlinuz-5.4.17-2011.1.2.el8uek.x86_64.hmac
/boot/symvers-5.4.17-2011.1.2.el8uek.x86_64.gz
/boot/initramfs-5.4.17-2011.1.2.el8uek.x86_64.img
/boot/vmlinuz-4.18.0-193.1.2.el8_2.x86_64
/boot/System.map-4.18.0-193.1.2.el8_2.x86_64
/boot/config-4.18.0-193.1.2.el8_2.x86_64
/boot/.vmlinuz-4.18.0-193.1.2.el8_2.x86_64.hmac
/boot/symvers-4.18.0-193.1.2.el8_2.x86_64.gz
/boot/initramfs-4.18.0-193.1.2.el8_2.x86_64.img
/boot/vmlinuz-5.4.17-2011.2.2.el8uek.x86_64
/boot/System.map-5.4.17-2011.2.2.el8uek.x86_64
/boot/config-5.4.17-2011.2.2.el8uek.x86_64
/boot/.vmlinuz-5.4.17-2011.2.2.el8uek.x86_64.hmac
/boot/symvers-5.4.17-2011.2.2.el8uek.x86_64.gz
/boot/initramfs-5.4.17-2011.2.2.el8uek.x86_64.img
/boot/symvers-5.4.17-2011.2.2.el8uek.x86_64.ksplice-updates.gz
/boot/System.map-5.4.17-2011.2.2.el8uek.x86_64.ksplice-updates
/boot/vmlinuz-4.18.0-193.14.3.el8_2.x86_64
/boot/System.map-4.18.0-193.14.3.el8_2.x86_64
/boot/config-4.18.0-193.14.3.el8_2.x86_64
/boot/.vmlinuz-4.18.0-193.14.3.el8_2.x86_64.hmac
/boot/symvers-4.18.0-193.14.3.el8_2.x86_64.gz
/boot/initramfs-4.18.0-193.14.3.el8_2.x86_64.img
/boot/vmlinuz-5.4.17-2011.5.3.el8uek.x86_64
/boot/System.map-5.4.17-2011.5.3.el8uek.x86_64
/boot/config-5.4.17-2011.5.3.el8uek.x86_64
/boot/.vmlinuz-5.4.17-2011.5.3.el8uek.x86_64.hmac
/boot/symvers-5.4.17-2011.5.3.el8uek.x86_64.gz
/boot/initramfs-5.4.17-2011.5.3.el8uek.x86_64.img
lzap
August 25, 2020, 12:49pm
4
That looks ok. Is the VM really UEFI one? If you use PXEGrub2 UEFI with a VM which is BIOS it wont work. Weird, investigate why grub cannot see the ESP partition, it should load.
Alternatively, just swap the EFI boot order and boot from drive, you can use efibootmgr
to swap it back if you want to reinstall.
I’m using below Templates.
PXE Loader is Grub2 UEFI
I tried to boot from local disk but it shows no local disk. I tried both first disk and second disk. got below error. couldn’t go to efi boot manager
lzap
August 26, 2020, 1:34pm
6
PXELinux template is incorrect. You need to have Kickstart PXELinux there, definitely not Preseed and definitely not PXEGrub2 - it has a different syntax.
laxman_veeturi:
it shows no local disk
From all the pictures, it really looks like your VM does not have any disk. That’s quite a challenge to boot a system without any disk.
FYI: What you see (grub menu) has been downloaded from network. This will work even if there is no disk.
I changed to Kickstart default PXELinux. it could find the disk and loading os to disk.But still not booting from local disk after loading OS
.
below is showing from network
lzap
August 27, 2020, 7:12am
9
Switch it to boot from drive in VM settings. Does it boot?
when I hit escape when I get start from EFI network. it will load from local disk
Usually in pxe boot it try to boot from network couple of seconds and switch to local disk and boot from local disk.
But here I have to hit escp manually when it shows start from Network then it boot from local disk.
If I don’t hit escp it will try to chainload Grub2 EFI from ESP and shows error and shutdown server after 2 mins
when I change to boot from hardisk in vm settings. it is working
lzap
August 27, 2020, 1:46pm
12
Can you drop to grub2 shell and invoke ls
command to show all devices (hd0 etc). Maybe vmware has a different device name…
https://help.ubuntu.com/community/Grub2/Troubleshooting
If I disable boot from EFI Network in vm bios settings it load from local harddisk after loading OS. When we install OS it usually try boot from Network for few seconds and switch to local disk and boot OS. But here in PXE+UEFI it doesn’t work.
lzap
August 28, 2020, 8:01am
15
Good, do you see the ESP files on (hd0,gpt1) then? You can list files with:
ls (hd0,gpt1)/directory1/directory2/etc
What the grub2 configuration does is it tries to find /EFI/redhat/grubx64.efi
file:
search --file --no-floppy /EFI/redhat/grubx64.efi
Try that command, it should find and set root
variable to the correct (hd0,gptX)
entry:
https://www.gnu.org/software/grub/manual/grub/html_node/search.html
Please take a lookk below
lzap
August 31, 2020, 7:24am
17
Weird, everything looks good. Now, try this:
search --file --no-floppy --set=chroot /EFI/redhat/grubx64.efi
if [ -f ($chroot)/EFI/redhat/grubx64.efi ]; then
chainloader ($chroot)/EFI/redhat/grubx64.efi
boot
else
echo "EFI file NOT found"
fi
This is how our template sets up TFTP template to chain load from hard drive.
If you use SecureBoot, try to load shimx64.efi
instead. I see that Oracle Linux does not have shim.efi
file, weird.
in which template I have to edit ?
lzap
September 1, 2020, 12:25pm
19
Not a template, perform those commands in grub shell to see where it breaks.