LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Grub Dual Boot /dev/sda1 /dev/hda1 (https://www.linuxquestions.org/questions/debian-26/grub-dual-boot-dev-sda1-dev-hda1-274499/)

jono268 01-06-2005 03:51 AM

Grub Dual Boot /dev/sda1 /dev/hda1
 
Hey guys,

I have a problem, i have a sata hard drive, maxtor 120gb, and a general IDE harddrive 80gb maxtor.
On the IDE /dev/hda1 - there's debian installed and grub on the /mbr of that; and on the /dev/sda1 sata drive there's windows xp on there. Both boot fine, but i have to remove /dev/hda (the IDE hdd to get into windows xp) and once it's plugged in, it will boot into debian.

Now i'm aware grub will probe the device bios and create a list of known devices in the device.map /boot/grub/device.map - in there there is only

hd0 /dev/hda

and hence, booting into debian is hd0,0 ; there is no detection when i run grub for /dev/sda - so i tried adding hd1 /dev/sda and used

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

this basically just doesn't work. I have also gone into the grub shell and typed kernel (hd<tab) and in there it says:
Possible disks are: hd0 hd1

so i presumed it was hd1,0 and was correct.

what happens when i boot is it says
booting "windows xp"
rootnoverify (hd1,0)
makeactive
chainloader +1

and then just stops there, i dont' get any error message. I would be very grateful for any help.

Regards

jon

Slalomsk8er 01-07-2005 04:08 PM

Grub Problem
 
Sorry, dubble post.
This was the not spell checked :D

Slalomsk8er 01-07-2005 04:14 PM

Grub Problem
 
Gentoo on /dev/hda1
WinXP on /dev/sda1

Same song, same problem.

The thing with the device.map was new to me.

At the moment I have to change the boot order in bios to get in to my desired OS :mad:

What I try-ed till now:
Code:

map (hd0) (hd1)
map (hd1) (hd0)

I read, windows want to be on the first HD (not really a surprise if you know the character of this OS), map does virtually swap the HDs.
Code:

chainloader (hd1,0) +1
To spezify the HD in the chainloader seems to make the root (hd1) obsolet.
After map, is sda1 hd0 or hd1 (both no go)?

As I am not a Grub guru, I do not know if I need root, rootnoverify or makeactive.

Can it be, that editing the device.map and using map brings this configuration (2 MBRs) to work?

Thanks, Dominik Riva

PS: Cool this forum has a spell checker, for a German speaking like me, this is quite usefully;)

Slalomsk8er 01-07-2005 05:01 PM

BIOS Problem?
 
Found this thread the Grub and SATA problem, there it was a BIOS problem :scratch:

I have a ASUS A7N8X deluxe v. 2.0 Mainboard with latest BIOS.

Is this a BIOS problem?

Thanks, Dominik Riva

<edit>I opened a thread in the Linux General part, as I think this is not a Distro thing ;) </edit>

aus9 01-14-2005 04:54 AM

you may wish to check out my howto http://www.linuxquestions.org/questi...hreadid=237511

since you have 2 drives you have 2 mbrs and most bios can either boot the ide or the sata first, your choice.

my gigabyte is still looking for an ide b4 it finds the sata.....but who cares.

so its either
bios to sata mbr with ntldr with the special grub file to get to ide
bios to ide mbr with grub with the chainloader stuff to get to the sata
(it is in my howto....ho hum)

2) for those who want to make the linux drive first boot device you need to trick windows with the map command so for your enjoyment here it is from my howto

title windows plan A
hide (hd0,0)
rootnoverify (hd1,0)
map (hd0)Z(hd1)
map (hd1)Z(hd0)
makeactive
chainloader +1

EXPLAIN
Remove the Z so there is ONE space between the map brackets.
MS sits on /dev/hdc1 ( aka C drive) Grub says that is (hd1,0)
rootnoverify says don't try to mount this partition but execute the next command etc
map says what you think is drive 1 is now drive 2 and what was drive 2 is now 1 so C drive now thinks its truly on first drive first partition.
makeactive says if this was not yet bootable make it so
chainloader says don't try to boot this DEAR GRUB, but let whatever that partition has a bootloader attempt to do so

amendments
HIDE is hiding from grub the true linux boot folder which bios sees first
/dev/hdc1 was my second drive on same ide controller as a slave (no fetishes) but remember grub see hd.

its helpful on the linux drive to have a map file but remember to change your /etc/fstab files before you reboot and I hope you have a cd or boot floppy

gives us some feedback if I am too vague for you


All times are GMT -5. The time now is 03:30 AM.