dual boot question

I have XP on an IDE drive and Linux on a SATA drive.

I can mount the XP partitions fine and read and write to them.

I want to be able to boot either one drive or the other (I now use the BIOS and just activate the right disk) using bootloader.

I added XP to bootloader using chainlink, other /sdb1

The entry is in my boot menu for XP but when I select it I get a GRUB error 13. :\

When I then look at the Yast bootloader setup it has changed the /sdb1 that I selected to /sda1. It has done this three times now, I need help with this. :’(

Can someone please give me all the exact settings in the Yast bootloader setup for my situation? Here are some helpful command results…

simon@linux-62z0:~> cat /proc/partitions
major minor #blocks name

8 0 245117376 sda
8 1 2104483 sda1
8 2 20972857 sda2
8 3 222034365 sda3
8 16 244198584 sdb
8 17 102398278 sdb1
8 18 1 sdb2
8 21 141789658 sdb5

linux-62z0:/home/simon # df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sda2 ext3 20641788 3458800 16134348 18% /
udev tmpfs 1004980 156 1004824 1% /dev
/dev/sda3 ext3 218550600 129397020 78051864 63% /home
/dev/sdb1 fuseblk 102398276 41401896 60996380 41% /home/simon/win_c
/dev/sdb5 fuseblk 141789656 109081688 32707968 77% /home/simon/win_f

Thanks,
Simon

In /boot/grub, you have a device.map. You need to be in root to look at it.

That has the disk order that the Grub bootloader expects to see the disks in; any other order & it throws errors.

Post your menu.lst & device.map and some one will try to help.

RE: /dev/sdb1 /home/simon/win_c

Windows (winxp not Vista) expects to be on the 1st partition of the 1st disk.
You will probably have to map the disks in menu.lst
Add this to your winxp section:
“map (hd0) (hd1)
map (hd1) (hd0)” adjusted for your setup.
Search the forum there should be lots of examples; use “swerdna” as the member name
Here’s one:
###Don’t change this comment - YaST2 identifier: Original name: windows 1###
title windows 1
map (hd2) (hd1)
map (hd1) (hd2)
rootnoverify (hd2,0)
chainloader (hd2,0)+1
from
openSUSE Forums - Search Results
hope that helps:)

Thanks, although I don’t understand some of that.

Here is device.map

linux-62z0:/boot/grub # cat device.map
(fd0) /dev/fd0
(hd0) /dev/sda

Funny that I don’t see /sdb there when it shows up elsewhere and my mount points work fine on it.

And here is my menu.lst

Modified by YaST2. Last modification on Sun Sep 7 18:15:30 EDT 2008

default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,1)/boot/message
##YaST - activate

###Don’t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0 - 2.6.25.11-0.1
root (hd0,1)
kernel /boot/vmlinuz-2.6.25.11-0.1-pae root=/dev/disk/by-id/scsi-SATA_Maxtor_6L250R0_L59NHZRG-part2 resume=/dev/sda1 splash=silent showopts vga=0x31a
initrd /boot/initrd-2.6.25.11-0.1-pae

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – openSUSE 11.0 - 2.6.25.11-0.1
root (hd0,1)
kernel /boot/vmlinuz-2.6.25.11-0.1-pae root=/dev/disk/by-id/scsi-SATA_Maxtor_6L250R0_L59NHZRG-part2 showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off x11failsafe vga=0x31a
initrd /boot/initrd-2.6.25.11-0.1-pae

###Don’t change this comment - YaST2 identifier: Original name: floppy###
title Floppy
rootnoverify (hd0,1)
chainloader (fd0)+1

title XP
rootnoverify (hd0,1)
chainloader (hd0,0)+1

I can edit these directly without using Yast?

Thanks,
Simon

During the boot process, the BIOS feeds the bootloader who’s job it is to get the kernel started (only then does mount take place). Devices @ boot and fstab mount are different critters.

You are swapping disks in bios to boot (as that is most likely how you installed and most likely did not have sdb on line). Ergo, the device.map:
(fd0) /dev/fd0
(hd0) /dev/sda
does not show /sdb

Set the boot order in bios for:
disk 1 = /dev/sda
disk 2 = /dev/sdb
disk 2 = /dev/sdc
etc

now make the device.map in SuSE (in root with an editor)
(fd0) /dev/fd0
(hd0) /dev/sda
(hd1) /dev/sdb
(where winxp is on /sda as it expects to be on the 1st partition of the 1st disk; otherwise disk mapping)

change
title openSUSE 11.0 - 2.6.25.11-0.1
root (hd0,1)
kernel /boot/vmlinuz-2.6.25.11-0.1-pae root=/dev/disk/by-id/scsi-SATA_Maxtor_6L250R0_L59NHZRG-part2 resume=/dev/sda1 splash=silent showopts vga=0x31a
initrd /boot/initrd-2.6.25.11-0.1-pae

to
title openSUSE 11.0 - 2.6.25.11-0.1
root (hd1,1)
kernel /boot/vmlinuz-2.6.25.11-0.1-pae root=/dev/disk/by-id/scsi-SATA_Maxtor_6L250R0_L59NHZRG-part2 resume=/dev/sda1 splash=silent showopts vga=0x31a
initrd /boot/initrd-2.6.25.11-0.1-pae

and it should work.

Set the disk order in BIOS and leave it alone or we will never get it matched. Grub can handle 8 OSes like that & it gets messy with more than 2 – been there, done that.