grub repair error

Hi.
I have a problem with boot loader on my laptop
There are 2 systems: openSuse 11.1 and windows XP. I wanted to make XP default system,so I opened YaST>boot loader>make default. And after restart i have no grub at all.
To fix this i inserted openSuse DVD and ran system repair. It said that there is an error in boot loader and proposed new grub configuration,but whatever config i make the error message appears again. And when i click Finish repair,it can’t restart successfully,telling me that “An error occured during the installation” and gives a choise. If i choose restart,i still have no grub,if i choose “start installation” i can boot Suse,but it can’t mount my windows ntfs partitions telling this:

# mount -t ntfs /dev/sda1 /windows/C
FATAL: Could not load /lib/modules/2.6.27.7-9-default/modules.dep: No such file or directory
Unexpected clusters per mft record (-1).
Failed to mount '/dev/sda1': Недопустимый аргумент
The device '/dev/sda1' doesn't have a valid NTFS.
Maybe you selected the wrong device? Or the whole disk instead of a
partition (e.g. /dev/hda, not /dev/hda1)? Or the other way around?

Any ideas,how can i revive my grub and boot to XP?

Try to use ntfs-3g type

mount -t ntfs-3g /dev/sda1 /windows/C

the same result

linux:/windows # mount -t ntfs-3g /dev/sda1 /windows/C
FATAL: Could not load /lib/modules/2.6.27.7-9-default/modules.dep: No such file or directory
Unexpected clusters per mft record (-1).
Failed to mount '/dev/sda1': Недопустимый аргумент
The device '/dev/sda1' doesn't have a valid NTFS.
Maybe you selected the wrong device? Or the whole disk instead of a
partition (e.g. /dev/hda, not /dev/hda1)? Or the other way around?

Does it mean win partition is corrupt?
It’s not really necessary to mount it under linux,i just want to be able to boot from it

ok
i revived grub,but there is no windows in list and if i add it,grub crashes again

Try booting with a windows XP Cd and go into the recovery console (it’s a DOS environment).

Check the disk structure by doing a ‘dir’.
If it lists weird random data then the partition is corrupt. Try a chkdsk on it.

Unexpected clusters per mft record (-1)
with that error I would suspect a bad XP Volume Boot Record. Would try ‘testdisk’ to copy the backup VBR to the primary VBR. Be sure to read the How-To use first.
TestDisk - CGSecurity

My thinking is for some reason when you tried to reinstall grub it was written to XP’s VBR, if so that will corrupt XP’s vbr data.

Would try ‘testdisk’ to copy the backup VBR to the primary VBR.

Done. Testdisk recovered boot sector from backup in /dev/sda1,but after restart it boots directly to windows XP without any GRUB menu. Isn’t it strange?

Not really.
Re-install grub. Like this:

If you have a Linux Live CD, boot from it and log in. Then open a console window and enter su and you will be at the command prompt with root powers and ready to proceed. If on the other hand you have the openSUSE install DVD, boot from it and on the first menu of options select the Rescue System option. That will start an elementary Linux Live operating system and bring you to the login prompt. Enter the username root and you will be at the command prompt with root powers and ready to proceed. Whichever way you started (the openSUSE install DVD or a Linux Live CD) when you are at the root command prompt, first you find the partition containing openSUSE’s bootloader. Then you reinstall Grub with a pointer to that partition. First find the openSUSE installation:

You enter this ---------------- grub
Computer returns like this ---- grub>
You enter this ---------------- find /boot/grub/menu.lst
Computer returns like this ---- (hd0,5)
Here, (hd0,5) is Grub’s pointer to my openSUSE installation. Your pointer will be different from my example (hd0,5). Substitute your values for my example (hd0,5). Now that you have the pointer, proceed like this:
You enter this ---------------- root (hd0,5)
Computer returns like this ---- Filesystem type is ext2fs, partition type 0x83
You enter this ---------------- setup (hd0)
You see several lines like this — Checking if /boot/grub/stage1 exists … yes Computer finally returns this-- Succeeded…Done
You enter this ---------------- quit
You enter this ---------------- reboot

This is from here:
All About Grub - openSUSE

Beware that repair falsely says device.map is incorrect.

Bug 547959 - Yast repairer unable to repair boot (grub) configuration - device.map error is still broken
https://bugzilla.novell.com/show_bug.cgi?id=547959

When the dialog says error - clicking help says what the error is!

It’s probably better to stay away from the YaST bootloader repair. There’s lots of information about on grub repairs and trouble after installing XP over grub.

BTW grub has known issues and is now officially called “Grub legacy” by GNU. Grub 2 is a lot more sensible but not yet ready for general use.

I have installed updated my OpenSUSE 11.1 to 11.2 and it override my partition tables.

Thank you guys for the solution. It worked for me.