grub-devel
[Top][All Lists]
Advanced

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

Re: Replacing the legacy "map" command


From: Pavel Roskin
Subject: Re: Replacing the legacy "map" command
Date: Tue, 27 May 2008 11:59:22 -0400

On Tue, 2008-05-27 at 03:36 +0200, Javier Martín wrote:

>  1.- Given that only the chain OS loader makes use of such a switch, I
> could add it as an option to the "chainloader" command. This is the
> simplest path, as it would only require modifying
> loader/i386/pc/chainloader* and kern/i386/pc/startup.S (where
> grub_chainloader_real_boot resides). Such an option would most
> probably be named something like "mapdrivefirst", as in "chainloader
> --mapdrivefirst (hd1)+1".

I suggest that you avoid excessively long option names.  --mapdrive
would mean the same unless you envision --mapdrivelater or something.
Moreover, --map should be fine, unless you think that something else can
be mapped, and users may want to map the drives, but not that other
thing.  And if the mapping is created by another command, then even
"--map" would be excessive, because there is no point in creating a
mapping if it's not used.

Or maybe "first" means to remap the drive used in the chainloader
command to appear the first drive?  I don't like it, because the
bootsector may reside on a different drive, perhaps in a file as a
backup.  And it doesn't provide an option to remap the original first
drive.

>  2.- The other option would be to add a new command that managed the
> BIOS drive mappings (like, "biosdrivesmap", duh), with three main
> options: "show", "map" and "reset". I'm still unsure of what files
> should be modified for this change, and this might be overkill.
> No matter how the UI (the commands) actually ends up, the mappings
> would just be stored in a variable, and not applied until the "boot"
> command is issued. Thus, actual functionality should probably be
> implemented in grub_chainloader_real_boot, and the logic is pretty
> simple, with most of it available in the GRUB Legacy code.

I think it would be a cleaner solution.

By the way, I can imagine that some kernels not loaded with
"chainloader" may benefit from the remapping as well.

Again, I'd like to see the command name shortened, perhaps to "drivemap"
or "map".  It's not like users will need to distinguish BIOS and
non-BIOS mappings.

-- 
Regards,
Pavel Roskin




reply via email to

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