Windows XP not dual-booting with OpenSUSE 11

Hi,

I am pretty much a n00b, and, having installed OpenSUSE 11, I can no longer access my Windows XP, in what seems to be the normal manner; whenever I try to boot Windows, it says

rootnoverify (hd 0,5)
chainloader (hd 0,0)

A disk read error occurred
Press ctrl+alt+del to restart

OpenSUSE is working fine, though.

My fdisk -l reads as follows:


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

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       10787    86638545    7  HPFS/NTFS
/dev/sda2   *       13667       14593     7439040    c  W95 FAT32 (LBA)
Partition 2 does not end on cylinder boundary.
/dev/sda3           10787       13667    23140183+   f  W95 Ext'd (LBA)
/dev/sda5           10787       11048     2104452   82  Linux swap / Solaris
/dev/sda6           11049       12140     8771458+  83  Linux
/dev/sda7           12141       13666    12257563+  83  Linux

Partition table entries are not in disk order

Windows XP is on the second partition

my menu.lst reads as follows:

# Modified by YaST2. Last modification on Wed Oct 15 21:35:06 CDT 2008
default 0
timeout 8
gfxmenu (hd0,5)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0
    root (hd0,5)
    kernel /boot/vmlinuz-2.6.25.5-1.1-default root=/dev/disk/by-id/scsi-SATA_ST3120213AS_5LS4KTJP-part6 resume=/dev/sda5 splash=silent showopts vga=0x31a
    initrd /boot/initrd-2.6.25.5-1.1-default

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

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

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.0
    root (hd0,5)
    kernel /boot/vmlinuz-2.6.25.5-1.1-default root=/dev/disk/by-id/scsi-SATA_ST3120213AS_5LS4KTJP-part6 showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off  x11failsafe vga=0x31a
    initrd /boot/initrd-2.6.25.5-1.1-default

###Don't change this comment - YaST2 identifier: Original name: memtest86###
title Memory Test
    kernel (hd0,5)/boot/memtest.bin

###Don't change this comment - YaST2 identifier: Original name: Kernel-2.6.25.5-1.1-default###
title Kernel-2.6.25.5-1.1-default
    root (hd0,5)
    kernel /boot/vmlinuz-2.6.25.5-1.1-default root=/dev/disk/by-id/scsi-SATA_ST3120213AS_5LS4KTJP-part6 resume=/dev/sda5 splash=silent showopts vga=0x31a
    initrd /boot/initrd-2.6.25.5-1.1-default

Although I changed the windows xp part; it used to be “rootnoverify (0, 5)” etc. I thought changing the 5 to a 1 would make sense if Windows was on hard disk 2, right?

Any help is appreciated very much.

Hi.
It’s just one of the many bugs of the Grub-Install script: it put the makeactive command where it shouldn’t have (oops, it did it! again!). The makeactive command in menu.lst makes your windows 1 system the active system which will boot every time - IIRC you’ll lose grub functionality the very first time you boot into windows 1. So the 1st thing I’d do is comment out the makeactive line making it:
###makeactive. Or, better still, I’d add a makeactive command to my default OpenSuSE install, so Grub will get loaded every time you boot.
The second thing I’d do is read carefully the line
###Don’t change this comment - YaST2 identifier: Original name: windows 1###
Then I’d read that line again. Then I’d put the numbers back as they were originally. If it used to read “rootnoverify (0,5)” I’d put that again. You see, the rootnoverify command doesn’t instruct Grub where to look for the Windows partition (the chainloader command does that): the rootnoverify command just instructs it where to look for its own loader files needed at boot. Moreover, AFAIK, Grub doesn’t necessarily number the partitions in the same order as fdisk does, so we must not make any assumptions here about its numbering scheme.
Now I’d try rebooting the machine. If it works, OK. If not, we’ll just add two “map” commands to your menu.lst, but that can be done later.
Anyway, this snippet from the Grub manual should be of great help:

GRUB cannot boot DOS or Windows directly, so you must chain-load them (see section Load another boot loader to boot unsupported operating systems). However, their boot loaders have some critical deficiencies, so it may not work to just chain-load them. To overcome the problems, GRUB provides you with two helper functions.
If you have installed DOS (or Windows) on a non-first hard disk, you have to use the disk swapping technique, because that OS cannot boot from any disks but the first one. The workaround used in GRUB is the command @command{map} (see section map), like this:
grub> map (hd0) (hd1)
grub> map (hd1) (hd0)

This performs a virtual swap between your first and second hard drive.
Caution: This is effective only if DOS (or Windows) uses BIOS to access the swapped disks. If that OS uses a special driver for the disks, this probably won’t work.
Another problem arises if you installed more than one set of DOS/Windows onto one disk, because they could be confused if there are more than one primary partitions for DOS/Windows. Certainly you should avoid doing this, but there is a solution if you do want to do so. Use the partition hiding/unhiding technique.
If GRUB hides a DOS (or Windows) partition (see section hide), DOS (or Windows) will ignore the partition. If GRUB unhides a DOS (or Windows) partition (see section unhide), DOS (or Windows) will detect the partition. Thus, if you have installed DOS (or Windows) on the first and the second partition of the first hard disk, and you want to boot the copy on the first partition, do the following:
grub> unhide (hd0,0)
grub> hide (hd0,1)
grub> rootnoverify (hd0,0)
grub> chainloader +1
grub> makeactive
grub> boot

Good luck and keep us posted!:slight_smile:

Okay,

I commented out “makeactive” on the Windows entry, and changed it back to rootnoverify(0,5); still won’t load.

Additionally, adding “makeactive” to the linux entry made it unbootable, so I took that out.

So… where do I put the map commands?

Thanks

You put

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

after the

rootnoverify (hd0,1)

and before the

chainloader (hd0,0)+1

in your “windows 1” section. Hope this works…:stuck_out_tongue:

You have to discover which windows partition contains the file boot.ini. Theoretically windows xp will not boot unless boot.ini is on the first partition. So my money is on boot.ini being on the first partition (unless there was some fancy moving of partitions after the event – very unlikely).

In this situation, the following entry should work:

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

But will it?? Check it out and see.
I also notice that sda2 has been made the active partition. You should change that to sda1. That would be why the “makeactive” command was there. But better to repair the damage and actually re-make sda1 the active partition.

Sorry I didn’t reply right away. Neither of those solutions worked, and I got sort of frantic, so (long story short) I now have only OpenSUSE on the Computer, negating the problem. Luckily, I had backed up some of the data before Windows died. Thank you very much for your help.

The getting of wisdom

You hurt XP’s feelings by installing a free OS. XP can be extremely touchy about that…>:)