Booting a newly installed WinXP with grub?

Hi,

I recently installed Win XP on my notebook originally running on openSUSE 11.0. I created a 10 GB space at the end of /dev/sda and installed XP on it, which at the end started with no problem (but not linux). Then, using the installation DVD I booted to openSUSE and reinstalled grub in the MBR including windows in it. Now if I start up my machine the selection list comes up with no problem, openSUSE boots nicely, but if I choose windows from the boot menu it just doesn’t boot, it just brings back the selection menu with no error message. Reading this link GRUB Boot Multiboot openSUSE Windows (2000, XP, Vista) using the Grub bootloader. I learned, that my problem may be that windows is not installed on the first partition. Is that a way to get around this and make both of my OSs working?

my partitions according to fdisk -l are:

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 13278 83578162+ 83 Linux
/dev/sda4 13279 14593 10562737+ c W95 FAT32 (LBA)

and here is my menu.lst:

Modified by YaST2. Last modification on Tue Jan 20 20:42:02 CET 2009

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

###Don’t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0 - 2.6.25.20-0.1
root (hd0,1)
kernel /boot/vmlinuz-2.6.25.20-0.1-default root=/dev/disk/by-id/scsi-SATA_WDC_WD1200BEVS-_WD-WXEX06210268-part2 resume=/dev/sda1 splash=silent showopts
initrd /boot/initrd-2.6.25.20-0.1-default

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – openSUSE 11.0 - 2.6.25.20-0.1
root (hd0,1)
kernel /boot/vmlinuz-2.6.25.20-0.1-default root=/dev/disk/by-id/scsi-SATA_WDC_WD1200BEVS-_WD-WXEX06210268-part2 showopts ide=nodma apm=off acpi=off noresume edd=off x11failsafe
initrd /boot/initrd-2.6.25.20-0.1-default

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

Any help would be highly appreciated!

Did you try,
YaST Control Center > System > Boot loader
and then clicking “Other” “Propose new configuration” ?

That is exactly what I did to reinstall grub after the windows installation deactivated it.

In the menu.lst try
title Windows
rootnoverify (hd0,3)
makeactive
chainloader +1

Thanks, I tried but it did not work. Or do I have to reinstall grub each time after editing menu.lst?

You don’t have to reinstall grub when you edit menu.lst. How about trying

title windows
rootnoverify (hd0,3)
chainloader (hd0,3)+1

Also, your second partition is marked bootable. While linux does not care which one is marked, windows might. Login as root and type
sfdisk /dev/sda -A4
followed by
sfdisk /dev/sda -l
The windows partition should now be marked. This won’t affect linux but might help windows.

If it still does not work with same problem do the below.

from post by “mingus725”

I am going to give you several commands. These need need to be done as root in a terminal window. The dd command will copy the sectors, the xxd command will do a hex dump of the copy.

I must emphasize that the dd command must be done precisely. If you make a typo mistake, you could destroy something permanently. (Also note the dash/minus sign after the su; that will put you and the files in the /root subdirectory.)

dd if=/dev/sda4 of=sda4pbr bs=512 count=1
xxd sda4pbr

You could boot XP before installing GRUB ?
If yes- what I want to find out with the above code and post if perhaps grub stage1 was also install on sda4.

First of all, thanks for all the help again!

The modification of menu.lst suggested by plasmonics did no dot work.
The commands gave the following output:

dd if=/dev/sda4 of=sda4pbr bs=512 count=1

1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.000152534 s, 3.4 MB/s

xxd sda4pbr

0000000: eb48 904d 5344 4f53 352e 3000 0210 2400 .H.MSDOS5.0…$.
0000010: 0200 0000 00f8 0000 3f00 ff00 5ede b60c …?..^…
0000020: 6359 4201 4228 0000 0000 0000 0200 0000 cYB.B(…
0000030: 0100 0600 0000 0000 0000 0000 0000 0302 …
0000040: ff00 0080 364a 5000 0008 fa90 90f6 c280 …6JP…
0000050: 7502 b280 ea59 7c00 0031 c08e d88e d0bc u…Y|…1…
0000060: 0020 fba0 407c 3cff 7402 88c2 52be 817d . …@|<.t…R…}
0000070: e836 01f6 c280 7456 b441 bbaa 55cd 135a .6…tV.A…U…Z
0000080: 5272 4b81 fb55 aa75 45a0 417c 84c0 783e RrK…U.uE.A|…x>
0000090: 7505 83e1 0174 3766 8b4c 10be 057c c644 u…t7f.L…|.D
00000a0: ff01 668b 1e44 7cc7 0410 00c7 4402 0100 …f…D|…D…
00000b0: 6689 5c08 c744 0600 7066 31c0 8944 0466 f…D…pf1…D.f
00000c0: 8944 0cb4 42cd 1372 05bb 0070 eb7d b408 .D…B…r…p.}…
00000d0: cd13 730a f6c2 800f 84e8 00e9 8d00 be05 …s…
00000e0: 7cc6 44ff 0066 31c0 88f0 4066 8944 0431 |.D…f1…@f.D.1
00000f0: d288 cac1 e202 88e8 88f4 4089 4408 31c0 …@.D.1.
0000100: 88d0 c0e8 0266 8904 66a1 447c 6631 d266 …f…f.D|f1.f
0000110: f734 8854 0a66 31d2 66f7 7404 8854 0b89 .4.T.f1.f.t…T…
0000120: 440c 3b44 087d 3c8a 540d c0e2 068a 4c0a D.;D.}<.T…L.
0000130: fec1 08d1 8a6c 0c5a 8a74 0bbb 0070 8ec3 …l.Z.t…p…
0000140: 31db b801 02cd 1372 2a8c c38e 0648 7c60 1…r*…H|`
0000150: 1eb9 0001 8edb 31f6 31ff fcf3 a51f 61ff …1.1…a.
0000160: 2642 7cbe 877d e840 00eb 0ebe 8c7d e838 &B|…}.@…}.8
0000170: 00eb 06be 967d e830 00be 9b7d e82a 00eb …}.0…}.*…
0000180: fe47 5255 4220 0047 656f 6d00 4861 7264 .GRUB .Geom.Hard
0000190: 2044 6973 6b00 5265 6164 0020 4572 726f Disk.Read. Erro
00001a0: 7200 bb01 00b4 0ecd 10ac 3c00 75f4 c300 r…<.u…
00001b0: 0000 0000 0000 0000 4c44 52ff 0d0a 4c65 …LDR…Le
00001c0: 6d65 7a68 6962 61ff 0d0a 4e79 6f6d 6a6f mezhiba…Nyomjo
00001d0: 6e20 6c65 2065 6779 2067 6f6d 626f 7420 n le egy gombot
00001e0: 617a 20a3 6a72 6169 6e64 a174 a073 686f az .jraind.t.sho
00001f0: 7a0d 0a00 0000 0000 00ac bcc8 0000 55aa z…U.

Also, I backed up my home directory and settings, so I would start from scratch by installing windows on /dev/sda1 and linux on the rest if I’d be sure that it would work.

0000180: .GRUB .Geom.Hard
from the XP’s Volume Boot Record (VBR).

For what ever reason GURB stage 1 was install into the first sector (VBR)of the the XP partition. The VBR must contain the boot code for the OS’s that installed on the partition.

You need to boot into XP’s recovery console and run fixboot, that and the menu.lst modification should fix all your problems.

Having XP on hda4 will not be a problem.