[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [multiboot] command-line format

From: Seth Goldberg
Subject: Re: [multiboot] command-line format
Date: Thu, 14 Jan 2010 11:07:03 -0800

Solaris uses the first argument (and it is essential to the kernel loading process actually). I've worked around the removal of the original arg0 string by passing the kernel name twice, ie:

  multiboot $skern $skern ...


On Jan 14, 2010, at 8:53 AM, Grégoire Sutre <address@hidden> wrote:


Vladimir just sent a patch regarding this issue, but I had this long (sorry!) email almost finished already, so here it is. And this might give more context for Vladimir's email.

As mentioned in a previous thread, I had some problems getting multiboot options recognized by the NetBSD kernel, and this was actually due to the fact that GRUB Legacy implicitly passes the booted file as first argument whereas GRUB 2 doesn't [1].

I started a thread on NetBSD's port-i386 mailing list [2] on the format of the multiboot command-line, and the discussion moved towards the change in GRUB regarding the first argument (booted kernel in GRUB Legacy, removed in GRUB 2). I ended up doing tests with Xen, which is also multiboot-compliant, and Xen also skips the first argument in its command-line parsing code (well, it's a bit more complex, see [3] for details if you're interested).

In the end, it may be the case that most multiboot-compliant kernels out there still assume that the first argument is the booted file name, and skip it without even looking at it. Do you know of any kernel that does not make this assumption?

There are also other multiboot-compliant boot loaders (e.g. NetBSD's boot loader). Apart from GRUB 2, do you know of another boot-loader that does not put the booted file name as first argument?

I understand that the specification does not enforce the boot loader to follow a specific command-line format. And, in a perfect world, developers should follow the specification, disregarding any particular implementation of the specification. But I guess we don't live in a perfect world ;-)

The reference implementation (GRUB legacy) for the specification led kernel developers to assume a specific command-line format. And for the sake of backward compatibility, all multiboot command-lines for those kernels should contain the booted file name as first argument. So why not change the specification in this way, i.e. require that the command-line starts with the booted file name? I believe that this would merely amount to writing down what most users of the specification had already in mind...


p.s. I guess that there are not many GRUB developers on the NetBSD
mailing lists, and, for my part, this topic is new...  Feel free to
intervene :-)


Grub-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]