Add Windows to Grub

Hi,
I have a dual boot configuration on my pc, with Windows Vista 64 bit and OpenSuse 11.1.
After installing a new hard drive, I used Paragon Backup to restore my system. When the restore was complete, I got a message that my Linux Boot Manager needed to be restored, and when I re-booted, I got a grub error 17.
I then inserted the Suse CD and did a restore. This appeared to correct the problem, but when I re-booted, I noticed that the grub menu list did not contain an entry for Windows.
When I edited /boot/grub/menu.lst, I saw –

Modified by YaST2. Last modification on Thu Jun 9 10:08:22 EDT 2011

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

###Don’t change this comment - YaST2 identifier: Original name: linux###
title SUSE LINUX
root (hd0,7)
kernel /boot/vmlinuz root=/dev/disk/by-id/ata-ST31000528AS_9VP771VT-part8 repair=1 resume=/dev/disk/by-id/ata-ST31000528AS_9VP771VT-part7 splash=silent showopts vga=0x31a
initrd /boot/initrd

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – SUSE LINUX
root (hd0,7)
kernel /boot/vmlinuz root=/dev/disk/by-id/ata-ST31000528AS_9VP771VT-part8 showopts ide=nodma apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x31a
initrd /boot/initrd

I think, at this point, that all I need to do is add Windows to menu.lst, but I’m not having much luck doing it.
Fdisk -l shows –

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0fff07e1

Device Boot Start End Blocks Id System
/dev/sda1 8 1966 15728640 7 HPFS/NTFS
/dev/sda2 1967 41162 314841870 7 HPFS/NTFS
/dev/sda3 * 41163 70294 234002790 f W95 Ext’d (LBA)
/dev/sda5 41163 54171 104494761 7 HPFS/NTFS
/dev/sda6 54172 60477 50652913+ 7 HPFS/NTFS
/dev/sda7 60478 60739 2104483+ 82 Linux swap / Solaris
/dev/sda8 60740 61841 8851783+ 83 Linux
/dev/sda9 61842 70294 67898691 83 Linux

Disk /dev/sdb: 1500.2 GB, 1500299395072 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000fda12

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 182402 1465136096 7 HPFS/NTFS

This tells me, I think, that my Windows operating system is in the second partition of hd0.

I found a sample entry –

title WIN XP/Vista/7
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
chainloader (hd1,0)+1

To begin with, I’m confused about whether I need the map statements since my OS is not in the first partition.
And, if I code

rootnoverify (hd0,1)
chainloaded (hd0,0)+1

the entry for Windows appears on the menu, but if I select it, I get a message that says that the Boot Manager is missing.

Any help would be greatly appreciated,
Thanks,
s660117

rootnoverify (hd0,1)
chainloaded (hd0,0)+1

the entry for Windows appears on the menu, but if I select it, I get a message that says that the Boot Manager is missing.

If that’s not working you may need to fix the windows boot sector code
If you don’t have a proper windows DVD
Windows Vista Recovery Disc Download — The NeoSmart Files

Once you repair windows
then reinstall grub like this
Re-Install Grub Quickly with Parted Magic

I will still try this though first

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

Thanks for the reply.
Before I fix the windows boot sector code, I’d like to verify that my entry is coded correctly.

Just try different entries until you find the right one. It’s not going to break anything. (well if you boot into a Windows recovery system, do not repair anything!).

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

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

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

If none of these works, try to add the map command.


map (hd0) (hd1)
map (hd1) (hd0)

Again, thanks for the replies.
It turns out that I was misled by the sample code that I stumbled on. Instead of coding “chainloader (hd1,0)+1”, I needed to code “chainloader +1”. Once I corrected the error, the menu entry brought me into Windows.
Joe