On Fri, Sep 18, 2015 at 8:20 AM, Steven Shiau <[email protected]> wrote: > > > On 2015年09月18日 12:00, Andrei Borzenkov wrote: >> 18.09.2015 06:38, Steven Shiau пишет: >>> Dear all, >>> I encountered an issue "Unknown command 'else'." when embedding a config >>> in uEFI network boot image. >> >> embedded config is processed before normal.mod is loaded so only >> commands in rescue mode are available. bash like scripting is feature of >> normal.mod. > So the description in the grub 2 manual is not really correct, like here: > http://dev.gentoo.org/~floppym/grub.html#Embedded-configuration > ?
Yes, looks like it. It needs some adjustment. Care to open bug report on savannah.gnu.org? > It mentions that when echo, search_label, and test modules to be > included in the core image, the above embedded config should work. > Actually the running result for the above if condition works, just the > error message looks weird. What do you mean "works"? It shows last error, so you simply do not see errors about preceding "if" or "configfile" commands. Actually, I have somewhere patch to make it more verbose at this point ... As I just suggested in another thread - create standalone image using grub-mkstandalone. It puts full grub in memory disk and you can add grub.cfg on top of it. This grub.cfg runs after normal.mod is loaded from memory disk so full functionality is available. _______________________________________________ Help-grub mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-grub
