bug-grub
[Top][All Lists]
Advanced

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

Re: [Fwd: Added "stage2-diskless" build]


From: Christoph Plattner
Subject: Re: [Fwd: Added "stage2-diskless" build]
Date: Sat, 05 Jan 2002 23:43:27 +0100

Hello !

Maybe I have an idea, because of your good design !!
As we have now a `--config-file' option, it is possible to let
the user start the network setup inside the preset menu
or to reorganize the build to have only one version of GRUB
(nothing like SUPPORT_DISKLESS) and the make builds up 
GRUBs without preset menu and GRUBs with preset menus
(default one for diskless or one of the user). The #ifdef
SUPPORT_DISKLESS
in builtins.c and so on should be replaced by variables (flags),
and GRUB should determine, if it was netbooted or local booted
to set the falgs.

And one further point: The GRUB shell should not (must not)
process the preset menu. This leads to some bad effects and
a preset menu does not make sense on a shell based GRUB.
So I tested a self patched GRUB version: The menu init state
(my state machine) starts with 2 instead of in the built
for the GRUB shell, so not to process the preset menu and
not to start something like network setup....

I hope you can grab out some design ideas from my brain
storm pieces here.

With friendly regards
Christoph P.


"Yoshinori K. Okuji" wrote:
> 
> At Sun, 14 Oct 2001 01:51:27 +0200,
> Christoph Plattner wrote:
> > In simple words: The preset menu is executed first in any way,
> > and is replaced (concerning menu entries) and overridden
> > concerning settings) when a main config file (local or via net)
> > is present. The network environment will be activated (if using
> > the diskless version) between the preset and the main menu.
> 
> I have implemented my own version right now. My version works in a way
> similar to yours, but I think mine looks better.
> 
> For now, setup_diskless_environment is still called before cmain. But
> I'm not sure where the function call should be put. You did this after
> reading the preset menu, but what if the user wants to do something
> with a network in the preset menu?
> 
> That reminds me of an idea that setup_diskless_environment can be
> removed. This is because we have the preset menu, so we can put
> required commands for setting up a network in it. For example, the
> diskless support could be implemented like this:
> 
> #if defined(SUPPORT_DISKLESS) || defined(PRESET_MENU_STRING)
> # ifdef SUPPORT_DISKLESS
> #  define SETUP_NETWORK_STRING  "bootp\n"
> # else
> #  define SETUP_NETWORK_STRING  ""
> # endif
> 
> static const char *preset_menu = SETUP_NETWORK_STRING PRESET_MENU_STRING
> ...
> 
> However, I don't know if it is a Good Thing to add
> SETUP_NETWORK_STRING into PRESET_MENU automatically. Clearly, this
> implementation wouldn't solve your problem, because "bootp" is called
> before setting up a serial line. So, should the user himself add
> "bootp" when the preset menu is used?? Any comment?
> 
> Thanks,
> Okuji

-- 
-------------------------------------------------------
private:        address@hidden
company:        address@hidden




reply via email to

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