Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub dual boot [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
Birnenpfluecker
Guru
Guru


Joined: 01 Sep 2003
Posts: 315
Location: Lage, Germany

PostPosted: Mon Mar 15, 2004 5:27 pm    Post subject: grub dual boot [solved] Reply with quote

Hi everyone, cannot get grub to dual boot.
Gentoo starts perfectly, but when trying windows I get
Filesystem type unknown 0x7 or
Invalid or unsupported executable file format
this depends which config I try, got a third error also, but don't remember with which config it was and cannot recreate it and forgot the messagge.
Here is my what my grub.conf looks atm:
Quote:

default 0
timeout 10
splashimage=(hd0,0)/grub/splash.xpm.gz

title=Linux 2.6.3 test
root (hd0,0)
kernel (hd0,0)/bzImage root=/dev/sdb3 vga=794

title=Windows
title=WinXP
map (hd0) (hd1)
map (hd1) (hd0)
root (hd0,0)
rootnoverify (hd0,0)
makeactive
chainloader +1


Have also tried many other configs (guess I have read most threads about dual boot with WinXp in this forum).
For info, both hd's are 80 gig SATA drives, Gentoo is on sdb1-3, win on sda. Grub refers to the gentoo drive as hd0 (have the bios to start from the second hd so I can use grub) cause I get three partitions with tab and win is on hd1. I know also that the win installation is ok, can boot in it when I tell the bios to boot from first hd. I use an asus k8v mainboard, and the hds are connected to the viasata connector.
Could it be an amd64 specific proiblem.


Last edited by Birnenpfluecker on Tue Mar 16, 2004 1:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
Getrb
n00b
n00b


Joined: 20 Jun 2003
Posts: 30
Location: Europe -> Sweden -> Lidköping

PostPosted: Mon Mar 15, 2004 5:54 pm    Post subject: Reply with quote

Your dual entrys doesent look good...
Also... have you installed dual OS on the same partition?? (Nope!)

An sample of how it could look:

#For booting Windows NT or Windows95
title Windows NT / Windows 95 boot menu
rootnoverify (hd0,1)
makeactive
chainloader +1
# For loading DOS if Windows NT is installed
# chainload /bootsect.dos

Edit: an hash in place :oops:
_________________
WANTED: a Linux-based webshop, *secure *good layout *output for the books and more! Ideas? :-)
Back to top
View user's profile Send private message
Birnenpfluecker
Guru
Guru


Joined: 01 Sep 2003
Posts: 315
Location: Lage, Germany

PostPosted: Mon Mar 15, 2004 6:30 pm    Post subject: Reply with quote

with that config I get :
Error 13: Invalid or unsupported executable file format
Wen I use auto complete of grub, hd0,1 is x82 patition that would be my linuix swap.

And for not installed win and linux on same partition, I think that the map command change hd1 and hd0, so I can have in both entries a hd0.
Back to top
View user's profile Send private message
Getrb
n00b
n00b


Joined: 20 Jun 2003
Posts: 30
Location: Europe -> Sweden -> Lidköping

PostPosted: Mon Mar 15, 2004 7:09 pm    Post subject: Reply with quote

Okej on what drive / partition is your Windows located?

Here is how id do this anyhow.

Quote:

# Boot automatically after 20 secs.
timeout 20

# By default, boot the first entry.
default 0

# Fallback to the second entry.
fallback 1

splashimage=(hd0,0)/grub/splash.xpm.gz

title=Linux 2.6.3 test
root (hd0,0)
kernel (hd0,0)/bzImage root=/dev/sdb3 vga=794

#This one stating that your XP is on /dev/hdb1
# For booting Windows NT or Windows95
title Windoze XP personal / professional
rootnoverify (hd1,0)
makeactive
chainloader +1
# For loading DOS if Windows NT is installed
# chainload /bootsect.dos

# This one stating that your XP is on /dev/hda5
# For booting Windows NT or Windows95
title XP personal / professional
rootnoverify (hd0,4)
makeactive
chainloader +1
# For loading DOS if Windows NT is installed
# chainload /bootsect.dos

Just hash out or delete the part you dont want or change to whatever drive / partition uve got XP on.

