grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Starting grub 2 from grub legacy?


From: Bean
Subject: Re: Starting grub 2 from grub legacy?
Date: Wed, 20 Feb 2008 02:33:40 +0800

On Feb 20, 2008 2:19 AM, Pavel Roskin <address@hidden> 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.

> > > 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.

>
> > 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 ?

-- 
Bean




reply via email to

[Prev in Thread] Current Thread [Next in Thread]