The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 807 - File: showthread.php PHP 7.3.15 (Linux)
File Line Function
/showthread.php 807 errorHandler->error





Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Chainloading grub2 pxe efi file
2016-11-23, 05:35
Post: #1
Chainloading grub2 pxe efi file
There appears to be a bug where iPXE cannot chainload a GRUB2 EFI file. This is used with Clonezilla & DRBL installations, where the GRUB2 file is dynamically generated.

Steven Shiau of the DRBL & Clonezilla projects posted something recently in the DEV e-mail chain about this, but did not get a response: http://lists.ipxe.org/pipermail/ipxe-dev...05214.html

I've included the error, as described by Steven here:

---------------------------------------

Is this issue mentioned in this thread fixed?
http://lists.ipxe.org/pipermail/ipxe-dev...04454.html
It seems the issue still remains. Here is my way to reproduce the issue:
1. On dhcp server, the isc-dhcp-server config is like:
option arch code 93 = unsigned integer 16;
if option arch = 00:06 {
filename "bootia32.efi";
} else if option arch = 00:07 {
filename "bootx64.efi";
} else if option arch = 00:09 {
filename "bootx64.efi";
} else {
filename "pxelinux.0";
}

The bootx64.efi was created on Ubuntu 16.04 x86-64 with this command:
grub-mkimage -C xz -O x86_64-efi -o /tftpboot/nbi_img/bootx64.efi
--prefix='(tftp)/grub-efi.cfg/' -c /tmp/grub-efi.70hXmd/grub-header.cfg
normal tftp efinet chain echo net gzio xzio linux efi_gop efi_uga png
gfxterm gfxterm_background gfxterm_menu serial part_gpt part_msdos boot
multiboot progress search ext2 xfs reiserfs jfs hfsplus fat ntfs
configfile test sleep tr reboot halt
The contents of /tmp/grub-efi.70hXmd/grub-header.cfg:
*****************************************************.
set prefix=(tftp)/grub-efi.cfg
echo "Grub CPU and platform: $grub_cpu, $grub_platform"
echo 'Network status: '
net_ls_cards
net_ls_addr
net_ls_routes

tr --set pretty_mac x: x- $net_default_mac

echo "Loading config file $prefix/grub.cfg-01-$pretty_mac..."
configfile $prefix/grub.cfg-01-$pretty_mac

echo "Loading config file $prefix/grub.cfg-$net_default_ip..."
configfile $prefix/grub.cfg-$net_default_ip

echo "Loading config file: $prefix/grub.cfg"
configfile $prefix/grub.cfg

echo "Could not find config file $prefix/grub.cfg-$pretty_mac,
$prefix/grub.cfg-$net_default_ip or $prefix/grub.cfg!"
sleep 15

*****************************************************.

In the client I boot a live CD (Clonezilla live) on uEFI machine, with
iPXE in the grub2 config:
menuentry "iPXE"{
search --no-floppy --set=root -f /live/ipxe.efi
chainloader /live/ipxe.efi + 1
}

The ipxe.efi was compiled with the latest release from iPXE git repository:
https://git.ipxe.org/ipxe.git/commit/0be...83258f81ff

So when iPXE uEFI boots, it gets the IP address from the DHCP server,
downloads bootx64.efi, the output on the screen is attached as ipxeboot.png.
Later then it stops at:
Could not find config file (tftp)/grub.cfg-, (tftp)/grub.cfg- or
(tftp)/grub.cfg!
(See attached file grub-stop.png).
And after 15 secs, it enters grub shell (see attached grub-shell.png).

ATTACHMENTS:
http://lists.ipxe.org/pipermail/ipxe-dev...t-0003.png
http://lists.ipxe.org/pipermail/ipxe-dev...t-0004.png
http://lists.ipxe.org/pipermail/ipxe-dev...t-0005.png
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Chainloading grub2 pxe efi file - anary - 2016-11-23 05:35



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