grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Handling command line option for core.img and g2ldr


From: Bean
Subject: Re: [PATCH] Handling command line option for core.img and g2ldr
Date: Mon, 25 Feb 2008 22:32:57 +0800

On Mon, Feb 25, 2008 at 10:08 PM, Pavel Roskin <address@hidden> wrote:
> On Mon, 2008-02-25 at 15:50 +0800, Bean wrote:
>  > On Mon, Feb 25, 2008 at 3:10 PM, Pavel Roskin <address@hidden> wrote:
>  > > Quoting Bean <address@hidden>:
>  > >
>  > >  > This patch allow passing command line options to core.img or g2ldr:
>  > >
>  > >  Isn't it an overkill?  When do you think it would be really needed in
>  > >  practice?  I don't feel good about adding code just because we can.
>
>  Sorry, you lost the list from cc.  Please feel free to re-add it.

oh, i didn't notice it.

>  > Sometimes, the root device is complicated and can't be set using the
>  > rootdev, for example, (ata0,1), (memdisk). In this case, we need to
>  > set it explicitly using the root variable. Also, we can set the debug
>  > variable to see debug information.
>
>  OK, fair enough, but I still don't see a scenario when it's needed.
>
>  The best thing would be if this functionality could be used for the
>  normal boot somehow.  Maybe some settings could be specified as
>  variables when GRUB is installed.
>
>

I think the main reason for this is to load grub2 from other
environment, like grub legacy. Allow setting variable have its
advantage, for example, we can load two version of grub2, each with
different setting:

title boot grub2
kernel /core.img

title boot grub2 (debug)
kernel /core.img debug=all

Also, some device, like (cd0), can't be set using traditional method,
we must set the root variable in command line.

title boot grub2
kernel /core.img root=(cd0)

>  > For linux kernel g2ldr, there is no way to set the root device, we
>  > must use command line.
>
>  I'm not sure it's relevant here.  It's not even part of GRUB, is it?

g2ldr is created using lnxboot.img header:

cat lnxboot.img core.img > g2ldr

It's used to load grub2 from loaders that support linux kernel, but
not multiboot, such as lilo, syslinux, etc.

>
>  To sum up, I'm fine with any improvements to the loaders, allowing them
>  to pass more information to the kernels or  whatever they load.
>
>  I have reservations about changes that affect the GRUB core (not the
>  "normal" module), especially those requiring additional memory
>  allocation.  I think this should be justified with some real world
>  example.  Or there should be a way to improve the existing code.

I don't know, is there other way to pass information to grub2 ?

-- 
Bean




reply via email to

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