Hope this helps now =)
_________________
WANTED: a Linux-based webshop, *secure *good layout *output for the books and more! Ideas? :-)
Back to top
View user's profile Send private message
Birnenpfluecker
Guru
Guru


Joined: 01 Sep 2003
Posts: 315
Location: Lage, Germany

PostPosted: Mon Mar 15, 2004 7:52 pm    Post subject: Reply with quote

tested that configuration, with changing nothing, cause win is on hd1,0.
I get no error message, but my pc speker goes crazy. many short beeps without ending.

To be clearly here my hd's
/boot sdb1
/swap sdb2
/root sdb3
win is on sda

But Grub refers to the gentoo drive as hd0, cause i start gentoo with root (hd0,0)
Back to top
View user's profile Send private message
Getrb
n00b
n00b


Joined: 20 Jun 2003
Posts: 30
Location: Europe -> Sweden -> Lidköping

PostPosted: Mon Mar 15, 2004 8:44 pm    Post subject: Reply with quote

My guess is something has happened to your sda mbr.

If you turn off booting sdb in BIOS and run an sda boot only what happens then??

To solve it in case that works: Run something like grub-install /dev/sda

Dont work: try a rescue from the XP-install cdrom (Cant quite remember the exact commands but there you got some goodies to write a new startsector mbr and repair if needed.

Probably you can find a howto on this issue on the 32bit forum part.
Google is a friend :-)
Or you can go for some of the wiki's...
In Swedish id recommend http://bbs.linux.se

To get things right though id switch those disks master / slave order!!! Your boot-partition is in best place at the master-drive.

This way no hassels for you about the names of the drives in grub.
_________________
WANTED: a Linux-based webshop, *secure *good layout *output for the books and more! Ideas? :-)
Back to top
View user's profile Send private message
Birnenpfluecker
Guru
Guru


Joined: 01 Sep 2003
Posts: 315
Location: Lage, Germany

PostPosted: Mon Mar 15, 2004 9:29 pm    Post subject: Reply with quote

if I turn linux in bios off, windows starts without a problem, but what for hal I use grub-install ons sda? that is my woindows installation...
Back to top
View user's profile Send private message
Getrb
n00b
n00b


Joined: 20 Jun 2003
Posts: 30
Location: Europe -> Sweden -> Lidköping

PostPosted: Mon Mar 15, 2004 9:54 pm    Post subject: Reply with quote

Well uve got sata disks so a mere shifting the cabels if u got the disks set to "cabel select" or just rejumpering master / slave.

This way (hd0,0) is /boot
(hd0,2) is /


And your Win is (hd1,0)

This has got to work.

Otherwise the table is:
Win (hd0,0)

/boot (hd1,0)
/ (hd1,2)

As you get win working correctly doing only sda.
You'll probably get it right booting only sdb on reverse order in grub.conf

Birnenpfluecker wrote:
but what for hal I use grub-install ons sda?
hal??? (I aint nativ English ;-) )
_________________
WANTED: a Linux-based webshop, *secure *good layout *output for the books and more! Ideas? :-)
Back to top
View user's profile Send private message
Birnenpfluecker
Guru
Guru


Joined: 01 Sep 2003
Posts: 315
Location: Lage, Germany

PostPosted: Tue Mar 16, 2004 12:26 am    Post subject: Reply with quote

have changed the cable, but nothing new.

