On Mon, 9 Oct 2006, Hollis Blanchard wrote:

Shall I use '#ifdef __linux__' to include <asm/param.h> only on linux, and
'#define COMMAND_LINE_SIZE 255' for non-linux system?

5B> Well, does this number change often? If not, let's just copy it.

If so, then we're screwed anyways because asm/param.h would only match
the installed kernel's limit, so may not work for other kernel versions.

You're right. asm/param.h determines the limit. We've read this from here for linux.

The idea is that there are users out there who wants to pass quite a few parameters during boot, and loadlin currently handles this. I'm passing network address, netmask, broadcast, hostname, modules_to_load and boot the system up using ramdisk. This allow every system to be unique and yet able to boot from the same CDROM/image.

So, another approach is to use "configure --CommandLineSize=1024" to specify the size, but I thought reading from asm/param.h would be easier.

Setting the current limit to 255 essentially means grub sets it's own limit, and even the kernel supports 1024, grub doesn't.


Jeff.




_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to