Re: THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit

From: H. Peter Anvin (hpa_at_zytor.com)
Date: 08/31/05

  • Next message: Larry Lindsey: "2.4.27 and the ata_piix (Intel SATA) driver"
    Date:	Wed, 31 Aug 2005 14:29:44 -0700
    To: Alon Bar-Lev <alon.barlev@gmail.com>
    
    

    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

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Larry Lindsey: "2.4.27 and the ata_piix (Intel SATA) driver"

    Relevant Pages