2016-11-23, 05:35
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
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