Hi, I have added some code to Grub so that it could pass some information to kernel. This idea came when i try to boot Linux remotely using Grub. ( There is only one laptop that could be used as Linux server in that windows network ). The parameters obtained by Grub form bootp server can't be passed to Linux so I have added some code so that that (network ) data is automatically inserted in the command line. For example the command line ( only for the kernel command ) "nfsroot=$sa:/tftpboot" is expanded into "nfsroot=0.0.0.0 :/tftpboot".
The following files are modified: stage2/cmdline.c ( primary ) stage2/builtin.c ( the function expand_cmdline called ) stage2/shared.h ( prototype for expand_cmdline ) netboot/misc.c ( secondary, for $ip,$sa,netmask, $gw ) netboot/main.c ( simple change but makes a static variable into global, the variable is netmask ) Please do analyse and test the code before accepting this code. (any way i'm going to use it :) I have attached the Patch. apply this patch to grub-0.92 Thanks, Vasanthan
cmdl.patch.gz
Description: inlinefilename="cmdl.patch.gz"