From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Upzpl-0003DQ-2o for mharc-grub-devel@gnu.org; Fri, 21 Jun 2013 07:48:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upzph-0003CP-Kd for grub-devel@gnu.org; Fri, 21 Jun 2013 07:48:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Upzpe-0005Yk-Oc for grub-devel@gnu.org; Fri, 21 Jun 2013 07:48:49 -0400 Received: from mail-ea0-x233.google.com ([2a00:1450:4013:c01::233]:61061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upzpe-0005YE-HO for grub-devel@gnu.org; Fri, 21 Jun 2013 07:48:46 -0400 Received: by mail-ea0-f179.google.com with SMTP id b15so4523589eae.38 for ; Fri, 21 Jun 2013 04:48:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; bh=lmjpaFJtoOc6ohRFRkIEkJQ7xDWzaNONRdWHbljRJBw=; b=oiiarB+Xe+palXlQ1eZ7RVGgmk2AulCAiuY+kAkiQbZfN7RpePt/0Gt8x2iucJ+LfX uSzhNNR4m6up0uZOeLQq2H9xrIVitzBjF+C5Xv2oxKHjzylwrhk3PBdg2UtfBcFb9KUc an6/czNazp/cffc8vevw/7+dMXYUjJERrcK3g2L1e6p+lPCjoj/guoTjG2VlrUHrOuqU EVjFzEB8fJb90xl0BMHbFltmpMQTwnb566o3QXCsnpYVVsEUlD4fzx7Kb7ppfM/Vo4c8 N70i73IA53ZUAPCqppdO6+BgKLzqhBrPYmIJTxVnRkHbe7MojAVsCMFGM/T/VlrWyUhC WEgg== X-Received: by 10.14.2.137 with SMTP id 9mr11820814eef.64.1371815325128; Fri, 21 Jun 2013 04:48:45 -0700 (PDT) Received: from [192.168.1.113] (31-249.1-85.cust.bluewin.ch. [85.1.249.31]) by mx.google.com with ESMTPSA id e44sm7148572eeh.11.2013.06.21.04.48.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Jun 2013 04:48:44 -0700 (PDT) Message-ID: <51C43D96.2010201@gmail.com> Date: Fri, 21 Jun 2013 13:48:38 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130518 Icedove/17.0.5 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: i386/pc/chainloader.c fails with syntax like chainloader (hd1, msdos1)+1 References: In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="----enig2JMACPDLEFTWOJQVFPKRT" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::233 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: Fri, 21 Jun 2013 11:48:51 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2JMACPDLEFTWOJQVFPKRT Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 21.06.2013 11:23, Michael Chang wrote: > Hi, >=20 > The i386/pc/chainloader.c hangs when attempting to chainload other > disk's boot sector (or mbr) with a syntax like this. Say if current > environment setting root=3Dhd0,msdos2. >=20 > $ chainloader (hd1,msdos1)+1 >=20 > However doing it this way always works. >=20 > $ set root=3Dhd1,msdos1 > $ chainloader +1 >=20 > I suppose the first syntax is valid as it should override $root [1] > thus two cases should have identical result. But looking into the > chainloader source it seems that the $root is always used to obtain > the boot drive number and partition table. So there's a discrepancy if > root is not set to the chainloader device which is explicitly > specified in file. No, the behaviour you see is intended consider someone copying bootsector from (hd1,1) to (hd0,2)/boot.bin. It can still be booted with:= root=3Dhd1,1 chainloader (hd0,2)/boot.bin The disk passed in %dl and where the sector is loaded from isn't necessarily the same. >=20 > The attached file fixes the problem for me, I'd like to contribute if > you think this is a problem or how to improve the patch. >=20 > [1] http://www.gnu.org/software/grub/manual/grub.html#root > [2] http://www.gnu.org/software/grub/manual/grub.html#chainloader >=20 > Thanks, > Michael >=20 >=20 >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel >=20 ------enig2JMACPDLEFTWOJQVFPKRT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlHEPZYACgkQNak7dOguQglA+QD/WcjkKjsSHWKp3Rhf36ZojyTR T9Q+M65qGMk+KwXEzoQBALy+YV7a5SMuq7ezQrxLwIBu5XNlBRUIQNLhAeNvAbUQ =a+/H -----END PGP SIGNATURE----- ------enig2JMACPDLEFTWOJQVFPKRT--