LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Grub problem with 2 drives and multiboot (https://www.linuxquestions.org/questions/linux-newbie-8/grub-problem-with-2-drives-and-multiboot-132713/)

Defaultman 01-08-2004 09:29 AM

Grub problem with 2 drives and multiboot - SOLVED!
 
Hello!

My system is Abit NF7-S ver2 with 2 IDE controllers and 2 SATA controllers. I'm running 2.6.0 kernel Fedora core 1 with no problems except a working multiboot.

This is my drive setup:

- 1st IDE disk has Fedora linux and Grub in MBR. /dev/hda in linux.
- 2nd IDE is CD-RW. /dev/hdc in linux.
- 1st SATA disk has Windows XP. /dev/hde in linux

I installed Grub to MBR in /dev/hda which is the IDE drive as I want to boot IDE and leave sata disks MBR intact so I can boot XP solo if I need to. So, in BIOS I have boot from IDE-0 first, which is the Linux drive /dev/hda (hd0 in Grub).

I can't get Grub to load WinXP when booting with the IDE disk. So, in the boot hd0 is the IDE disk with Grub and hd1 is the SATA disk with XP.

I have tried:

title Windows

map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,0)
makeactive - tried with and without
chainloader +1 - also tried chainloader (hd0,0)+1
boot - tried with and without

Changing order and leaving lines off for various combinations but no success so far. It always stops on a text screen with these Grub commands in it and nothing happens. Also tried without the mapping commands. Always the same result.

Only way to switch booting systems for me is to switch the booting drive in BIOS: IDE for linux and SATA for WinXP.

Any tips? Is the only choide to install Grub to WinXP driver MBR and try it that way? Or make a real /boot partition and install Fedora again?

Zero-0-Effect 01-08-2004 11:06 AM

In the boot section for Windows is needs to say rootnoverify (hd1,0) so it points to the SATA drive. Even though you used map to do a virtual swap, grub still sees the drive as hd1, only the OS sees it as hd0.

Dont use boot or make active commands, those are implied.

How much was your SATA drive, they any good as far as speed is concerned?

-Zero

Defaultman 01-08-2004 12:27 PM

Thanks I'm gonna try out that trick now in case I missed it before.

SATA drive is certainly faster than my old ATA100 IDE drive but nothing groundshaking. The real benefit is the much thinner cable of SATA standard ;) The prices are about the same nowadays so at least I will buy SATA drives from now on.

Defaultman 01-09-2004 02:54 AM

Didn't work :(

So I made some rearrangements:

I repartitioned the IDE disk (hd0) to following partitions:

hda1 /boot 100Mb
hda3 / 15Gb
hda5 /swap 1Gb
and the rest is a FAT32 partition for sharing files with XP.

SATA drive is all WinXP. it is hd1 in Grub and /dev/hde in linux.

I installed Grub to first sector of boot partition. That means hda1 a.k.a /boot.

- At first boot I got GRUB error 15 which ment file not found. Then I booted with Fedora CD and reinstalled grub with grub-install --root=/dev/hda1.
- Next boot I was greeted with a grub prompt. No menu yet I have one in /boot/grub/grub.conf.
Then I noticed grub had done this kind of directory structure for itself:
/boot/boot/grub/. So it had made a /boot dir to /boot partition?! Weird!
- Then I copied the grub.conf and menu.lst to this new directory and at next boot I had the menu and I could boot Linux.

BUT I still can't boot the damn WinXP drive from Grub. I just get the Grub commands on screen and then nothing happens.

Win entry in Grub.conf is:

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

Do I really need to install Grub into MBR of the WinXP SATA drive and then boot from it? Could I get the multiboot working easier this way? I'm getting tired of Grub to be honest... It doesn't handle IDE and SATA drives mix very welll it seems. Or does anyone have a succesfull IDE/SATA drive multiboot setup?

Demonbane 01-09-2004 03:12 AM

Have you tried:

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

?

what happens if you invoke these lines into the grub console directly?(i think u press 'c' inside grub menu to get in the console, cant remember). Note that you need to enter 'boot' in the end, inside the console.

oh and for the grub /boot/boot problem, thats because you probably had /boot in your kernel path, just change it to /, when u have a separate /boot partition the files are seen by grub as in /, its only when u boot into your system that the partiton gets mounted on /boot, which has little relevance to grub itself.

JZL240I-U 01-09-2004 03:33 AM

