LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   configure grub to dual boot - not working. (https://www.linuxquestions.org/questions/linux-general-1/configure-grub-to-dual-boot-not-working-183535/)

John5788 05-19-2004 09:44 PM

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?

kevinalm 05-19-2004 11:48 PM

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.:confused: 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.

John5788 05-20-2004 12:45 AM

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


John5788 05-20-2004 12:55 AM

ok tried ur idea and i got this error:
Code:

Error 13: Invalid or unsupported executable format

kevinalm 05-20-2004 01:04 AM

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.

John5788 05-20-2004 01:24 AM

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.

kevinalm 05-20-2004 08:43 AM

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)

Rellion 04-12-2005 12:55 PM

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)

TruckStuff 04-12-2005 01:23 PM

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



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