On Sun, Feb 17, 2002 at 04:40:09PM +1000, Ron Addie wrote:
> I am sorry if this is an inappropriate destination for this msg.
> Please advise a different destination if you are unable to help.
> 
> I would like to be able to set an environmental variable from
> within my grub configuration file -- so that I can see, from
> within the boot scripts such as rc.local, which loading option
> was selected in the grub menu.
> 
> Is this possible? How can it be done?\

It's not possible to set environment varibles for arbitrary processes from
the pre-boot environment. But you can get the job done by making up kernel
command line options. For example:

title Boot from /usr/src/linux/.../bzImage
kernel (hd0,0)/usr/src/linux/arch/i386/boot/bzImage src vga=5 idebus=66

grep src /proc/cmdline >/dev/null && echo "Booted from /usr/src."

-- 
Jacob Elder
http://www.lucidpark.net/


_______________________________________________
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub

Reply via email to