Haven't you read my previos post correct?
grub refers to sdb as hd0 and sda as hd1,
if I change the cables that changes nothing. I guess this is because grub seems to refer to the drive on which it is installed as hd0 (corrct me if I'm wrong).
And for the rejumpering, that doesn't work with SATA discs, cause one disc per cable and no jumpers on the discs :wink:
Back to top
View user's profile Send private message
lun_IX
n00b
n00b


Joined: 06 Mar 2004
Posts: 61
Location: Hamburg, Germany

PostPosted: Tue Mar 16, 2004 7:05 am    Post subject: Reply with quote

@Birnenpfluecker:

you'll have no problems, installing Grub on the MBR of your Windows HDD! It's same here:

hda1 - /boot
hda2 - /
hda3 - Windows XP
hda4 - /NTFS some windows stuff

hdb1 - /swap
hdb2 - /NTFS some windows stuff
...

Grub ist in MBR of hda and no problems booting windows or linux, haven't got my grub.conf at hand because i'm at work, but i guess it looks like that:

Code:

# Which listing to boot as default. 0 is the first, 1 the second etc.
default 0
# How many seconds to wait before the default listing is booted.
timeout 10
# Nice, fat splash-image to spice things up :)
splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux 2.6.3
# Partition where the kernel image (or operating system) is located
root (hd0,0)
kernel /kernel-2.6.3 root=/dev/hda2

# The next three lines are only if you dualboot with a Windows system.
# In this case, Windows is hosted on /dev/hda3.
title=Windows XP
root (hd0,2)
chainloader +1


Hope, that helps a little... :D
_________________
If Linux doesn't have the solution, you have the wrong problem!

System: Athlon XP 2400+ | Epox 8K3A | 1024MB Infineon + Corsair | 80GB Seagate (IDE) | GeForce 4Ti 4200 | Gentoo-2.6.9 | Xorg
Back to top
View user's profile Send private message
Birnenpfluecker
Guru
Guru


Joined: 01 Sep 2003
Posts: 315
Location: Lage, Germany

PostPosted: Tue Mar 16, 2004 10:59 am    Post subject: Reply with quote

You have grub on an extra partition of your win hd, but on my win hd I have only the win partition. Don't want to destroy it. Is there a way to create the /boot partition on then win hd without destroying win?
Back to top
View user's profile Send private message
lun_IX
n00b
n00b


Joined: 06 Mar 2004
Posts: 61
Location: Hamburg, Germany

PostPosted: Tue Mar 16, 2004 12:11 pm    Post subject: Reply with quote

moving it or resizing it with Partition Magic under Windows ...

just resize it to a size 50meg smaller than before an then move it these 50meg backwards to the end of the HDD.
After that you should have 50meg unpartitioned HDD Space on your drive.

make a linux partition with fdisk and then mke2fs /dev/hda1 mount it as /boot and everything should work...



but by the way, i don't think you gonna need that, because grub will install itself not on the partition but in the Master Boot Record (mbr) of the chosen disc! you might even have the /boot directory on your / Partition of Linux, it has not to be an extra partition!

Might it be, you have /boot at hdb1 an the Win Partition on /hda1 - then it is no problem to mount /dev/hdb1 to /boot, install grub there! in grub tell him
Code:

grub> root (hd1,0)          (/boot partition on hdb1)
grub> setup (hd0)           (Install GRUB in the MBR of hda)
grub> quit                  (Exit the GRUB shell)


this won't actually crush your windows installation!

then your grub.conf has to be something like that:
Code:

default 0

timeout 10

splashimage=(hd1,0)/grub/splash.xpm.gz

title=Gentoo Linux 2.6.3
root (hd1,0)
kernel /kernel-2.6.3 root=/dev/hdb2     #supposed your linux root ist on the 2nd part of disk 2

title=Windows XP
root (hd0,0)         #thats the first part of disk 1
chainloader +1


if you have any further questions, do not hesitate to ask... :) perhaps via PN in german? ;)
_________________
If Linux doesn't have the solution, you have the wrong problem!

System: Athlon XP 2400+ | Epox 8K3A | 1024MB Infineon + Corsair | 80GB Seagate (IDE) | GeForce 4Ti 4200 | Gentoo-2.6.9 | Xorg
Back to top
View user's profile Send private message
Birnenpfluecker
Guru
Guru


Joined: 01 Sep 2003
Posts: 315
Location: Lage, Germany

PostPosted: Tue Mar 16, 2004 1:54 pm    Post subject: Reply with quote

thx lun_IX
worked like a charm.
Back to top
View user's profile Send private message
lun_IX
n00b
n00b


Joined: 06 Mar 2004
Posts: 61
Location: Hamburg, Germany

PostPosted: Tue Mar 16, 2004 1:57 pm    Post subject: Reply with quote

glad i could help! :)
_________________
If Linux doesn't have the solution, you have the wrong problem!

System: Athlon XP 2400+ | Epox 8K3A | 1024MB Infineon + Corsair | 80GB Seagate (IDE) | GeForce 4Ti 4200 | Gentoo-2.6.9 | Xorg
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum