You are not logged in.

#1 2007-01-14 13:20:27

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

GRUB GRUB GRUB

Good day.
As I am going to a network party next weekend, I decided to install Windows because I want to play all the fanzy games. <:
As I don't want to use Windows except from playing, I wanted to install Arch64 again as my main system.
I've got two HDDs and I want to install Windows and Linux on hda.
I created a 30 GB partition and installed Windows. The unpartitioned 40 GB shall be used by linux.
Then I ran arch64 setup, partitioned the rest of hda accordingly and installed successfully. But when the booloader comes into play, I ran into trouble.
As Windows' bootloader has to be installed in /dev/hda (this cannot be changed as far as I know), I decided to install grub to /dev/hdb and set up my BIOS in order to boot from IDE0 Slave first.

But now when I want to reboot my computer and it is trying to boot from /dev/hdb I just see plenty of times "GRUB " printed on the screen.

I asked google for solution and the only way I found was:
Disable auto-detection of HDDs. -> I did this, didn't work.

I installed grub via this command from knoppix because with arch I ran into trouble because of a wrong (incomplete) device list and I didn't want to search for a solution with elinks.

grub-install --root-directory=/mnt/arch /dev/hdb

The files in /mnt/arch/boot were created by arch64 installed and seem to be correct:

/boot/grub/menu.lst

timeout   5
default   0
color light-blue/black light-cyan/blue

# (0) Arch Linux
title  Arch Linux
root   (hd0,2)
kernel /boot/vmlinuz26 root=/dev/hda3 ro
initrd /boot/kernel26.img

# (1) Arch Linux
title  Arch Linux Fallback
root   (hd0,2)
kernel /boot/vmlinuz26 root=/dev/hda3 ro
initrd /boot/kernel26-fallback.img

/boot/grub/device.map

(fd0)    /dev/fd0
(hd0)    /dev/hda
(hd1)    /dev/hdb
(hd2)    /dev/sda

Hope you've got some suggestions for me.

Thanks.
harlekin

edit: If this is useful:

/dev/hda1 = windows
/dev/hda2 = linux swap
/dev/hda3 = linux /

Hail to the thief!

Offline

#2 2007-01-14 14:22:41

rayjgu3
Member
From: Chicago IL usa
Registered: 2004-07-04
Posts: 695

Re: GRUB GRUB GRUB

since both os's are on same drive hda i presume why not put grub on hda
with both windows & arch64 options in grub
/boot/grub/menu.lst

# (0) Arch Linux
title Arch Linux
root   (hd0,3)
kernel /boot/vmlinuz26 root=/dev/hda4 ro
initrd /boot/kernel26.img

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

check this out
this will enable you to choose which os to boot . make sure you adjust the arch64 to proper partition

Offline

#3 2007-01-14 15:18:11

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: GRUB GRUB GRUB

I spend hours of trying to know how the bootloaders work and how they interact together. My stand of knowledge is - concerning to this solution - grub is just calling the windows bootloader (because grub cannot boot windows by itself) which would fail if I overwrite hda's MBR with grub because the windows bootloader doesn't exist anymore then. <:

But if I am wrong, I'll try this! Thanks for the link.


Hail to the thief!

Offline

#4 2007-01-14 17:39:11

noriko
Member
From: In My Mind
Registered: 2006-06-09
Posts: 535
Website

Re: GRUB GRUB GRUB

where did u read that?
from my pov it's not quite true ...

the xp bl is actually on the xp root device afaik ..
so the chainloader function should work as expected if  grub is on the hda mbr ...
or if ur still not sure u wanna do it, then use the xp boot loader to boot linux;

i googled and found this to be a very good guide to a working process..
http://www.tprthai.net/bootmgr.htm


The.Revolution.Is.Coming - - To fight, To hunger, To Resist!

Offline

#5 2007-01-14 20:39:10

scarecrow
Member
From: Greece
Registered: 2004-11-18
Posts: 715

Re: GRUB GRUB GRUB

You CAN put XP on hdb, and then using grub from hda with an entry like:

# (4)Win XP
title        Windows XP
root        (hd1,0)
makeactive
map        (hd0) (hd1)
map        (hd1) (hd0)
chainloader    +1

I use the same scheme currently with absolutely no problems.


Microshaft delenda est

Offline

#6 2007-01-14 21:50:12

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: GRUB GRUB GRUB

noriko: Don't know where I read it and I think I won't find it anymore.
But I installed windows three times, linux two times. My first settings were different and one setting was like this:
/dev/hda1 32 MB /boot
/dev/hda2 Strange partition windows creates that seems to contain hda5
/dev/hda3 1 GB swap
/dev/hda4 40 GB /
/dev/hda5 ~30 GB Windows

After installing windows I mounted /dev/hda1 and saw files in there. boot.ini for example and those files were smaller than 512 KB. So I guess it was the bootloader which seems to be installed in /dev/hda wether windows was on /dev/hda5.

