Grub does not boot VISTA and XP

Hello Everyone,

I noted a lot of similar threads to mine and read a lot of them but still can’t figure out the solution to my problem as it is never an exact match. So I am asking for help.


Status Quo:

Got a machine with three harddrives:

sda = hd1 = 120GB IDE Drive → Suse 11.0 installed
sdb = hd0 = 320GB SATA Drive → first XP (25GB), then Vista (50GB) installed*, 245 GB yet unallocated
sdc = hd2 = 320GB SATA Drive → all unallocated yet

*note that the last state before installing Suse 11.0 was that XP couldn’t be booted as VISTA overrode it’s boot settings because VISTA was installed last. So my primary goal is to get vista running and then see if I boot XP via VISTA bootloader or directly via GRUB

Grub is installed in the MBR of hd1.**

** In the BIOS, hd1 is the first Drive, hd0 the second and hd2 the third.

Problem description:

Grub is loading fine with the splash screen giving me several options (including Suse 11, windows1 and windows 2). Suse is booting fine, both windows aren’t. The error messages are the same as the entries in the menu.lst -->(rootnoverify (hd1,1) and chainloader (hd0,0) +1 as well as chainloader (hd0,1) +1)


I have these questions:

1.) Does rootnoverify (hd1,1) say: Don’t try to boot from partition 1 on hd1?
2.) Does chainloader (hd0,1) say: Try booting from hd0, partition 2 instead? Or is it partition 1? I keep reading that you start counting from 0 (zero) but that seems to be true for harddrives only
3.) I have seen different ways of writing the chainloader
a.) chainloader (hd0,1) +1
b.) chainloader +1 → What’s the difference and which is correct. I get errors when using b.)
4.) Is the fact that Grub is installed in the MBR of hd1 a problem? How else should I do it?
5.) How exactly does the mapping work?
6.) Is it true that mapping works for XP but not for VISTA?
7.) Where exactly do I have to put the mapping syntax if it is used? Before or after the rootnoverify string?
8.) How can I get the two Windows OS to boot with Grub?

My request: Could anyone give me step by step instructions on how to get grub to boot specifically my VISTA and XP. I am a Linux novice and don’t know my way around. I can find Grub in YAST and I can manually edit menu.lst. I played around with the settings in menu.lst but still couldn’t find the one right solution. So I reset the menu.lst as the best basis for my further actions.

Your help is much appreciated as I really want to understand this and get it to work.

Thanks


Below is the information that is frequently asked for from the expterts:

1.)fdisk -l
2.)cat /boot/grub/device.map
3.)cat /etc/fstab
4.)cat /boot/grub/menu.lst


linux-4uyq:~ # fdisk -l

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa0237545

Device Boot Start End Blocks Id System
/dev/sda1 1 262 2104483+ 82 Linux swap / Solaris
/dev/sda2 * 263 2873 20972857+ 83 Linux
/dev/sda3 2874 14593 94140900 83 Linux

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0000b2c5

Device Boot Start End Blocks Id System
/dev/sdb1 1 3187 25599546 7 HPFS/NTFS
/dev/sdb2 * 3188 9562 51200000 7 HPFS/NTFS

Disk /dev/sdc: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd04738d4

Device Boot Start End Blocks Id System


linux-4uyq:~ # cat /boot/grub/device.map

(fd0) /dev/fd0
(hd1) /dev/sda
(hd2) /dev/sdc
(hd0) /dev/sdb


linux-4uyq:~ # cat /etc/fstab

/dev/disk/by-id/scsi-SATA_WDC_WD1200JB-00WD-WMACM1858698-part1 swap swap defaults 0 0
/dev/disk/by-id/scsi-SATA_WDC_WD1200JB-00WD-WMACM1858698-part2 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/scsi-SATA_WDC_WD1200JB-00WD-WMACM1858698-part3 /home ext3 acl,user_xattr 1 2
/dev/disk/by-id/scsi-SATA_WDC_WD3200JD-22_WD-WCAMR2031422-part1 /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/scsi-SATA_WDC_WD3200JD-22_WD-WCAMR2031422-part2 /windows/D ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
proc /proc proc defaults 00
sysfs /sys sysfs noauto 00
debugfs /sys/kernel/debug debugfs noauto 00
usbfs /proc/bus/usb usbfs noauto 00
devpts /dev/pts devpts mode=0620,gid=5 00


linux-4uyq:~ # cat /boot/grub/menu.lst

Modified by YaST2. Last modification on Tue Dec 30 01:13:43 CET 2008

default 0
timeout 8
gfxmenu (hd1,1)/boot/message

###Don’t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0
root (hd1,1)
kernel /boot/vmlinuz-2.6.25.5-1.1-pae root=/dev/disk/by-id/scsi-SATA_WDC_WD1200JB-00WD-WMACM1858698-part2 resume=/dev/sda1 splash=silent showopts
initrd /boot/initrd-2.6.25.5-1.1-pae

