# [SOLVED] Did I kill my NTFS WinXP partition???

## jknacnud

I have two hard drives.  The first has two partitions.  Partition 1 has (had?!?) WinXP on it.  The second partition is a VFAT partition for sharing between XP and Gentoo.  On the second drive I have Gentoo (boot, swap, root).

I was having problems with the Grub boot menu.  So in Gentoo I did a "grub-install /dev/hda1".  When it finished I rebooted.  I could still boot into Gentoo, but when I selected XP it would just go back to the Grub menu.  So I went into the XP Recovery Console and did a "fixboot" and "fixmbr" to replace the boot record and menu for XP.  After I rebooted it said it was missing the NTLDR.  So I went back into the Recovery Console.  Now the Windows Setup and Recovery Console see the XP partition as "unknown" with all space free.  YIKES!!!

In Gentoo an "fdisk -l" shows /dev/hda1 still as NTFS.  Did I kill my XP partition?  Did the grub-install kill it?  I have run grub-install before on it and it did not kill it.  I have run the fixmbr and fixboot on it and it has not killed it in the past.  I the XP Recovery Console I tried a chkdsk on the partition and it says there was some unrecoverable error.  In Gentoo if I try to mount the partition I get:

```
NTFS-fs error (device hda1): read_ntfs_boot_sector(): Primary boot sector is invalid.

NTFS-fs error (device hda1): read_ntfs_boot_sector(): Mount option errors=recover not used.  Aborting without trying to recover.

NTFS-fs error (device hda1): ntfs_fill_super(): Not an NTFS volume.

mount: wrong fs type, bad option, bad superblock on /dev/hda1, or too many mounted file systems
```

Help?!?  Is my XP data gone?  Can I recover somehow?

Thanks,

----------

## beatryder

what you should have done was grub --install /dev/hda

what you can do to try and fix it is this:

boot to the XP CD as you would to install it from scratch,

Choose "r" to Recover, instead of installing a new system, NOT THE RECOVERY CONSOLE!!!

once this is done you will have to do all your windows updates, SP2 install etc.

then you will have a working XP machine. To get your dual boot back, you will then need to boot to a live CD

and Chroot into your existing gentoo install

I recomend you follow the gentoo installation guide to get the info you need to chroot and install grub.

I hope this helps you out. Please post back with your progress.

----------

## jknacnud

Even before you confirmed this for me, I began to realize that there is most likely a difference between the following two commands:

```
grub-install /dev/hda

grub-install /dev/hda1 
```

And now that I understand that, I seem to remember only having referenced the whole disk (hda) in the past.  Why did I have to put a 1 after it this time?!?  I blame it on staying up late and being to cavalier with a tool that could potentially cause problems.  Which it did.

Thank you for the idea to try a repair instead of playing around in the RC.  I will try that out.  Currently I am running gpart and testdisk to see what information they give me.

----------

## jknacnud

So I booted back up with the XP CD and did not see what you are meaning.  While booting it offers "F2" to do an Automated System Recovery.  That just asks for a backup disk.  I let the setup finish booting and there are three options: 1) Setup Windows (Enter), 2) Repair an install with Recovery Console, (R), 3) Quit.

If I choose to Setup Windows it takes me to the screen where I need to choose a partition.  I cannot choose the partition that XP is/was on without it asking me to reformat because it says the partition is of type [Unknown].

Were you referring to something else?

----------

## evilben

I did this to my Windows partition last summer--I think you're pretty much screwed. I would avoid putting Grub on either the MBR or the NTFS partition where windows is installed on the first partition--I killed it just installing to the MBR, I think. Instead, you need to be booting from your second drive, with a dos fdisk MBR pointing to an active boot partition, and grub installed on that partition. I've never had any problems with that sort of setup.

I used File Scavenger to get all my data back, which is about your only option if you need data from the NTFS partition (defunct partition search).

----------

## beatryder

 *Quote:*   

> If I choose to Setup Windows it takes me to the screen where I need to choose a partition. I cannot choose the partition that XP is/was on without it asking me to reformat because it says the partition is of type [Unknown]. 

 

Right, I missed that part.

Well, I would suggest Stellar Pheonix NTFS tools.

in the future it is totaly safe to install grub on the mbr, it has been m exp that XP wont work if you install it on any partition other than hda1 (or sda1 for scsi/serial ata)

----------

## jknacnud

 *evilben wrote:*   

> I did this to my Windows partition last summer--I think you're pretty much screwed. I would avoid putting Grub on either the MBR or the NTFS partition where windows is installed on the first partition--I killed it just installing to the MBR, I think. Instead, you need to be booting from your second drive, with a dos fdisk MBR pointing to an active boot partition, and grub installed on that partition. I've never had any problems with that sort of setup.
> 
> I used File Scavenger to get all my data back, which is about your only option if you need data from the NTFS partition (defunct partition search).

 

Are you saying that you did the exact same thing that I did?  You ran grub-install on a partition instead of MBR?  If so I am glad to hear that you were able to recover the data.  At this point that is all I am going for.  I can reinstall programs and XP, but there is some data on there that I need.

It looks like the File Scavenger needs a working install of Windows in order to run instead of just being able to run from DOS or Linux.  So I will try to get a working install of Windows working on that machine and see what running the program does.  Unless someone knows of a good data recovery tool for Linux.  Anyone?

Thanks,

----------

## jknacnud

 *beatryder wrote:*   

> Well, I would suggest Stellar Pheonix NTFS tools.

 

Ok, another recovery tool.  Thanks.  I will check it out.

----------

## jknacnud

Thanks to Christophe Grenier and his "testdisk" utility (http://cgsecurity.org/), my data is safe!!!  Not only that but I am able to boot into Windows again and all seems to be just as it was before I goofed.  Woohoo!!  I am so happy!  I am going to go out and get a Maxtor Onetouch external hard drive and back up all my data quick!  Thanks to everyone for your help.

Regards,

----------

