From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GXIcu-0000XF-OY for mharc-grub-devel@gnu.org; Tue, 10 Oct 2006 10:30:36 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GXIct-0000Ws-Ly for grub-devel@gnu.org; Tue, 10 Oct 2006 10:30:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GXIcs-0000WT-66 for grub-devel@gnu.org; Tue, 10 Oct 2006 10:30:35 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GXIcs-0000WO-0c for grub-devel@gnu.org; Tue, 10 Oct 2006 10:30:34 -0400 Received: from [194.109.24.32] (helo=smtp-vbr12.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GXIke-0002wl-V1 for grub-devel@gnu.org; Tue, 10 Oct 2006 10:38:37 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr12.xs4all.nl (8.13.8/8.13.8) with ESMTP id k9AEURAZ068045; Tue, 10 Oct 2006 16:30:31 +0200 (CEST) (envelope-from mgerards@xs4all.nl) From: Marco Gerards To: The development of GRUB 2 References: <1160447238.29722.4.camel@diesel> <1160454731.32244.6.camel@diesel> <87ejtg1x3n.fsf@xs4all.nl> Mail-Copies-To: mgerards@xs4all.nl Date: Tue, 10 Oct 2006 16:38:52 +0200 In-Reply-To: (Jeff Chua's message of "Tue, 10 Oct 2006 16:01:24 +0800 (SGT)") Message-ID: <8764es1bib.fsf@xs4all.nl> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Cc: Jeff Chua Subject: Re: how to increase commandline size (patch + changelog) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2006 14:30:35 -0000 Jeff Chua writes: > On Tue, 10 Oct 2006, Marco Gerards wrote: > >> Isn't it possible to use the kernel binary to determine this? For >> example, is the maximum commandline size stored somewhere? Perhaps, >> we can determine it by looking at some version field? According to >> the documentation it is has a maximum length of 255 bytes for every >> Linux version: > > But, user can overwrite this to expand the commandline. It's > documented, and tested. See > http://www.x86-64.org/lists/discuss/msg06193.html Well, a protocol change which is not official and an email is not really documentation. >> I don't want the loader to rely on being compiled on GNU/Linux. GRUB >> 2, when compiled on *BSD, should be capable of loading Linux just as >> GRUB 2 compiled on GNU/Linux would. > > Agree. So, standard 255 is ok, but then it'll be nice to allow user to > compile "grub2" to expand the commandline. I don't know whether any > distributions expand more than 255 characters. Compile time arguments are not really an option to me. In that case I prefer something run-time. Or something that can be detected at run-time. It seems all the official versions do not make this change, so changing this is actually non-standard. You can not rely on the header files when compiling GRUB. Who says the headers you use is for the kernel you load? The same is true for compile time arguments. So there are two things we can do: - Detect this somehow by looking at the binary. This should be reliable. I don't think this is possible. - Add some run-time argument to the loader to override the command line length. But I do not like this either because it allows breaking the Linux boot protocol. -- Marco