grub-devel
[Top][All Lists]
Advanced

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

Re: [multiboot] command-line format


From: Robert Millan
Subject: Re: [multiboot] command-line format
Date: Wed, 20 Jan 2010 00:47:29 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On Sun, Jan 17, 2010 at 01:39:48PM -0600, address@hidden wrote:
> 
> I think a bootloader with "universal" in its name should be doing
> everything possible to avoid this.  If I want to multiboot between
> Linux, NetBSD, OpenSolaris, and OpenBSD, do I load my MBR with the BSD
> fork of GRUB, the Linux fork of GRUB, or the Solaris fork of GRUB?

It doesn't matter, because whichever version of GRUB you use should
generate a grub.cfg that uses multiboot command with appropiate
parameters.

> I think that defaulting the first parameter to the value used by what,
> 90% of kernels, but providing a way to override it (I like the
> variable idea) will be the least surprising for users.  The path is
> filesystem-relative anyway, so GRUB isn't required to know how the
> kernel names its devices, nor do changes to grub device addressing
> change the parameter passed.

Filesystem-relative paths still reflect GRUB's view and aren't really a good
solution for system tools (which deals with absolute paths and mount points
instead).  And even then, there are details like weird characters, slashes,
case sensitivity, etc which might differ.

If you still want GRUB's point of view, you can simply replace:

        GRUB_PATH=$(make_system_path_relative_to_its_root ${SYSTEM_PATH})
        prepare_grub_to_access_device ${SYSTEM_PATH}
        echo "multiboot ${GRUB_PATH}"

with:

        GRUB_PATH=$(make_system_path_relative_to_its_root ${SYSTEM_PATH})
        prepare_grub_to_access_device ${SYSTEM_PATH}
        echo "multiboot ${GRUB_PATH} ${GRUB_PATH}"

in your mkconfig script.  But it is much more straightforward to simply do:

        GRUB_PATH=$(make_system_path_relative_to_its_root ${SYSTEM_PATH})
        prepare_grub_to_access_device ${SYSTEM_PATH}
        echo "multiboot ${GRUB_PATH}    ${SYSTEM_PATH}"

Then your system tools obtain a path that makes sense to them.

-- 
Robert Millan

  "Be the change you want to see in the world" -- Gandhi




reply via email to

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