1

Topic: Windows partition suddenly "unallocated"

I suddenly can't use my windows partition anymore... Gparted says it's unallocated. Here's the story...
I had a dual boot system, windows 7 with Ubuntu. After deciding I didn't really used Ubuntu anymore I just deleted the partitions (foolish mistake). Ofcourse windows wouldn't boot because of missing grub. So I reinstalled Ubuntu again, but now I can't see or use my windows partition anymore!

fdisk -l -u gives me:
Schijf /dev/sda: 160.0 GB, 160041885696 bytes
255 koppen, 63 sectoren/spoor, 19457 cilinders, totaal 312581808 sectoren
Eenheid = sectoren van 1 * 512 = 512 bytes
Sectorgrootte (logischl/fysiek): 512 bytes / 512 bytes
in-/uitvoergrootte (minimaal/optimaal): 512 bytes / 512 bytes
Schijf-ID: 0xd2ee5aa9

Apparaat Opstart   Begin       Einde     Blokken   ID  Systeem
/dev/sda1   *          63    16787924     8393931    7  HPFS/NTFS
/dev/sda2       293097472   311654399     9278464   83  Linux
/dev/sda3       311656448   312580079      461816   82  Linux wisselgeheugen

And a parted command gives me:
Model: ATA ST9160821AS (scsi)
Schijf /dev/sda: 312581808s
Sectorgrootte (logisch/fysiek): 512B/512B
Partitietabel: msdos

Nummer  Begin       Einde       Grootte    Type     Bestandssysteem  Vlaggen
1      63s         16787924s   16787862s  primary  ntfs             opstart
2      293097472s  311654399s  18556928s  primary  ext4
3      311656448s  312580079s  923632s    primary  linux-swap(v1)

I can see the partition is still there but I'm unable to figure out how to get it back after searching the web for a couple of days. Can I get it back?

2

Re: Windows partition suddenly "unallocated"

When you uninstalled Ubuntu, you would need to restore the Windows boot loader.   Please refer to the FAQ to learn how to restore the Windows 7 boot loader.

3

Re: Windows partition suddenly "unallocated"

gedakc wrote:

When you uninstalled Ubuntu, you would need to restore the Windows boot loader.   Please refer to the FAQ to learn how to restore the Windows 7 boot loader.

Yes I tried to do that, but nothing worked. bootsec /fixboot and /fixmbr couldn't do the trick. I tried almost everything, but was unable to get a solution. Then I resized the partitions and installed Ubuntu, hoping I could dual boot into windows again. Then the windows partition showed up as "unallocated" in gparted. But I'm running testdisk as we speak, and was able to copy my files from the "raw" partition. Now trying to restore the partition table...

4

Re: Windows partition suddenly "unallocated"

Ok solved the problem. Via testdisk rebuild the win7 boot sector (backup wasn't available), added a win7 entry in grub and voila! Not really sure why this all happened, but I'm still a fan of gparted  wink

5

Re: Windows partition suddenly "unallocated"

'Glad to hear that you resolved the problem.   smile