Invalid Partition Table Error

I installed openSUSE on a XP running computer and every thing is OK.
When I tried to Install a new XP, I got this error:

Invalid Partition Table

I fixed it by reinstalling GRUB using Rescue System.

I tried fix mbr on XP Repair System and I got that error again.

Now I want to keep XP and remove openSUSE. But computer only boots by GRUB and XP’s boot loader is unable to boot and shows that error.
Please help.

Can you post the output of

fdisk -l/CODE

from a root terminal in linux (use a liveCD if needed)

Please post

fdisk -l

from a root terminal in linux.

Hi,

that’s a problem of XP which cannot deal with hds formated with other file systems. Get gparted as live cd here:

GParted – Live CD/USB/PXE/HD

boot with that cd and clean all partitions so that the hd seems to be new. After that you should be able to install XP again.

hth

bye

Erik

boot with that cd and clean all partitions so that the hd seems to be new. After that you should be able to install XP again.

If your intention is to delete everything from this disk then this will work.

Just be sure that you have saved anything you don’t want to loose.

And that you have actually checked that your backups are working.

Your error points to 2 partitions are marked ‘active’, the use of fdisk as posted by dvhenry will tell us and can use same program to remove one active flag.

fdisk -l


Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x95fbc54e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1313    10546641    7  HPFS/NTFS
/dev/sda2   *        1314       19457   145741680    5  Extended
/dev/sda5            1314       18147   135219073+   7  HPFS/NTFS
/dev/sda6           18148       19330     9502416   83  Linux
/dev/sda7           19331       19457     1020096   82  Linux swap / Solaris

As suggested by lostFarmer you have 2 boot flags set, But first can you clarify exactly what you want to do?
Do you want to delete sda6 and sda7 leaving only windows?

No I dont want to delete my linux partitions. I only ant to fix this problem :wink:
Actually its not my problem :wink: I dont have Windows on my system :smiley:
Its one of my friends problem :smiley:

what do you mean when you say this?

Now I want to keep XP and remove openSUSE. But computer only boots by GRUB and XP’s boot loader is unable to boot and shows that error.

Do you mean you want to use the windows boot loader?

Do you mean that when you choose XP from GRUB’s menu it does not boot?

I find the origonal post confusing.

I want to use XP boot loader, but I dont want to delete linux partitions.

This is an excellent tutorial on the subject.

Boot Multiboot openSUSE Windows (2000, XP, Vista - any mix) with Windows bootloader.

You will still want to sort out the boot flag issue.Gparted may be easiest for this, if you are not familiar with fdisk.

Do you mean I remove boot flag from my sda2 Extended partition?

To be honest I would remove the flag from sda2 (which is your extended primary, not your /root partition)
then install GRUB to your MBR and use the grub boot loader.

Otherwise follow the instructions in the link I gave you.

How can I remove boot flag from my extended partition (sda2) ?
I want to use gpart.

I had a similar problem. Only fix I found was to get the XP CD. Overwrite current windows install. And then use Disk Management on Windows to delete the Linux partitions. In my case I reinstalled linux, but I see your friend doesn’t want to perform the last step.

A rule of thumb - install Windows, then linux distro. Keep that in mind if you have any reinstalling to do.

Actually, sina_saeedi82, I think what you want to do is keep both Windows XP and Suse 11.2. You only wanted to remove Suse because you thought it was preventing you from booting Windows. Correct?

If so, could you post a listing of the grub boot options:

cat /boot/grub/menu.lst

so we can make sure it contains an entry to chain boot Windows XP?

I anticipate all you have to do is remove the boot flag from /dev/sda1. To do that use cfdisk from a root console or gparted when you get into Suse. For cfdisk run:

cfdisk /dev/sda

Use up - down arrow keys to select partition; left-right arrow keys to choose menu item.

Select sda1, select boot and press Enter. Make sure the flag on sda1 has gone. Save the details to the partition table by selecting ‘write’ and then Enter then type ‘yes’ and Enter. The only problem may be retaining the flag on the extended partition sda2 which cfdisk may not do. Post another fdisk -l if you use cfdisk.

BTW: gpart is for guessing partitions from the file system structure when you have to ignore the partition table completely.

Using Parted to switch the boot flag is easy.

openSUSE would have originally moved it from sda1 to sda2
You currently have it on both sda1 and sda2
You should have it on sda1 only and grub to MBR

Switch it to sda1 only and re-install grub like this:
Re-Install Grub Quickly with Parted Magic - openSUSE Forums

Sorry to be slightly in disagreement but I think the OP now wants to retain both systems. I have several similar setups where GRUB is installed to sda2 (an extended partition), which has the boot flag set, Suse on an extended partition within sda2 and Windows on sda1 with no boot flag set.

If the OP does what you suggest, I think you can only boot Windows.

There is also the problem that Windows writes a Windows signature to the MBR (as distinct from the AA55 signature at the end of the MBR) and, if grub is installed there, the Windows signature is borked. That is how I understood it. Does anybody disagree with this?

I guess the OP should spell out what he really wants.

IIRC you can have it either way.
I know the OP wants to keep both OS’s

When you install openSUSE on a windows machine it will switch the boot flag to the extended if that contains the / partition, but it does not write grub to the MBR

Tell you what. I’ll keep my head down and leave it to those that know more than I do.:shame: