Unable boot Win XP - repetitive GRUB start

Hi all,
I’m facing now problem with GRUB. After upgradin from OpenSuse 11.3 to 12.1 I had problem with setting GRUB - GRUB didn’t start after power on. Now it starts and I’m able to choose OpenSuse but if I choose WinXP it again starts GRUB (with the countdown and running of default OS). If I use Super Grub Disk 2 I don’t see XP in detected OS list.
Is there some way how to start XP.

Thanks for any help

Lova

It’s possible to make Grub chainloading itself and boot in circles. The entry supposed to boot XP chainloads the wrong partition.
It can be fixed with a tool like updategrub](http://forums.opensuse.org/english/get-technical-help-here/how-faq-forums/advanced-how-faq-read-only/458238-updategrub-opensuse-legacy-grub-not-update-grub.html#post2329167), which should add the correct entry to the boot menu, or by editing /boot/grub/menu.lst manually. **findgrub **can help you find the right partition, but in your case - with XP - it might be pretty obvious, I guess. Posting the output of the following command will probably already tell us which one it is:

sudo /sbin/fdisk -l

So:
updategrub gives me to my surprise

No other operating systems found

fdisk -l gives me

Disk /dev/sda: 250,1 GB, 250 058 268 160 bajtů
hlav: 255, sektorů na stopu: 63, cylindrů: 30 401, celkem 488 395 055 sektorů
Jednotky = sektory po 1 * 512 = 512 bajtech
Velikost sektoru (logického/fyzického): 512 bajtů / 512 bajtů
Velikost I/O (minimální/optimální): 512 bajtů / 512 bajtů
Identifikátor disku: 0x00070a0a

Zařízení Zavádět   Začátek       Konec    Bloky    Id  Systém
/dev/sda1   *          63    81915434    40957686    7  HPFS/NTFS/exFAT
/dev/sda2        81915435   112631714    15358140   83  Linux
/dev/sda4       112631715   488392064   187880175    5  Rozšířený
/dev/sda5       121033710   318842054    98904172+   7  HPFS/NTFS/exFAT
/dev/sda6       318842118   488392064    84774973+  83  Linux
/dev/sda7       112631841   121033709     4200934+  82  Linux swap/Solaris

Diskové oddíly jsou chybně seřazeny

Disk /dev/sdb: 500,1 GB, 500 106 780 160 bajtů
hlav: 255, sektorů na stopu: 63, cylindrů: 60 801, celkem 976 771 055 sektorů
Jednotky = sektory po 1 * 512 = 512 bajtech
Velikost sektoru (logického/fyzického): 512 bajtů / 512 bajtů
Velikost I/O (minimální/optimální): 512 bajtů / 512 bajtů
Identifikátor disku: 0x5bd4b322

Zařízení Zavádět   Začátek       Konec    Bloky    Id  Systém
/dev/sdb1   *          63   322328159   161164048+   7  HPFS/NTFS/exFAT
/dev/sdb2       322328160   976768064   327219952+   5  Rozšířený
/dev/sdb5       648463725   976768064   164152170    7  HPFS/NTFS/exFAT
/dev/sdb6       322328286   648463724   163067719+   7  HPFS/NTFS/exFAT

Diskové oddíly jsou chybně seřazeny

Disk /dev/sdc: 255 MB, 255 852 544 bajtů
hlav: 16, sektorů na stopu: 32, cylindrů: 976, celkem 499 712 sektorů
Jednotky = sektory po 1 * 512 = 512 bajtech
Velikost sektoru (logického/fyzického): 512 bajtů / 512 bajtů
Velikost I/O (minimální/optimální): 512 bajtů / 512 bajtů
Identifikátor disku: 0xacfe0394

and here is** /boot/grub/menu.lst**

# Modified by YaST2. Last modification on Ne pro  4 23:48:16 CET 2011
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# For the new kernel it try to figure out old parameters. In case we are not able to recognize it (e.g. change of flavor or strang
e install order ) it it use as fallback installation parameters from /etc/sysconfig/bootloader

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 Desktop -- openSUSE 12.1 - 3.1.0-1.2
    root (hd0,1)
    kernel /boot/vmlinuz-3.1.0-1.2-desktop root=/dev/disk/by-id/ata-WDC_WD2500JS-55NCB1_WD-WCANKF963931-part2 resume=/dev/disk/by-
id/ata-WDC_WD2500JS-55NCB1_WD-WCANKF963931-part7 splash=silent quiet showopts vga=0x31a
    initrd /boot/initrd-3.1.0-1.2-desktop

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 12.1 - 3.1.0-1.2 (desktop)
    root (hd0,1)
    kernel /boot/vmlinuz-3.1.0-1.2-desktop root=/dev/disk/by-id/ata-WDC_WD2500JS-55NCB1_WD-WCANKF963931-part2 showopts apm=off nor