###Don’t change this comment - YaST2 identifier: Original name: windows 1###
title windows 1
rootnoverify (hd1,1)
chainloader (hd0,0)+1

###Don’t change this comment - YaST2 identifier: Original name: windows 2###
title windows 2
rootnoverify (hd1,1)
chainloader (hd0,1)+1

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

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – openSUSE 11.0
root (hd1,1)
kernel /boot/vmlinuz-2.6.25.5-1.1-pae root=/dev/disk/by-id/scsi-SATA_WDC_WD1200JB-00WD-WMACM1858698-part2 showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off x11failsafe
initrd /boot/initrd-2.6.25.5-1.1-pae

###Don’t change this comment - YaST2 identifier: Original name: Kernel-2.6.25.5-1.1-pae###
title Kernel-2.6.25.5-1.1-pae
root (hd1,1)
kernel /boot/vmlinuz-2.6.25.5-1.1-pae root=/dev/disk/by-id/scsi-SATA_WDC_WD1200JB-00WD-WMACM1858698-part2 resume=/dev/sda1 splash=silent showopts
initrd /boot/initrd-2.6.25.5-1.1-pae

Since I am not getting any answers, I am wondering if I am expecting too much from Grub. Having a triple boot (XP, VISTA, LINUX) seemed doable but I guess there are better ways of doing this then my attempt. Any suggestions on this? All three are fresh installs. No jeopardy of loosing data so I am free to play around. Does it help to get rid of the IDE drive and replace it by a third SATA drive?

One thing that is bothering me is that I seem to be unable to change the order of the three harddrives in my BIOS and still be able to boot. Even before Installing the first OS, I was unable to make the only IDE-Drive number two. It needs to be number one and by this is the only bootable harddrive that works.

  1. That means boot off that but don’t check it’s a bootable Linux partition
  2. That says hd0, partition 2 I believe
  3. See below
  4. No problem, that’s how to do it.
  5. See below
  6. Not aware of any difference between XP and Vista as grub just says: BIOS, boot whaterver you find (that’s the chainloader command)
  7. To boot both windows you would need to configure windows bootloader. Grub will boot to this once configured correctly.

For grub there’s no difference between IDE and SATA drives.

I have two hard drives one Linux, one Windows. Use my setup below to see how the grub setup should look:

more /etc/fstab
/dev/mapper/pdc_cbegijeiii_part1 / ext3 acl,user_xattr
1 1
/dev/mapper/pdc_cbegijeiii_part4 /boot ext3 acl,user_xattr
1 2
/dev/mapper/pdc_cbegijeiii_part3 /home reiserfs defaults
1 2
/dev/mapper/pdc_cbegijeiii_part2 swap swap defaults
0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/disk/by-id/scsi-SATA_WDC_WD1600AAJS-_WD-WMAP93058762-part1 /windows/C
ntfs-3g defaults 0 0

more /boot/grub/device.map
(hd0) /dev/mapper/pdc_cbegijeiii
(hd1) /dev/sdb1

more /boot/grub/menu.lst
title Windows
title Windows XP Pro
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
makeactive
chainloader +1

Very likely the IDE drive had the boot files for Vista/XP. Boot into linux and check the XP drive/partition for NTLDR ,boot.ini and NTDETECT.com. You could check for the vista boot files but I do not know what they are.

When you installed VISTA it should have created a boot menu for XP.

Do you have a MS cd for XP and VISTA ? The needed files may need to me extracted from the cd’s.

Is sdb1 XP and sdb2 VISTA ?

Thanks rjwilmsi and LostFarmer for your quick replies. Here is what I got:

@ rjwilmsi: I already tried what you suggested with no success. Two considerations:

1.)Since I installed XP first, then VISTA, XP was not bootable anymore after the VISTA install. As far as I know, this is normal and needs some work on the VISTA bootloader. I have this setup on my other computer (VISTA/XP). So I wonder if XP is at all bootable via GRUB as I haven’t made it bootable from VISTA after I installed VISTA.

2.)I started suspecting that the VISTA bootloader is broken. I did a repair of the bootoptions via Installation disc and got an OK message. I expected that when booting up, VISTA instead of GRUB should come up directly but it didn’t. I now reinstalled vista and can be sure to have it bootable now.

I will try out what you said in a few days (will be gone over new years eve). Thanks so far. I will post the results after I return

@ LostFarmer

The IDE-Drive in question (120GB) couldn’t have had the boot files because it wasn’t attached to the machine when I installed XP and VISTA. But you are making a good point here. Before the IDE-Drive in question, there was another IDE-Drive (80GB) attached when I did the initial installations. For other reasons, after XP and Vista install, I exchanged the 80GB IDE for the 120GB IDE and possibly lost the boot files with it. I expected the bootfiles for XP/VISTA to be on sdb.

VISTA (Business, btw) didn’t bother to create a boot menu for XP

I have installation CDs for both and yes, XP is on sdb1 and vista on sdb2. I will follow your leads as well.

Thanks a lot so far. Will be a few days before I can report back.