bug-grub
[Top][All Lists]
Advanced

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

[PATCHES] saving, displaying and using information given via bootp


From: Thierry Laronde
Subject: [PATCHES] saving, displaying and using information given via bootp
Date: Fri, 2 Mar 2001 21:23:48 +0100
User-agent: Mutt/1.0.1i

Hello,

I know that this is not the priority defined by Okuji, but as the work
is done, here are the patches...

The BOOTP/DHCP allow the dynamic allocation of parameters. The network
parameters were printed by GRUB, but not, for example, the filename to boot.
For an interactive use, this information has to be given. For a non
interactive use, this information must be kept and used.

It is not a good think to make an automatic download : it is the choice of
the user to use, or not, the information given. Secondly, the information
given doesn't imply that the kernel to load is a remote one : you can
imagine given the information to a machine so that it can load a different
_local_ kernel.

So the solution I have adopted is the following :

- The natural way (in the future) is something like : kernel $KERNEL
  [options], that is environment variables ; I have so implemented a "fake"
  environment table, the strict minimum ;
- I have made that for netboot, but in order that this could be reused for
  something else ;
- The user MUST specify the root fs to use : I don't make the assumption
  that, via netboot, the filename refers to a remote fs ;
- There is _no_ automatic downloading via bootp/dhcp : only the
  information about the filename is stored, and can be used via a new
  option of `kernel' : --env-kernel (the name can of course be changed,
  but I only wanted not to let think that this is an automatic
  downloading ; on the other hand, putting an option like `$KERNEL'
  would be definitively a bad idea since there is no real support for a
  symbol table;
- As highlightened by Okuji, the main problem is the use of dynamic memory;
  a real environment table has to use it ; I have so made static memory
  allocation, and the strict minimum, IMHO, the main problem has to be address
  after 1.0 is released.

  For the details, here are the ChangeLog entries :

        From Thierry Laronde <address@hidden> :
        Added the display and the backup of the filename given by
        BOOTP/DHCP, and the reuse of the information via the implementation of 
        a "fake" environment table :

        * stage2/shared.h:
         (KERNEL_BUF): new macro
         (KERNEL_BUFLEN): likewise
         (grub_error_t): new ERR_BAD_SYMBOL
         (symbol): new struct
         (grub_env): new variable - declaration
         (GRUB_ENV_SIZE): new macro
         (env_kernel): new variable - declaration
         (symb_search()): new function - declaration
         
        * stage2/common.c (err_list[]): new ERR_BAD_SYMBOL

        * stage2/builtins.c: definition of new variables `kernel',
         `grub_env' and `env_kernel' 
         (init_builtins): initialisation of `kernel'
         (symb_search): definition
         (bootp_func): displays filename given by bootp/dhcp
         (kernel_func): new option `--env-kernel'
        
        * netboot/main.c (await_reply): defining environment variable named
        "KERNEL"
        
        * stage2/boot.c (load_image): use of the flag `env_kernel'

        * docs/grub.texi (netboot): new option `--env-kernel'


Regards,
-- 
Thierry LARONDE <address@hidden>
10, rue du Bel Air, 74000 ANNECY - FRANCE/ Tel : 33.(0)4.50.67.46.61
/home du SDF (Site Debian Francophone) : http://sdf.polynum.org/

Attachment: grub.diff
Description: Text document


reply via email to

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