esume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x31a
    initrd /boot/initrd-3.1.0-1.2-desktop

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows XP
    map (hd0) (hd0)
    map (hd0) (hd0)
    rootnoverify (hd0,0)
    makeactive
    chainloader +1
###Don't change this comment - Added by updategrub Mon Dec  5 20:37:27 CET 2011###

Do you have some more recomendations what to try?

Thanks

Lova

Now I see that fdisk -l was in czech so here it is in english:

Disk /dev/sda: 250.1 GB, 250058268160 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488395055 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00070a0a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    81915434    40957686    7  HPFS/NTFS/exFAT
/dev/sda2        81915435   112631714    15358140   83  Linux
/dev/sda4       112631715   488392064   187880175    5  Extended
/dev/sda5       121033710   318842054    98904172+   7  HPFS/NTFS/exFAT
/dev/sda6       318842118   488392064    84774973+  83  Linux
/dev/sda7       112631841   121033709     4200934+  82  Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdb: 500.1 GB, 500106780160 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976771055 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x5bd4b322

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63   322328159   161164048+   7  HPFS/NTFS/exFAT
/dev/sdb2       322328160   976768064   327219952+   5  Extended
/dev/sdb5       648463725   976768064   164152170    7  HPFS/NTFS/exFAT
/dev/sdb6       322328286   648463724   163067719+   7  HPFS/NTFS/exFAT

Partition table entries are not in disk order

Disk /dev/sdc: 255 MB, 255852544 bytes
16 heads, 32 sectors/track, 976 cylinders, total 499712 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xacfe0394

Hummm … Maybe it doesn’t understand czech either. Can you try in a termnal after changing the locale settings?

I can already tell you that these map commands (in red) don’t make sense. That would be either

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

or nothing.

Your setup is not as simple as I thought. Please post the output of findgrub.

Oooops … And the makeactive command is wrong too. Did you install Grub in your Windows partition??? :open_mouth:

here is findgrub output

Find Grub Version 3.5.1 - Written for openSUSE Forums

 - reading MBR on disk /dev/sda                       ...
 - searching partition /dev/sda1   *  (NTFS)          ...
 - reading bootsector  /dev/sda2      (LINUX)         ... --> Legacy GRUB  found in /dev/sda2   => sda2   0x83 (openSUSE)
 - reading bootsector  /dev/sda4      (Extended)      ...
 - searching partition /dev/sda5      (NTFS)          ...
 - reading bootsector  /dev/sda6      (LINUX)         ...
 - skipping partition  /dev/sda7      (swap)         

 - reading MBR on disk /dev/sdb                       ... --> Legacy GRUB  found in sdb MBR     => sdb2   0x5 (openSUSE)
 - searching partition /dev/sdb1   *  (NTFS)          ...
 - reading bootsector  /dev/sdb2      (Extended)      ...
 - searching partition /dev/sdb5      (NTFS)          ...
 - searching partition /dev/sdb6      (NTFS)          ...

 - reading MBR on disk /dev/sdc                       ...
 - searching partition /dev/sdc1   *  (FAT32)         ...

Oooops … And the makeactive command is wrong too. Did you install Grub in your Windows partition???

The last what I did if I remember well was

grub
root (hd0,1)
setup(hd0,0)

This installed Grub stage1 in your Windows partition - as I suspected. findgrub didn’t catch it because it doesn’t check for Grub in NTFS partitions, but it couldn’t find the XP bootloader either. And updategrub didn’t find a Windows bootloader because there isn’t any. It’s a good news for me - it means that updategrub understands czech and so, I won’t have to spend months giving it lessons. But it’s a bad news for you, because you have to repair your XP now.

setup(hd0,0) was the wrong command, that overwrote Windows bootsector in sda1.
It should have been either setup (hd0,1) to install Grub in sda2 (but it is there already) or setup (hd0) to install it in the MBR of the first hard disk - assuming sda is the first hard disk, which is not sure. findgrub -M might give some info about how device names (sda,sdb) correspond to BIOS drives (hd0, hd1).

OK
I’m going to repair win. I expect that it will help.
So thank you for now. It was very useful for me to read your information.
I’ll write response about fixing the problem.

lova

please_try_again: Thank you a lot, now it is working well.
win recovery CD
R for recovery

fixmbr
fixboot

then I boot using Super Grub Disc 2
from console

root (hd0,1)
setup (hd0)

and it works

SOLVED