Dne 27 Květen 2008, 23:47, Javier Martín napsal(a):
>>> For grub, i'd suggest
>>> map [olddrive newdrive] ... eg. map (hd1) (hd0) (hd0) (hd1)
> That was the syntax used in GRUB Legacy, it was successful and could be
> reused, but I'd prefer the "drivemap" command I suggested earlier, with
> options not just to map drives, but also to show the mappings and to reset
> them to the BIOS defaults. I'd still consider a "--automap" flag in the
> "chainloader" command quite useful, but I don't know how could
> this be set up, since there would be two modules involved: "chain" and the
> new "map" module. Chainloader would need to check whether the "map" module
> is available and/or loaded ~_~

The cooperation between modules is not hard, but I think
map -first (hdx) will be more useful. Such command just swaps hd0 and hdx
drives. This also covers the scenarios when we chainload something else
than first sector of given partition.

And maybe we can also consider following syntax:
map -pos (hd2) (hd0) (hd4)
with meaning:
  hd0->hd1,
  hd1->nothing
  hd2->hd0,
  hd3 not touch,
  hd4->hd2
I.e. positional syntax, first argument is mapped to (hd0), second to (hd1),
  and so on.

This syntax will be sufficient most times and writing
  chainloader --automap (hd1,0)+1
is same as writing
  map -first (hd1)
  chainloader (hd1,0)+1
or
  setting grub root to (hd1,0)
  map -root
  chainloader +1

-- 
Tomas Ebenlendr
                            http://drak.ucw.cz/~ebik



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

Reply via email to