[ipxe-devel] About iPXE efi chainloading grub2 pxe efi file

Steven Shiau steven at nchc.org.tw
Sat Oct 22 07:05:03 UTC 2016


Hi Michael,
Is this issue mentioned in this thread fixed?
http://lists.ipxe.org/pipermail/ipxe-devel/2015-October/004454.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/0be77e959e813773cac10f049cb62c83258f81ff

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).

If you need me to provide more info, please let me know.
Thank you very much.

Steven

-- 
Steven Shiau <steven _at_ stevenshiau org>
Public Key Server PGP Key ID: 4096R/47CF935C
Fingerprint: 0240 1FEB 695D 7112 62F0  8796 11C1 12DA 47CF 935C

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipxeboot.png
Type: image/png
Size: 9688 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20161022/43bec68d/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grub-stop.png
Type: image/png
Size: 3600 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20161022/43bec68d/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grub-shell.png
Type: image/png
Size: 5121 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20161022/43bec68d/attachment-0002.png>


More information about the ipxe-devel mailing list