And another reason against installing grub on /dev/hda: Windows is installed on the first partition so the bootloader is in the first 512 KB anyway.

Starting Linux from Windows' Bootloader definitely is an option but then I have to install the bootloader onto another partition and why not /dev/hdb? This seems to be the most common in this case. You see, I have to fix it anyway. :

scarecrow: Yep, I could. But I don't want to because on /dev/hdb there's an ext3 partition containing about 120 GB of my personal stuff + backups of my priorlinux system.

I guess the easiest way would be to fix grub on /dev/hdb. But I have no suggestion how to do this.

But thanks for your answers! (=


Hail to the thief!

Offline

#7 2007-01-14 23:18:22

rayjgu3
Member
From: Chicago IL usa
Registered: 2004-07-04
Posts: 695

Re: GRUB GRUB GRUB

grub-install /dev/hdb
or
grub-install /dev/ 'hd1"
will install grub on the drive located
(primary) (ide0) slave
if you have a floppy drive you could install grub on it
grub-install 'fd0'


now for your setup

/dev/hda1 32 MB /boot   =  diagnostic tools primary partition
/dev/hda2 Strange partition windows
            creates that seems to contain hda5  = extended partition
/dev/hda3 1 GB swap  =  primary partition
/dev/hda4 40 GB /   = primary partition
/dev/hda5 ~30 GB Windows = primary partition

 

extended partitions in linux start at hd#5 on ide drives scsi , sata ,& usb =sd#5
hope this clears things for you a bit

Offline

#8 2007-01-15 07:43:41

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: GRUB GRUB GRUB

Why not chroot into Arch64 from cd & install grub to mbr hda then add windows ?

maybe I have read post wrong [again!]

Get arch booting first .... ;-)


Mr Green

Offline

#9 2007-01-15 11:56:48

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: GRUB GRUB GRUB

Mr Green wrote:

Why not chroot into Arch64 from cd & install grub to mbr hda then add windows ?

Because then the windows bootloader is overwritten and windows not able to boot as far as I know. I don't want to reinstall the 4th time just for trying this. (I think I tried it and it failed but I am not quite sure.) I'd fix the bootloader but even with this I wasn't able to restore it. Don't know why. :


Hail to the thief!

Offline

#10 2007-01-15 12:54:05

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: GRUB GRUB GRUB

Errr you can boot windows from grub .... anyway your call just trying to help ...


Mr Green

Offline

#11 2007-01-15 13:32:38

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: GRUB GRUB GRUB

Sorry if I was rude. I am really thankful and appreciate all of your work. (:

As I was reading the manual anyway, here some extracts:

GRUB can currently boot GNU Mach, Linux, FreeBSD, NetBSD, and OpenBSD directly [...]

3.2 Installing GRUB natively

If you want to boot an unsupported operating system (e.g. Windows 95), chain-load a boot loader for the operating system. Normally, the boot loader is embedded in the boot sector of the partition on which the operating system is installed.

4.1.2 Load another boot loader to boot unsupported operating systems

As far as I can see it says that Windows cannot be booted directly by grub.

Concerning my problem: I don't know how it is working now but this is how I solved it:
My hdd setup:
80 GB with Windows and Linux on it is Master (linux on hda3)
120 GB is Slave

I chrooted into my linux with the voodoo install cd and ran grub:

# grub
> root (hd0,2)
> setup (hd1)

It installed successfully but I get the same error mentioned in my first post.

Then I switched the jumper settings that 80 GB with Windows / Linux is Slave.
120 GB is Master (where I want to install grub).
Then the same procedure again:

# grub
> root (hd1,2)
> setup (hd0)

Installation process tuned out fine and now I am able to boot from my 120 GB drive.
I don't know why. If I remember correctly, Windows' bootloader works, too. But I'll check this later to be sure.


Hail to the thief!

Offline

#12 2007-01-15 14:09:15

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: GRUB GRUB GRUB

well I do not use grub far to complicated for me ...

I have windows xp & linux dual booting under grub on my laptop no problems

At the very least you should be able to get grub to boot windows ... [via chain loader]

xp when it installs will wipes over mbr  so reinstalling a boot loader is normal

are you trying to boot linux on hdb ? I thought you had it on hda?

unless bios is set to boot hdb first then it should be installed on hda

confused I know I am...  :?

Find it much easier to sort these problems out if I am sitting there inc front of your machine lol


Mr Green

Offline

#13 2007-01-15 14:19:56

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: GRUB GRUB GRUB

Yeah, I admit it's confusing.

Both Windows and Linux are on /dev/hda. But for some tries of solving the problem I switched the jumper (Don't know how to express it in English better) that hda becomes hdb and hdb becomes hda. Maybe I installed grub on the actual hda which won't be good because then as far as I can see (and noticed) I cannot boot Windows anymore. As I said, I'll check that later. (:


Hail to the thief!

Offline

Board footer

Powered by FluxBB