[ipxe-devel] ixpe cmdline not processing

Shao Miller Shao.Miller at yrdsb.edu.on.ca
Wed Aug 3 00:21:43 UTC 2011


On 8/2/2011 20:02, Andrew Stuart wrote:
> On 8/2/2011 2:13 PM, Larry Brigman wrote:
>> I have a grub line for ipxe but it's not processing the cmdline as it
>> thinks there is nothing there (see attached screen shot).
>> I'm using the main git repo with the last commit of:
>> commit 149b502306f7b5f7cc9d90cf2095f8dc6576375f
>> Author: Michael Brown <mcb30 at ipxe.org <mailto:mcb30 at ipxe.org>>
>> Date:   Sat Jul 16 01:29:20 2011 +0100
>>
>> Some clues on how to troubleshoot this issue?
>
> While I don't have any sound troubleshooting advise for you, I am 
> curious if the following commit may have broke something (for you).
> My git-fu is non existent, but I am curious if you were to roll back
> previous to that commit, if it would change anything.
>
> 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.
>
> Mind you, I am a lurker/tinkerer. Doing as I suggest may very well kill
> your [cat|dog|fish|child|significant other].
>
> ...
>
> commit be600ed9967d93f5012d5277d7ce8ce89d135918
> Author: Michael Brown <mcb30 at ipxe.org>
> Date:   Tue Jun 28 11:29:28 2011 +0100
>
>     [prefix] Cope with BOOT_IMAGE= anywhere within command line
>
>     Some bootloaders seem to add "BOOT_IMAGE=..." at the end of the
>     command line; some at the start.  Cope with either variation.
> ...

Woo-hoo!  What a nice feature. :)

One of the files involved is ipxe/src/arch/i386/core/cmdline.c.  Your 
screen-shot, Larry, shows:

   CMDLINE found ""

which is a message that comes before the "BOOT_IMAGE=..." stripping.

It might be interesting to add some temporary debugging code to show the 
'len':

   static void cmdline_init ( void ) {
   ...
       size_t len;

       /* Do nothing if no command line was specified */
       if ( ! cmdline_phys ) {
           DBGC ( image, "CMDLINE found no command line\n" );
           return;
       }
       cmdline_user = phys_to_user ( cmdline_phys );
       len = ( strlen_user ( cmdline_user, 0 ) + 1 /* NUL */ );
       DBGC ( image, "CMDLINE is %zd bytes\n", len );

       /* Allocate and copy command line */
   ...

However I would guess that it'd show 0.

What version of GRUB and does a simple commandline work?:

   kernel /ipxe.lkrn config

- Shao Miller



More information about the ipxe-devel mailing list