|
Description
|
Category
kernel
Sub-Category
boot-x86
Description
snv_81 x86: for a diskless nfs client pxegrub is unable to pass arguments to
the kernel, when the kernel image is loaded with the "kernel$" command.
Sample pxegrub menu.list file on the tftp boot server; when selecting the first
entry we will load and stop in the kernel debugger, with the second entry
kmdb isn't loaded, verbose boot isn't done, and we boot into multiuser:
________________________________________________________________________
default=0
timeout=10
splashimage /max/boot/grub/splash.xpm.gz
title Solaris Express Community Edition snv_81 X86
kernel /max/platform/i86pc/kernel/unix -kdvs
module$ /max/platform/i86pc/$ISADIR/boot_archive
title Solaris Express Community Edition snv_81 X86 (broken argument parsing?)
kernel$ /max/platform/i86pc/kernel/$ISADIR/unix -kdvs
module$ /max/platform/i86pc/$ISADIR/boot_archive
________________________________________________________________________
Workaround:
===========
use "kernel" instead of "kernel$".
Fix:
====
Bug is in usr/src/grub/grub-0.95/netboot/fsys_tftp.c, function tftp_dir_undi().
Apparently grub's "dir_func" filename lookup functions are supposed to lookup
a NUL or space (!) separated filename from the kernel command line, without
modifying the command line.
tftp_dir_undi() has code to temporarily NUL terminate the pathname, but it
restores an uninitialized character (ASCII NUL '\0' ?) where the original
kernel command line had a space. This strips the kernel arguments from the
"kernel$ ..." command line.
diff -r d8f13d1693ee usr/src/grub/grub-0.95/netboot/fsys_tftp.c
--- a/usr/src/grub/grub-0.95/netboot/fsys_tftp.cFri Feb 01 10:11:12 2008 -0800
+++ b/usr/src/grub/grub-0.95/netboot/fsys_tftp.cMon Feb 04 15:00:24 2008 +0100
@@ -825,7 +825,7 @@ tftp_dir_undi(char *dirname)
return 1;
/* name may be space terminated */
-nul_terminate(dirname);
+ch = nul_terminate(dirname);
saved_name = (char *)&saved_tp;
sprintf(saved_name, "%s", dirname);
Frequency
Always
Regression
Solaris 10
Steps to Reproduce
Setup a tftp boot server for booting x86 systems using pxegrub, and in a
diskless client's menu.lst.* file, use some kernel options like "-kdvs"
on the "kenel$" line.
Try to boot the diskless client with pxegruv & that menu.lst.* file.
Expected Result
Arguments can be assed to the loaded kernel.
Actual Result
Arguments are ignored.
Error Message(s)
Test Case
Workaround
In the menu.lst entry, use "kernel" instead of "kernel$".
Submitter wants to work on bug
Yes
Additional configuration information
|