From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Zkdcw-0003s1-RJ for mharc-grub-devel@gnu.org; Fri, 09 Oct 2015 15:46:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkFLh-0001le-Nq for grub-devel@gnu.org; Thu, 08 Oct 2015 13:51:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkFKd-0000ml-Lm for grub-devel@gnu.org; Thu, 08 Oct 2015 13:51:25 -0400 Received: from mail-lb0-x236.google.com ([2a00:1450:4010:c04::236]:32799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkFKc-0000hU-TP for grub-devel@gnu.org; Thu, 08 Oct 2015 13:50:19 -0400 Received: by lbos8 with SMTP id s8so55091322lbo.0 for ; Thu, 08 Oct 2015 10:50:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=YBU0jqkhOxehLnJHCj1zBtpgfwy5oriC2sJJoYHQrZg=; b=mtaWkZbu3KDqUpsy9PJmFJ/2O+RSLMOr8Q8DmNNpbl14qYr/6CXAhwo9th4oU7zA4O Qe0j4KCYc9LRHwuW2HlfjmDq2GIHgRYXRrGQLlkQvP/yDDETwssE3AHQF7ZynJekYJID K+wRgP+l8309GJwrClORKWg1G2CbjGN16WSDbXK7S3daLtTfWCsz5+4N2+IFIQe/7Bj7 lAyRjKCBYQqHeSLXFTfUelRvViq/U7+b5pToSXa42iyivfxq+Sxv3gako1sYsdAeMv2k zTc1BcuCU7tz6WnbcI792RHG3QJhKyoTwlXKhWPh61f22oZofMUl7/AP7PcVNYviUpY+ ZGSA== X-Received: by 10.112.134.73 with SMTP id pi9mr4276701lbb.83.1444326618130; Thu, 08 Oct 2015 10:50:18 -0700 (PDT) Received: from [192.168.1.43] (ppp91-76-142-206.pppoe.mtu-net.ru. [91.76.142.206]) by smtp.gmail.com with ESMTPSA id i9sm7538433lfb.18.2015.10.08.10.50.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Oct 2015 10:50:17 -0700 (PDT) Subject: Re: Loading modules with an embedded config file seems to fail To: The development of GNU GRUB References: <1870417.0EroPUxT0I@localhost.localdomain> <10470506.m6mQKhReK1@localhost.localdomain> From: Andrei Borzenkov Message-ID: <5616ACD7.3000306@gmail.com> Date: Thu, 8 Oct 2015 20:50:15 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <10470506.m6mQKhReK1@localhost.localdomain> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::236 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2015 17:51:42 -0000 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 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 >