Hi Robert,
Thanks for your detailed explanation, it was really helpful to me. I
understand that for compatibility with some platforms, GRUB must provide
a way to specify two potentially different file parameters:
(a) the GRUB path to the booted file; this path does not appear in the
multiboot command-line.
(b) the path that shall be passed to the booted file; this path (if any)
is the first argument in the multiboot command-line.
However, my first post in this thread was more about the multiboot
specification itself. In light of your explanations, I would re-phrase
my suggestion as follows: in the multiboot specification, require that
the first argument of the MB command-line be a path to the booted file
*in a notation that is specific to the booted kernel*. Or, if this is
too constraining or too confusing, simply ask that the first argument is
an informative string that does not contain kernel options (i.e. it can
safely be skipped). This way, the specification would be closer to the
reference implementation (GRUB Legacy), and, more importantly, to what
multiboot-compliant kernels already *assume* about the format of the
command-line (NetBSD, OpenSolaris, Xen, others?).
For GRUB 2, this could be implemented by a multiboot command that, by
default, behaves as GRUB Legacy, but also offers a way to modify the
implicit first argument of the multiboot command-line. Something like:
multiboot $path[;$ospath] ...
(a) $path is the GRUB path to the booted file.
(b) $ospath is the path that shall be passed to the booted file.
By default, if there is no ';' in the first argument, $ospath is set to
the value that GRUB Legacy would have used. Maybe a GRUB shell variable
`multiboot_ospath' would be better than this ';' marker.
This way, we keep the extra flexibility of having different paths, but
we also:
- keep backward compatibility with GRUB Legacy: kernels can still assume
that the first argument of the multiboot command-line is not a kernel
option.
- don't force users to repeat the path for kernels that are happy with
the way GRUB Legacy worked (all of them except OpenSolaris?). I agree
that this point is of no concern to most users, but in some cases
grub-mkconfig does not work (e.g. grub-mkconfig does not support
--root-directory at the moment), and some users prefer the flexibility
of the command line anyway.
Grégoire
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel