help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unknown command 'else'?


From: Steven Shiau
Subject: Unknown command 'else'?
Date: Fri, 18 Sep 2015 11:38:39 +0800
User-agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

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

Attachment: grub-embedded-error.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]