Jeff Chua <[EMAIL PROTECTED]> 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 _______________________________________________ Grub-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/grub-devel
