All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin Close <itchka@compuserve.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Loading modules with an embedded config file seems to fail
Date: Thu, 08 Oct 2015 14:55:57 +0100	[thread overview]
Message-ID: <1870417.0EroPUxT0I@localhost.localdomain> (raw)

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


             reply	other threads:[~2015-10-08 14:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-08 13:55 Colin Close [this message]
2015-10-08 14:15 ` Loading modules with an embedded config file seems to fail Andrei Borzenkov
2015-10-08 17:28   ` Colin Close
2015-10-08 17:50     ` Andrei Borzenkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1870417.0EroPUxT0I@localhost.localdomain \
    --to=itchka@compuserve.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.