Hello, OKUJI!

> > I'm trying to understand why "map" doesn't work for me.
> 
>   Give me more detailed information. What did you do and what
> happened?

Well, it seems that I used to expect too much from that command before I
looked at the code.

1) I expected that the "map" command affects the way how GRUB itself
recognises the drives. I expected that after
map (hd1) (hd0)
root (hd1,<TAB>
I would see the partition table of (hd0)
I don't say it's what I need, but it wasn't clear from the output of the
"help map" whether this effect should be expected or not.

2) I expected that the "map" command can be used instead of HDBIAS in the
"root" command in order to fool FreeBSD kernel.
Again, I don't say that it's a good idea, but nothing indicated that
"map" affects chainloading only.

3) I expected that GRUB will pass the drive number in the translated
form. For example, I expected the following to work:

map (hd1) (hd0)
map (hd0) (hd1)
root (hd1,0)
chainloader +1

Since GRUB doesn't translate the drive number, I have to write

map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd0)
chainloader (hd1,0)+1

Again, I admit that it may be impossible to translate the drive number.
For example, if both 0x81 and 0x82 have been made to refer to the real
0x81 and you set "root (hd1)" GRUB cannot decide whether it should pass
0x81 or 0x82.

4) I expected that loading Windows 98 from (hd1,0) will work. It
doesn't. The Win98 bootloader reports an error. The commands are exactly
as above:

map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd0)
chainloader (hd1,0)+1

I don't have DR DOS to test. The only thing that works for me is
chainloading GRUB from another GRUB after remapping drives.

Pavel Roskin

Reply via email to