[Top][All Lists]

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

Re: Unknown command 'else'?

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

On 2015年09月18日 20:16, Andrei Borzenkov wrote:
> On Fri, Sep 18, 2015 at 12:47 PM, Steven Shiau <address@hidden> wrote:
>> If there is someway to make this if/elif/else/fi work in embedded config,
> I do not think it is likely to happen. It will increase size of core
> and we attempt to keep it as small as possible. Given that easy
> solution (grub-mkstandalone) already exists, there is no compelling
> reason to do it either.
>From my understanding, it seems the image created by "grub-mkstandalone"
can not load the grub config file from tftp server?  Because I tried to
assign the config file on tftp server (as in my previous post), but it
can not read the config file from tftp server.
Am I right? If so, then "grub-mkstandalone" won't work for my purpose,
because the grub config file for uEFI network booting might be changed
for each client (like grub.cfg-01:$net_default_mac) on the server so
that the client machine's booting mechanism can be changed to what the
system administrator wants. It's not handy to create the standalone boot
image every time with grub-mkstandalone because there might be more than
2 clients, and we need to have different booting mechanism for each client.
So, from your previous post
(, it
occurred to me that if I make my way like this:
1. Make the content of /tmp/grub-efi/grub-header.cfg as:
set prefix=(tftp)/grub-efi.cfg
echo 'Network status: '

echo "Use config file: $prefix/grub.cfg-01:$net_default_mac"
configfile $prefix/grub.cfg-01:$net_default_mac

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

echo "Could not find config file $prefix/grub.cfg-$net_default_mac or
sleep 15

2. The command to create the image:
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 no error at all, and it also works.  Looks pretty cool?
Do you think this preconfig file will work for the future grub 2.x?
Thank you very much.


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

reply via email to

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