LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-19-2004, 09:44 PM   #1
John5788
Member
 
Registered: Feb 2004
Location: 127.0.0.1
Distribution: Gentoo
Posts: 129

Rep: Reputation: 16
configure grub to dual boot - not working.


alright my grub is very awkward. this is my harddrive setup:

First IDE Channel:
Master - 80GB WindowsXP installation - /dev/hda1
Slave - 80GB Gentoo installation - /dev/hdb1 (/boot), /dev/hdb2 (swap), /dev/hdb3 (/)

my grub config looks like this:
Code:
# Which listing to boot at default. 0 is first, 1 the second etc.
default 0

# How many seconds to wait before booting the default listing
timeout 5

# Nice, fat splash-image to spice things up
splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux 2.6.5
root (hd0,0)
kernel /kernel-2.6.5 root=/dev/hdb3 video=vesafb:ywrap,mtrr vga=0x31A splash=silent
initrd=/boot/initrd-Emergance
this set is working 100%. what i dont understand are these parts:

Code:
splashimage=(hd0,0)/grub/splash.xpm.gz
root (hd0,0)
i thought at first it was supposed to be (hd1,0) instead of (hd0,0). gentoo does not boot at all with (hd0,0). why is grub assigning my harddrives like that?

so i thought ok whatever, if thats how my set up is, then i guess my windows xp drive must be (hd1,0). so i tried adding this to the end of my grub.conf
Code:
title=Windows XP Professional
rootnoverify (hd1,0)
chainloader +1
that doesnt work, it just sits there doing nothing. im currently dual booting by changing the boot order in BIOS and its really annoying. how would i get my XP to work in grub?
 
Old 05-19-2004, 11:48 PM   #2
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
Umm, this probably isn't what you want to hear, but I think you may have an 80mbyte /boot where your xp used to be. Something looks very wrong. You appear to be accessing the grub files (the splash img, the kernel, the stage files) on hda. Try fdisk -l in linux to display existing partions on all hd's.

Have you tried:
title=winxp
rootnoverify hd(0,0)
chainloader +1

That should work if xp isn't toast and the grub install went correctly.
 
Old 05-20-2004, 12:45 AM   #3
John5788
Member
 
Registered: Feb 2004
Location: 127.0.0.1
Distribution: Gentoo
Posts: 129

Original Poster
Rep: Reputation: 16
nah, my windows xp is fine. i can boot into it easily. i was using it for the entire day to do some work and gaming. ill try that on my next reboot.

Code:
bash-2.05b# fdisk -l

Disk /dev/hda: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1       10010    80405293+   7  HPFS/NTFS

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1          33      265041   83  Linux
/dev/hdb2              34         546     4120672+  82  Linux swap
/dev/hdb3             547        9729    73762447+  83  Linux
 
Old 05-20-2004, 12:55 AM   #4
John5788
Member
 
Registered: Feb 2004
Location: 127.0.0.1
Distribution: Gentoo
Posts: 129

Original Poster
Rep: Reputation: 16
ok tried ur idea and i got this error:
Code:
Error 13: Invalid or unsupported executable format
 
Old 05-20-2004, 01:04 AM   #5
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
Odd. The

root hd(n,m)

statement is supposed to set the partition where grub can find menu.lst, the stage files, and the like. The

rootnoverify hd(n,m)
chainloader +1

statement is different. It's more of a direct pointer to a saved copy of another os's boot sector.

Not sure what's going on. It's like grub's hd(n) assignments are changing but I've only seen that with pci udma cards that support drive swapping.

With xp I believe it's possibly to install grub to the boot partition and chainload it via xp's multiboot capability. That might be one solution but I haven't used xp so I can't help you there.

One other approach would be something like this:

grub
root hd(1,0)
setup hd(0)

That should put the grub binary in the mbr and set for menu.lst etc in hdb1. I avoid grub-install. It tends to mess up. With the grub shell you force it to install the way you want.
 
Old 05-20-2004, 01:24 AM   #6
John5788
Member
 
Registered: Feb 2004
Location: 127.0.0.1
Distribution: Gentoo
Posts: 129

Original Poster
Rep: Reputation: 16
IIRC i did

root hd(1,0)
setup hd(1)

when installing grub.. im pretty sure if i did

setup hd(0) it would overwrite my windowsxp MBR, and i dont really want to touch that even though a simple fdisk /mbr from a startup disk can fix it.
 
Old 05-20-2004, 08:43 AM   #7
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
Ok, I see now. You are using xp's boot menu to chainload the grub boot menu. IIRC, when you do that you can't use a section in menu.lst to load xp later. Or maybe you could.

rootnoverify hd(0,0)
chainloader +0

?

That should point back to xp's bootloader. (The MBR)
 
Old 04-12-2005, 12:55 PM   #8
Rellion
LQ Newbie
 
Registered: Apr 2005
Location: Netherlands
Posts: 1

Rep: Reputation: 0
Hey, this is my partition setup:

Code:
Disk /dev/hda: 120.0 GB, 120000000000 bytes
255 heads, 63 sectors/track, 14589 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1           4       32098+  de  Dell Utility
/dev/hda2   *           5        1834    14699475   83  Linux
/dev/hda3            1835       14589   102454537+   f  W95 Ext'd (LBA)
/dev/hda5            1835        1916      658602   82  Linux swap / Solaris
/dev/hda6            1917       14589   101795841   83  Linux

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               2        9729    78140160    f  W95 Ext'd (LBA)
/dev/hdb5               2        7817    62781988+   b  W95 FAT32
/dev/hdb6            7818        9729    15358108+   b  W95 FAT32
jos@JosLinux:~$
Now, if I'd add exactly this to menu.lst:

Windows XP Pro
rootnoverify hd(1,3)
chainloader +0

Would I be able to use GRUB to boot Win XP?
(hdb6 has the WinXP installation)

Last edited by Rellion; 04-12-2005 at 12:58 PM.
 
Old 04-12-2005, 01:23 PM   #9
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Rep: Reputation: 30
IIRC, Windows doesn't like to boot unless it finds the MBR on the first sector of the first drive. Your grub may be setup so that windows doesn't see things this way which makes it not boot. Try the following for WinXP
Code:
title Windows XP
   map (hd1) (hd0)
   map (hd0) (hd1)
   rootnoverify (hd0,0)
   makeactive  <-- may/may not be needed
   chainloader +1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora Core 3 Dual Boot, Dual Hard drives, Grub Boot Loader Denali03 Linux - Newbie 1 03-04-2005 01:44 PM
SuSE not working out for me. How to remove it and grub? (dual boot w/98) thejmfc Linux - Newbie 10 07-07-2004 12:26 PM
Configure grub (dual boot) with 2 OP installed already fere Linux - Newbie 2 06-07-2004 10:58 PM
grub/dual boot not working? pcdebb Fedora 6 12-03-2003 11:17 AM
how to configure grub for dual booting? zaldyd Linux - Newbie 1 05-22-2003 05:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration