<div class="gmail_quote">On Tue, Aug 2, 2011 at 10:44 PM, Shao Miller <span dir="ltr"><<a href="mailto:Shao.Miller@yrdsb.edu.on.ca">Shao.Miller@yrdsb.edu.on.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<u></u>
<div text="#000000" bgcolor="#ffffff"><div class="im">
<tt>On 8/3/2011 01:27, Larry Brigman wrote:</tt>
<blockquote type="cite">
<div class="gmail_quote"><tt>On Tue, Aug 2, 2011 at 5:21 PM, Shao
Miller <span dir="ltr"><<a href="mailto:Shao.Miller@yrdsb.edu.on.ca" target="_blank">Shao.Miller@yrdsb.edu.on.ca</a>></span>
wrote:<br>
</tt>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><tt>On 8/2/2011 20:02, Andrew Stuart wrote:<br>
</tt>
</div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><tt>
On 8/2/2011 2:13 PM, Larry Brigman wrote:<br>
</tt>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><tt>
I have a grub line for ipxe but it's not processing
the cmdline as it<br>
thinks there is nothing there (see attached screen
shot).<br>
I'm using the main git repo with the last commit of:<br>
commit 149b502306f7b5f7cc9d90cf2095f8dc6576375f<br>
Author: Michael Brown <<a href="mailto:mcb30@ipxe.org" target="_blank">mcb30@ipxe.org</a>
<mailto:<a href="mailto:mcb30@ipxe.org" target="_blank">mcb30@ipxe.org</a>>><br>
Date: Sat Jul 16 01:29:20 2011 +0100<br>
<br>
Some clues on how to troubleshoot this issue?</tt>
<tt><br>
</tt>
</blockquote>
<tt><br>
</tt></div>
<div><tt>
While I don't have any sound troubleshooting advise for
you, I am curious if the following commit may have broke
something (for you).<br>
My git-fu is non existent, but I am curious if you were
to roll back<br>
previous to that commit, if it would change anything.<br>
<br>
Also, since it appears relevant to your use, it might
indicate where you can add some extra debug information
to see what's going on.</tt>
<tt><br>
</tt></div>
</blockquote>
</blockquote>
<div><tt>I've added a little but it doesn't seem to tell me
anything since it just says zero length.<br>
</tt></div>
</div>
</blockquote>
</div><tt><br>
Just to clarify: You've responded to Andrew Stuart's post there,
but also confirmed my guess down below. Thanks. :)<br>
<br>
</tt><div class="im">
<blockquote type="cite">
<div class="gmail_quote">
<div>
</div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
<tt><br>
Mind you, I am a lurker/tinkerer. Doing as I suggest may
very well kill<br>
your [cat|dog|fish|child|significant other].<br>
<br>
</tt>
</div>
<tt>
...</tt>
<div><tt><br>
<br>
commit be600ed9967d93f5012d5277d7ce8c</tt>
<tt>e89d135918<br>
Author: Michael Brown <<a href="mailto:mcb30@ipxe.org" target="_blank">mcb30@ipxe.org</a>><br>
Date: Tue Jun 28 11:29:28 2011 +0100<br>
<br>
</tt>
<tt> [prefix] Cope with BOOT_IMAGE= anywhere within
command line<br>
<br>
</tt>
<tt> Some bootloaders seem to add "BOOT_IMAGE=..." at
the end of the<br>
command line; some at the start. Cope with either
variation.<br>
</tt></div>
<tt>
...<br>
</tt>
</blockquote>
<tt><br>
Woo-hoo! What a nice feature. :)<br>
<br>
One of the files involved is ipxe/src/arch/i386/core/</tt>
<tt>cmdline.c. Your screen-shot, Larry, shows:<br>
<br>
</tt>
<tt> CMDLINE found ""<br>
<br>
which is a message that comes before the "BOOT_IMAGE=..."
stripping.</tt>
<tt><br>
<br>
It might be interesting to add some temporary debugging code
to show the 'len':</tt>
<tt><br>
<br>
</tt>
<tt> static void cmdline_init ( void ) {<br>
...<br>
size_t len;<br>
<br>
</tt>
<tt> /* Do nothing if no command line was specified */<br>
if ( ! cmdline_phys ) {<br>
DBGC ( image, "CMDLINE found no command line\n" );<br>
return;<br>
}<br>
cmdline_user = phys_to_user ( cmdline_phys );<br>
len = ( strlen_user ( cmdline_user, 0 ) + 1 /* NUL */
);<br>
DBGC ( image, "CMDLINE is %zd bytes\n", len );<br>
<br>
</tt>
<tt> /* Allocate and copy command line */<br>
...<br>
<br>
However I would guess that it'd show 0.</tt>
<tt><br>
</tt></blockquote>
</div>
</blockquote>
</div><tt><br>
That guess.<br></tt></div></blockquote><div>No it shows 1 but the +1 in the code is the reason it's not 0. <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div text="#000000" bgcolor="#ffffff"><tt>
<br>
</tt><div class="im">
<blockquote type="cite">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<tt><br>
What version of GRUB and does a simple commandline work?:<br>
<br>
</tt>
<tt> kernel /ipxe.lkrn config<br>
</tt></blockquote>
<div><tt><br>
</tt></div>
</div>
<tt>Tried it with:<br>
<br>
kernel /ipxe.lkrn shell<br>
<br>
still not joy.<br>
</tt></blockquote>
</div><tt><br>
Ok. I was partly wondering if GRUB might've gotten jumbled up
while parsing the command-line, either due to its length or due to
the operators. I guess not (assuming "no joy" means "same
debugging output"). :(<br></tt></div></blockquote><div>yes. <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div text="#000000" bgcolor="#ffffff">
<tt>
<br>
</tt><div class="im">
<blockquote type="cite"><tt>Grub version 0.97-13.5 from Centos 5.<br>
</tt>
</blockquote>
</div><tt><br>
Well now it is hopefully reproducible by another person, at least.<br>
<br>
- Shao Miller<br>
</tt>
</div>
</blockquote></div><br>So how does this variable get set?<br>/** Command line physical address<br> *<br> * This can be set by the prefix.<br> */<br>uint32_t __bss16 ( cmdline_phys );<br>#define cmdline_phys __use_data16 ( cmdline_phys )<br>
<br>I added the line with the info for both phy and virt addresses - here is the output.<br><br>Didn't do a picture this time since I also have IPMI SOL to the box.<br>----------------------------<br> Filesystem type is ext2fs, partition type 0x83 <br>
kernel /ipxe-debug.lkrn ifopen net4 && set net4/ip 134.242.160.142 && set net4/ <br>netmask 255.255.252.0 && set net4/gateway 134.242.160.254 && sanboot <a href="http://10">http://10</a>. <br>
109.0.46/repo/RHEL6/rhel-server-6.0-x86_64-dvd.iso <br> [Linux-zImage, setup=0x800, size=0x4f889] <br> <br>
iPXE initialising devices...CMDLINE phy:99000 user:209fe740 len:1 <br>CMDLINE found "" <br>CMDLINE using "" <br>
CMDLINE freeing command line <br>ok <br><br>----------------------------------<br>debug diff:<br>diff --git a/src/arch/i386/core/cmdline.c b/src/arch/i386/core/cmdline.c<br>
index 595fdad..b65f581 100644<br>--- a/src/arch/i386/core/cmdline.c<br>+++ b/src/arch/i386/core/cmdline.c<br>@@ -78,6 +78,8 @@ static void cmdline_init ( void ) {<br> cmdline_user = phys_to_user ( cmdline_phys );<br>
len = ( strlen_user ( cmdline_user, 0 ) + 1 /* NUL */ );<br> <br>+ DBGC( image, "CMDLINE phy:%x user:%lx len:%zd\n",cmdline_phys,cmdline_user,len);<br>+<br> /* Allocate and copy command line */<br>
cmdline_copy = malloc ( len );<br> if ( ! cmdline_copy ) {<br><br> <br>