I don't understand your setup / disk-structure. Where are the hdb, hdd etc drives and why are there no even numbered partitions? Please post /etc/fstab, maybe that helps understanding...

Defaultman 01-09-2004 06:11 AM

Ok thanks, I will try again at home.

For disk structure: I have 2 drives, I didn't list extended partitions, only mountable ones. SATA drive is seen as /dev/hde in linux.
I hope this clears it up a bit! I will post the exact /etc/fstab once I'm home.

JZL240I-U 01-09-2004 06:29 AM

All drives should be mountable, else you can't access them!?! What kind of devices do you have at hdb, hdd, hdf...? I'll be back at Monday, so have something to read in the meantime ;):

http://www.mcc.ac.uk/grub/grub_toc.html

http://www.gnu.org/manual/grub-0.92/html_mono/grub.html

http://www.tldp.org/HOWTO/Multiboot-with-GRUB.html

http://www.tldp.org/HOWTO/Linux+Win9x+Grub-HOWTO/

Good luck. :)

Zero-0-Effect 01-09-2004 09:05 AM

you have:
hda - linux harddrive
hdb - empty
hdc - cdrom
hdd - empty
hde - SATA with windows
correct?

to boot windows is should just be

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

If you have another harddrive in either hdb or hdd...(3rd drive) the SATA drive will not be hd1. Neeed to know ALL devices and where they are connected. Is Windows on the first partition of the SATA drive?

Defaultman 01-09-2004 03:05 PM

This is my disk structure:

/dev/hda - IDE disk, has Grub and linux. I boot this first (or want to)

- hda1 /boot (primary partition)
- hda2 extended partition (holds hda4 and 5)
- hda3 / root (primary partition)
- hda4 swap partition
- hda5 a FAT32 partition

I made the above partitions with Disk druid, at the setup of Fedora.

/dev/hde is the SATA drive, has WinXP. Can boot too if I choose in BIOS.
- hde1 ntfs partiton for XP (primary)
- hde2 a FAT32 partition

/dev/hdc is my CD-RW drive.

In Grub, the hard drives are of course hd0 and hd1.

I even booted to XP recovery console and did fixboot and fixmbr to SATA drive to make sure it's bootareas are ok.

Zero-0-Effect: I didn't yet try to type the commands at Grub prompt. Those lines at menu.lst however didn't do the trick. Text GRUB and the commands just stay on the screen.

Defaultman 01-11-2004 03:24 PM

This case is solved! It was not a linux issue, not a Grub issue but a motherboard bios issue:

My motherboard is Abit NF7-S ver2 and I was using this (modified) BIOS with a newer sata bios v4.2.32. I got this tip from someone who has a working multiboot with a similar setup but used a bios with older sata bios so I though I'd give it a try.

So I flashed to older one with v4.2.2.7 sata bios (still a modded one so I don't think the mod itself is the fault, only the sata bios) and it begun to work with first try! :)

Lesson learned: don't use Abit NF7-S board with sata bios 4.2.3.2!!

Thanks all for help and suggestions, I learned a lot during the process.

3N1GM4 01-01-2005 11:41 AM

I am having almost this exact same problem...

I too have an NF7-S and have XP on my SATA HD and have just installed Fedora Core 3 to my IDE HD. I can boot to Fedora fine, but not to XP...

I have tried messing around with the GRUB config file, but with no success, and I tried doing fixmbr on my XP install form the Recovery Console, but that not only didn't fix XP, it messed up Fedora, so I had to re-install it...

I don't know whether my NF7-S is v1 or v2, how do I find out? Where can I get the appropriate BIOS upgrade to fix this? And what did you end up with in your GRUB config once you got it to work?

Hope you can help me, I have stuff on my XP install I need to get to...

JZL240I-U 01-03-2005 05:22 AM

Just in case it is not a BIOS / mainboard problem: Try an other distribution (SuSE, Knoppix...). To my experience SuSE handles different OSes very well (and all automatically, without you having to interfere more than to click "Okay")...

ZaphyR 01-03-2005 08:02 AM

ya, try SuSE :) it works like a charm every time
i have also had no problems using GRUB, dualbooting Gentoo with XP.

Perhaps the Gentoo Handbook can give you some hints?

http://www.gentoo.org/doc/en/handboo...part=1&chap=10


All times are GMT -5. The time now is 12:56 PM.