quick GRUB and ubuntu question

Henrythewound

Senior member
Oct 25, 2002
477
0
0
I have recently installed ubuntu on a 2nd (slave) HD in my home PC, Windows XP is installed on the master HD. I opted to install the GRUB loader on the 2nd HD only, and not alter the Windows MBR. If I switch the BIOS settings to look to the slave HD 1st, I get the grub menu and ubuntu loads fine. If I choose to bot XP, I get the following error

filesystem type unknown, partition type 0x7

I have googled and found a few suggestions to try adding the following lines to the GRUB menu.lst

title Windows XP
map (hd0)(hd1)
map (hd1)(hd0)
rootnoverify (hd1,0)
chainloader +1

I think this has something to do with Windows needing to "think" it is located on the primary drive & partition. I am confused how the "map" command works, does it tell windows it is on a diff drive just for booting purposess? I am going to give this a shot when I get home.

Incidentally, if I switch the BIOS to load the master HD 1st, GRUB doesn't even come up at all and XP boots normally, is this because during booting the slave HD isn't even "seen" as it boots from the master drive w/ XP first?

Thanks a lot

CLIFFS
what does
map (hd0)(hd1)
map (hd1)(hd0)
do in the GRUB menu.lst under the Windows XP section?
 

TGS

Golden Member
May 3, 2005
1,849
0
0
Originally posted by: Henrythewound
I have recently installed ubuntu on a 2nd (slave) HD in my home PC, Windows XP is installed on the master HD. I opted to install the GRUB loader on the 2nd HD only, and not alter the Windows MBR. If I switch the BIOS settings to look to the slave HD 1st, I get the grub menu and ubuntu loads fine. If I choose to bot XP, I get the following error

filesystem type unknown, partition type 0x7

I have googled and found a few suggestions to try adding the following lines to the GRUB menu.lst

title Windows XP
map (hd0)(hd1)
map (hd1)(hd0)
rootnoverify (hd1,0)
chainloader +1

I think this has something to do with Windows needing to "think" it is located on the primary drive & partition. I am confused how the "map" command works, does it tell windows it is on a diff drive just for booting purposess? I am going to give this a shot when I get home.

Incidentally, if I switch the BIOS to load the master HD 1st, GRUB doesn't even come up at all and XP boots normally, is this because during booting the slave HD isn't even "seen" as it boots from the master drive w/ XP first?

Thanks a lot

CLIFFS
what does
map (hd0)(hd1)
map (hd1)(hd0)
do in the GRUB menu.lst under the Windows XP section?

Text

It's because through the BIOS you set the "second(Grub bootloader)" disk to boot first, which grub will then *or should* see as hd0. When it chainloads it makes the virtual map from hd0 to hd1, and vice versa on the now "second(XP bootloader)" disk. That way Windows thinks its booting off the primary disk as per the usual startup.

Just as a FYI it won't hurt anything to load GRUB on your primary disk. I find it's a much easier bootloader to work with, especially in a multi-boot setup. You can always boot from a windows CD command line and do a /fixboot to overwrite the existing bootloader if you don't like it.
 

Henrythewound

Senior member
Oct 25, 2002
477
0
0
Thanks, I know GRUB sees whatever drive it is installed on as hd0, so when I installed it onto my slave hd I had to edit all the roots for the ubunto system from (hd1,0) to (hdo,0). I wanted to avoid writing grub to the windows mbr (although I know it works well that way) mostly out of stubbornness. If this turns out to be more trouble than its worth (ie I have to edit things like this every time I update, I'll likely just go with the default writing of GRUB to my primary hd.

Thanks for the reply and link!