* Loading modules with an embedded config file seems to fail
@ 2015-10-08 13:55 Colin Close
2015-10-08 14:15 ` Andrei Borzenkov
0 siblings, 1 reply; 4+ messages in thread
From: Colin Close @ 2015-10-08 13:55 UTC (permalink / raw
To: The development of GNU GRUB
I have created an embedded image like this:-
chroot "$CHROOTNAME" /usr/bin/grub2-mkimage -d "$GRUB_LIB" -O i386-pc -o "$GRUB_IMG" -p /boot/grub \-c /ISO/boot/grub/start_cfg iso9660 biosdisk test
cat "$CHROOTNAME"/"$GRUB_LIB"/boot.img "$CHROOTNAME"/"$GRUB_IMG" > "$ISOROOTNAME"/boot/grub/grub2-embed_img
cat "$CHROOTNAME"/"$GRUB_LIB"/cdboot.img "$CHROOTNAME"/"$GRUB_IMG" > "$ISOROOTNAME"/boot/grub/grub2-eltorito.img
and used the following options with xorriso to build an iso image
XORRISO_OPTIONS1=" -b boot/grub/grub2-eltorito.img -no-emul-boot -boot-info-table --embedded-boot $ISOROOTNAME/boot/grub/grub2-embed_img --protective-msdos-label"
The embedded image contain this start_cfg file
if [ "${grub_platform}" == "efi" ]; then
search --no-floppy --set=root --fs-uuid '%GRUB_UUID%'
set prefix=($root)/boot/grub
set efi=1
source ($root)/boot/grub/grub.cfg
fi
insmod part_apple
insmod part_bsd
insmod part_gpt
insmod part_msdos
set bios=1
set efi=0
source ($root)/boot/grub/grub.cfg
When I boot the iso in BIOS mode I get the following errors reported
Unknown command ` if '
Unknown command ` search '
Unknown command ` source '
Unknown command ` fi '
Unknown command ` source '
Can anyone help me with this I have tried every possible strategy and nothing seems to work. Currently the config file is set up so it falls through to the bios boot and the flags get set right and things do work but obviously this is not ideal.
Best,
Colin Close
OpenMandriva
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Loading modules with an embedded config file seems to fail
2015-10-08 13:55 Loading modules with an embedded config file seems to fail Colin Close
@ 2015-10-08 14:15 ` Andrei Borzenkov
2015-10-08 17:28 ` Colin Close
0 siblings, 1 reply; 4+ messages in thread
From: Andrei Borzenkov @ 2015-10-08 14:15 UTC (permalink / raw
To: The development of GNU GRUB
On Thu, Oct 8, 2015 at 4:55 PM, Colin Close <itchka@compuserve.com> wrote:
> I have created an embedded image like this:-
> chroot "$CHROOTNAME" /usr/bin/grub2-mkimage -d "$GRUB_LIB" -O i386-pc -o "$GRUB_IMG" -p /boot/grub \-c /ISO/boot/grub/start_cfg iso9660 biosdisk test
> cat "$CHROOTNAME"/"$GRUB_LIB"/boot.img "$CHROOTNAME"/"$GRUB_IMG" > "$ISOROOTNAME"/boot/grub/grub2-embed_img
> cat "$CHROOTNAME"/"$GRUB_LIB"/cdboot.img "$CHROOTNAME"/"$GRUB_IMG" > "$ISOROOTNAME"/boot/grub/grub2-eltorito.img
>
> and used the following options with xorriso to build an iso image
>
> XORRISO_OPTIONS1=" -b boot/grub/grub2-eltorito.img -no-emul-boot -boot-info-table --embedded-boot $ISOROOTNAME/boot/grub/grub2-embed_img --protective-msdos-label"
>
> The embedded image contain this start_cfg file
>
> if [ "${grub_platform}" == "efi" ]; then
> search --no-floppy --set=root --fs-uuid '%GRUB_UUID%'
> set prefix=($root)/boot/grub
> set efi=1
> source ($root)/boot/grub/grub.cfg
> fi
> insmod part_apple
> insmod part_bsd
> insmod part_gpt
> insmod part_msdos
> set bios=1
> set efi=0
> source ($root)/boot/grub/grub.cfg
>
> When I boot the iso in BIOS mode I get the following errors reported
> Unknown command ` if '
> Unknown command ` search '
> Unknown command ` source '
> Unknown command ` fi '
> Unknown command ` source '
>
Embedded config is processed using rescue parser which does not
understand compound statements. This has been discussed just recently
on help-grub. The guy intended to open bug report for misleading
documentation but apparently never came around to do it.
> Can anyone help me with this I have tried every possible strategy and nothing seems to work. Currently the config file is set up so it falls through to the bios boot and the flags get set right and things do work but obviously this is not ideal.
> Best,
> Colin Close
> OpenMandriva
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Loading modules with an embedded config file seems to fail
2015-10-08 14:15 ` Andrei Borzenkov
@ 2015-10-08 17:28 ` Colin Close
2015-10-08 17:50 ` Andrei Borzenkov
0 siblings, 1 reply; 4+ messages in thread
From: Colin Close @ 2015-10-08 17:28 UTC (permalink / raw
To: The development of GNU GRUB
Thanks for your prompt reply, is this likely to change or is it dictated by thge 32k size limit?
Best,
Colin Close
On Thursday 08 Oct 2015 17:15:27 Andrei Borzenkov wrote:
> On Thu, Oct 8, 2015 at 4:55 PM, Colin Close <itchka@compuserve.com> wrote:
> > I have created an embedded image like this:-
> > chroot "$CHROOTNAME" /usr/bin/grub2-mkimage -d "$GRUB_LIB" -O i386-pc -o "$GRUB_IMG" -p /boot/grub \-c /ISO/boot/grub/start_cfg iso9660 biosdisk test
> > cat "$CHROOTNAME"/"$GRUB_LIB"/boot.img "$CHROOTNAME"/"$GRUB_IMG" > "$ISOROOTNAME"/boot/grub/grub2-embed_img
> > cat "$CHROOTNAME"/"$GRUB_LIB"/cdboot.img "$CHROOTNAME"/"$GRUB_IMG" > "$ISOROOTNAME"/boot/grub/grub2-eltorito.img
> >
> > and used the following options with xorriso to build an iso image
> >
> > XORRISO_OPTIONS1=" -b boot/grub/grub2-eltorito.img -no-emul-boot -boot-info-table --embedded-boot $ISOROOTNAME/boot/grub/grub2-embed_img --protective-msdos-label"
> >
> > The embedded image contain this start_cfg file
> >
> > if [ "${grub_platform}" == "efi" ]; then
> > search --no-floppy --set=root --fs-uuid '%GRUB_UUID%'
> > set prefix=($root)/boot/grub
> > set efi=1
> > source ($root)/boot/grub/grub.cfg
> > fi
> > insmod part_apple
> > insmod part_bsd
> > insmod part_gpt
> > insmod part_msdos
> > set bios=1
> > set efi=0
> > source ($root)/boot/grub/grub.cfg
> >
> > When I boot the iso in BIOS mode I get the following errors reported
> > Unknown command ` if '
> > Unknown command ` search '
> > Unknown command ` source '
> > Unknown command ` fi '
> > Unknown command ` source '
> >
>
> Embedded config is processed using rescue parser which does not
> understand compound statements. This has been discussed just recently
> on help-grub. The guy intended to open bug report for misleading
> documentation but apparently never came around to do it.
>
> > Can anyone help me with this I have tried every possible strategy and nothing seems to work. Currently the config file is set up so it falls through to the bios boot and the flags get set right and things do work but obviously this is not ideal.
> > Best,
> > Colin Close
> > OpenMandriva
> >
> > _______________________________________________
> > Grub-devel mailing list
> > Grub-devel@gnu.org
> > https://lists.gnu.org/mailman/listinfo/grub-devel
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Loading modules with an embedded config file seems to fail
2015-10-08 17:28 ` Colin Close
@ 2015-10-08 17:50 ` Andrei Borzenkov
0 siblings, 0 replies; 4+ messages in thread
From: Andrei Borzenkov @ 2015-10-08 17:50 UTC (permalink / raw
To: The development of GNU GRUB
08.10.2015 20:28, Colin Close пишет:
> Thanks for your prompt reply, is this likely to change or is it dictated by thge 32k size limit?
Code that goes into core.img should be kept as small as possible. In
your case using grub-mkrescue and placing grub.cfg there would be easier.
> Best,
> Colin Close
>
> On Thursday 08 Oct 2015 17:15:27 Andrei Borzenkov wrote:
>> On Thu, Oct 8, 2015 at 4:55 PM, Colin Close <itchka@compuserve.com> wrote:
>>> I have created an embedded image like this:-
>>> chroot "$CHROOTNAME" /usr/bin/grub2-mkimage -d "$GRUB_LIB" -O i386-pc -o "$GRUB_IMG" -p /boot/grub \-c /ISO/boot/grub/start_cfg iso9660 biosdisk test
>>> cat "$CHROOTNAME"/"$GRUB_LIB"/boot.img "$CHROOTNAME"/"$GRUB_IMG" > "$ISOROOTNAME"/boot/grub/grub2-embed_img
>>> cat "$CHROOTNAME"/"$GRUB_LIB"/cdboot.img "$CHROOTNAME"/"$GRUB_IMG" > "$ISOROOTNAME"/boot/grub/grub2-eltorito.img
>>>
>>> and used the following options with xorriso to build an iso image
>>>
>>> XORRISO_OPTIONS1=" -b boot/grub/grub2-eltorito.img -no-emul-boot -boot-info-table --embedded-boot $ISOROOTNAME/boot/grub/grub2-embed_img --protective-msdos-label"
>>>
>>> The embedded image contain this start_cfg file
>>>
>>> if [ "${grub_platform}" == "efi" ]; then
This is defined by normal.mod which is not loaded at this point.
>>> search --no-floppy --set=root --fs-uuid '%GRUB_UUID%'
>>> set prefix=($root)/boot/grub
>>> set efi=1
>>> source ($root)/boot/grub/grub.cfg
That won't work using your command line anyway - you include neither
search command not normal.mod.
>>> fi
>>> insmod part_apple
>>> insmod part_bsd
>>> insmod part_gpt
>>> insmod part_msdos
grub-mkrescue does it for you and is guaranteed to continue to work if
these modules change.
>>> set bios=1
>>> set efi=0
>>> source ($root)/boot/grub/grub.cfg
>>>
>>> When I boot the iso in BIOS mode I get the following errors reported
>>> Unknown command ` if '
>>> Unknown command ` search '
>>> Unknown command ` source '
>>> Unknown command ` fi '
>>> Unknown command ` source '
>>>
>>
>> Embedded config is processed using rescue parser which does not
>> understand compound statements. This has been discussed just recently
>> on help-grub. The guy intended to open bug report for misleading
>> documentation but apparently never came around to do it.
>>
>>> Can anyone help me with this I have tried every possible strategy and nothing seems to work. Currently the config file is set up so it falls through to the bios boot and the flags get set right and things do work but obviously this is not ideal.
>>> Best,
>>> Colin Close
>>> OpenMandriva
>>>
>>> _______________________________________________
>>> Grub-devel mailing list
>>> Grub-devel@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-09 19:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-08 13:55 Loading modules with an embedded config file seems to fail Colin Close
2015-10-08 14:15 ` Andrei Borzenkov
2015-10-08 17:28 ` Colin Close
2015-10-08 17:50 ` Andrei Borzenkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).