Dear all,
I encountered an issue "Unknown command 'else'." when embedding a config
in uEFI network boot image. The machine is running Debian Sid, with
grub-pc version 2.02~beta2-28.
The command I use to create the image is:
grub-mkimage -C xz -O x86_64-efi -o /tftpboot/nbi_img/bootx64.efi
--prefix='(tftp)/grub-efi.cfg/' -c /tmp/grub-efi/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 reboot halt configfile test sleep

Then content of /tmp/grub-efi/grub-header.cfg is:
=============================
set prefix=(tftp)/grub-efi.cfg
echo 'Network status: '
net_ls_cards
net_ls_addr
net_ls_routes

if [ -e "$prefix/grub.cfg-$net_default_mac" ]; then
  configfile $prefix/grub.cfg-$net_default_mac
elif [ -e "$prefix/grub.cfg" ]; then
  configfile $prefix/grub.cfg
else
  echo "Could not find config file $prefix/grub.cfg-$net_default_mac or
$prefix/grub.cfg!"
  sleep 10
fi
=============================

Attached you can find the error on the screen.
Where am I wrong?
Thanks.

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
_______________________________________________
Help-grub mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-grub

Reply via email to