[syslinux] Re: THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit
H. Peter Anvin
hpa at zytor.com
Wed Aug 31 14:29:44 PDT 2005
Alon Bar-Lev wrote:
>
> Hello Peter,
>
> I am sorry that I am contacting you directly... Please refer me to
> correct contact if you are not the one.
>
> Lately, I've found that 256 bytes long kernel parameters are not enough
> for my configuration.
>
> I've found the place where the kernel defines the length, I've actually
> found it in two places... I cannot understand why...
>
> include/asm-i386/param.h: #define COMMAND_LINE_SIZE 256
> include/asm-i386/setup.h: #define COMMAND_LINE_SIZE 256
>
> Now... I've added an entry in the kernel configuration menu so that I
> can define these constants using menuconfig.
>
> I was quite happy...
>
> But then I've got into a discussion with grub's development team...
>
> From what I've read in the Documentation/i386/boot.txt I understood
> that if I use boot protocol 2.02+ there should be no reason for 256 byte
> limitation on the string pointed by the cmd_line_ptr, so I guessed they
> will deliver the command-line twice once for the old protocol truncated,
> and once for the new protocol not truncated.
>
> Grub and Lilo approach is to point the cmd_line_ptr to the old
> protocol's command line, thus truncating it to 256.
>
> I'm just wondering... Can the 256 limit be broken, without modifying the
> boot protocol?
>
> I think it can... But I need a formal answer so I can push it forward.
>
Yes, it can. Several people on the SYSLINUX mailing list have tried
this, and it works just fine. The current version of SYSLINUX has a
limit of 511 characters (because of memory management reasons inside
SYSLINUX) instead of 255 (plus null).
I think someone on the SYSLINUX mailing list already sent a patch to
akpm to make 512 the default; making it configurable would be a better
idea. Feel free to send your patch through me.
-hpa
More information about the Syslinux
mailing list