Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 04-28-2021, 07:56 AM   #1
LQ Newbie
Registered: Apr 2021
Posts: 2

Rep: Reputation: Disabled
Grub2 UEFI PXE Boot, unable to set up proper Windows and iPXE chainloaders

Hi, im trying to migrate from grub4dos that ive been using for years for Legacy BIOS PXE boot, and it was working perfectly to boot both Linux, Windows, Clonezilla and iPXE for iSCSI booting.

Now, im trying to migrate to UEFI, reason for this is that some newer motherboards are lacking CSM.

I was able to set up Clonezilla and the Linix installers whiout too much issues.
For Windows, i have a special BCD with wims entries created to run repair disk, live wims, install wims, etc. This is setup is souch a way that if i set the dhcp server reqfilename to "bootx64.efi" it boots the Windows boot mgr and i can boot wims without any problem.

But trying to chainload bootx64.efi under grub2 so far has been impossible. Since direct booting the bootx64.efi works i tried this:

menuentry "Windows Menu" {
	chainloader /bootx64.efi
But that results in a BlInitializeLibrary failed 0xc0000001 i think, it is lossing the tftp root access and it is not seeing any other files.

For reference, this is how i do it under grub4dos

title Windows Menu
pxe keep
chainloader --raw /boot/pxeboot.n12
As for iPXE i need to be able to pass a scritp file, chainloading the ipxe.efi file works but i cant load a script. So i tried to load it in the same way i do with the Clonezilla and Linux installers.

menuentry "iPXE"{
  linux /ipxe/ipxe.lkrn
  initrd /ipxe/boot1.txt
That results in a reboot.

menuentry "iPXE"{
  linuxefi /ipxe/ipxe.efi
  initrdefi /ipxe/boot1.txt
That gives me a "invalid magic number".

I saw that someone started working on a uefi version of grub4dos but it is missing features, so at this point i dont know what to do, i either wait or try to figure this out. But i just dont see how.
Old 04-28-2021, 02:39 PM   #2
Registered: Mar 2008
Posts: 20,858

Rep: Reputation: 3384Reputation: 3384Reputation: 3384Reputation: 3384Reputation: 3384Reputation: 3384Reputation: 3384Reputation: 3384Reputation: 3384Reputation: 3384Reputation: 3384
First question maybe.
Old 04-28-2021, 06:08 PM   #3
LQ Guru
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,396

Rep: Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083
I would think you need the full, correct path and unless you have moved the bootx64.efi file, it should be in: /EFI/Boot/bootx64.efi. Haven't tested this and I don't use PXE so don't have any more suggestions.
Old 04-29-2021, 09:02 AM   #4
LQ Newbie
Registered: Apr 2021
Posts: 2

Original Poster
Rep: Reputation: Disabled
Well, i did try using the /efi, but to no avail, the bootx64.efi works when booted directly using "/" as root, it goes to look for the files inside /boot.

It should work the same when chainloading unless... well... unless chainloading changes the root address to something else or it is ending the tftp link. Currently im using "/" as root, both grub and windows efis are there, all Windows files are inside /boot, and grub menu and extra files are inside /grub. So currently i have no /efi, but i did try with /efi as well and nothing.

Last edited by shivansps; 04-29-2021 at 09:09 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
UEFI Class 3 :: To use UEFI, or not to use UEFI? jheengut Slackware 19 12-30-2020 09:24 AM
Boot Camp (fixing boot loaders, learning your way around boot & chainloaders) Siljrath Linux - General 8 01-20-2015 11:00 AM
issue with uefi pxe boot on rhel 6.5 as pxe server geekmaxwell Linux - Networking 3 04-02-2014 02:27 PM
LXer: Windows 8 Update Might Delete GRUB2 and Set UEFI to Secure Boot LXer Syndicated Linux News 0 03-25-2014 06:50 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:37 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration