help-grub
[Top][All Lists]
Advanced

[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: Tue, 22 Sep 2015 13:52:39 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.2.0


On 9/19/2015 PM 01:28, Andrei Borzenkov wrote:
19.09.2015 03:14, Steven Shiau пишет:
Since this "subtle" embedded preconfig way works, and the efi image file
created by grub-mkimage is smaller than that of grub-mkstandalone (my
case is 0.9MB vs. 6MB),

grub-mkstandalone creates full-fledged GRUB install on internal memory
disk, which includes fonts, themes, translations. You can skip them
(--locales= --fonts= --themes=) which cuts down image size to about 2MB.
You can further selectively include only specific modules
(--install-modules) but is it really worth it? More than once I have met
problems with vendor signed EFI images that do not support module
loading and every time commands I would use to troubleshoot were not
present.
Thanks for your comments. Yes, you are right, maybe it's not worthy. I will think about that. Once thing about my concern is the EFI image is on tftp server and is for massive deployment. Therefore there might be more than 10, 100 or even 1000 clients boot at the same time to request the EFI image on the server. Therefore if we can keep the size as small as possible, it is definitely worthy in the massive deployment scenario. BTW, one more question. Is that possible to do some variable substitution in preconfig?
In my case, the "$net_default_mac" is like:
00:0c:29:1d:9a:d1
It's not really a good file name on Unix system, i.e.
The config I define in my case:
configfile $prefix/grub.cfg-01:$net_default_mac
is like
/tftpboot/nbi_img/grub-efi.cfg/grub.cfg-01:00:0c:29:1d:9a:d1
I'd like to make it as something like:
/tftpboot/nbi_img/grub-efi.cfg/grub.cfg-01-00-0c-29-1d-9a-d1
so the file name is better without ":".
I tried to use:
configfile $prefix/grub.cfg-01-${net_default_mac//:/-}
However, this bash variable substitution apparently is not working. So in the preconifg, rescue mode, how can I make that?
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



reply via email to

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