From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HaAn3-0006Ox-0H for mharc-grub-devel@gnu.org; Sat, 07 Apr 2007 09:17:13 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HaAn0-0006H8-V7 for grub-devel@gnu.org; Sat, 07 Apr 2007 09:17:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HaAmz-0006Bj-ES for grub-devel@gnu.org; Sat, 07 Apr 2007 09:17:10 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HaAmz-0006BX-8C for grub-devel@gnu.org; Sat, 07 Apr 2007 09:17:09 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HaAjM-00064U-VK for grub-devel@gnu.org; Sat, 07 Apr 2007 09:13:25 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id DB7903CEC3C6E for ; Sat, 7 Apr 2007 19:00:31 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id B58603CEC3C65 for ; Sat, 7 Apr 2007 19:00:31 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Sat, 7 Apr 2007 15:13:19 +0200 User-Agent: KMail/1.8.2 References: <000001c7734c$6f105ac0$030010ac@temjin> In-Reply-To: <000001c7734c$6f105ac0$030010ac@temjin> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200704071513.19994.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.080352, version=0.17.2 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) Subject: Re: i386-pc 'chainloader' is something wrong. (RE: I write a patch forJapanese NEC i386 old computers.) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Apr 2007 13:17:11 -0000 On Saturday 31 March 2007 06:24, Hitoshi Ozeki wrote: > > Please see 'grub-1.96/loader/i386/pc/chainloader.c' and > > 'grub-1.96/kern/loader.c' > > > > When we execute the 'boot' command, process the 'grub_loader_boot()' > > (omit it) > > To sum up, On 'chainloader' of i386-pc, > However 'grub_loader_boot()' executes 'grub_device_open()', it will fail > always. > But 'grub_loader_boot()' do it. > > If this behavior is wrong, we do only fix it. You are right. This is wrong. I will have a look later. > What I wish to know is which is the boot drive. > > 1. 'root' environment indicates it. > 2. argument of 'chainloader' command indicates it. > > For example: > grub> set root=hd0,1 > grub> chainloader (hd0,2)0+2 > grub> boot > > If the 1st is, boot from (hd0,1) and bootloader is (hd0,2)0+2. > If the 2nd is, boot from (hd0,2) and bootloader is (hd0,2)0+2. > > ...Aha! EFI looks to choose 1st. Should I obey it? Yes. This is the intented behavior. The distinction is important, because you might want to save a boot sector at somewhere else, and chainload it later. This feature makes recovery much easier. Okuji