From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JRZWH-0006OF-Qu for mharc-grub-devel@gnu.org; Tue, 19 Feb 2008 15:56:53 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JRZWF-0006Lz-SC for grub-devel@gnu.org; Tue, 19 Feb 2008 15:56:51 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JRZWE-0006Jn-Kx for grub-devel@gnu.org; Tue, 19 Feb 2008 15:56:50 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRZWE-0006JQ-DV for grub-devel@gnu.org; Tue, 19 Feb 2008 15:56:50 -0500 Received: from c60.cesmail.net ([216.154.195.49]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1JRZWD-0000lT-I5 for grub-devel@gnu.org; Tue, 19 Feb 2008 15:56:49 -0500 Received: from unknown (HELO relay.cesmail.net) ([192.168.1.81]) by c60.cesmail.net with ESMTP; 19 Feb 2008 15:56:54 -0500 Received: from [192.168.1.21] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by relay.cesmail.net (Postfix) with ESMTP id 0B27D61905A for ; Tue, 19 Feb 2008 15:56:48 -0500 (EST) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: References: <47BA2968.3090100@comcast.net> <20080219012552.07zm93ch40okkosw@webmail.spamcop.net> <1203445197.27944.13.camel@dv> Content-Type: text/plain Date: Tue, 19 Feb 2008 15:56:47 -0500 Message-Id: <1203454607.6203.28.camel@dv> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-1.fc8) Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: Starting grub 2 from grub legacy? 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: Tue, 19 Feb 2008 20:56:52 -0000 On Wed, 2008-02-20 at 02:33 +0800, Bean wrote: > On Feb 20, 2008 2:19 AM, Pavel Roskin wrote: > > On Tue, 2008-02-19 at 15:14 +0800, Bean wrote: > > > > > That's because core.img is a.out format multiboot kernel, but the > > > current multiboot loader can only handle elf format. My bsd patch add > > > a.out support for multiboot. with that, you can load core.img > > > successfully. > > > > It's working, thanks! Just one minor issue - the new core.img is > > confused about the root device: > > > > Welcome to GRUB! > > > > error: unknown device > > Entering into rescue mode... > > grub rescue> set > > prefix=(fd0,1,a)/boot/grub > > root=fd0,1,a > > grub rescue> > > > > > > That's qemu with one hard drive and no floppies. By the way, "Entering > > into rescue mode" should be "Entering rescue mode". > > > > The boot drive isn't passed to core.img. I think it should be passed (see "boot_device" in the specification). Perhaps core.img doesn't use it? That would be more understandable. > > > > grub> multiboot /boot/grub/stage2 > > > > alloc magic is broken at 0x93c50 > > > > Aborted. Press any key to exit. > > > > > > stage2 is not multiboot format, actually, it's not of any format. The > > > alloc magic broken is caused by a bug in the multiboot loader, my bsd > > > also fit this, it will print the error message: "currently only ELF is > > > supported" > > > > Yes, it's better now. > > > > Actually, GRUB 2 modules still confuse multiboot. Loading _bsd.mod or > > affs.mod would cause GRUB to hand. But "multiboot configfile.mod" > > actually crashed qemu 0.9.1 with "qemu: fatal: triple fault"! > > Multiboot loader would try to load elf kernel if the multiboot header > is not found. The modules file have the elf header, but they're not > really kernels, so it cause the problem. Oh, well, I don't really care about foolproofing GRUB too much. But it made me think whether it's right for the "multiboot" command to try ELF if multiboot fails. Either we should go with one universal "kernel" command as in GRUB 1 (perhaps with switches to force specific loading algorithm) or we was a multitude of commands for every kernel type (linux, multiboot, elf, a.out, bsd, bsdloader). Having "multiboot" fallback to ELF is inconsistent. > > > however, it's still possible to load GRUB Legacy with my grubutil > > > package. It contain several header file which you can use to load > > > various boot loader from any loader that support linux kernel. For > > > example, the header for grub legacy is ldgrub.bin, you can use it like > > > this: > > > > > > linux ldgrub.bin > > > initrd stage2 > > > > I'm thinking maybe the final GRUB 1 should make stage2 multiboot > > compliant, if we are going to release it one day. > > it should be trivial, but i think grub1 is not updated any more ? The CVS is still exists, and there was a discussion about making a release with cs89x0 removed. -- Regards, Pavel Roskin