3

I have this netbook, where the partition table looks like this

~$ fdisk netbook.dd 
Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)

Command (m for help): p

Disk netbook.dd: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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: 0x89c52b31

     Device Boot      Start         End      Blocks   Id  System
netbook.dd1   *        2048      616447      307200    7  HPFS/NTFS
netbook.dd2          616448   287338589   143361071    7  HPFS/NTFS
netbook.dd3       589484032   620941311    15728640    7  HPFS/NTFS
netbook.dd4       287338590   589473044   151067227+   5  Extended

Partition table entries are not in disk order

Command (m for help): 

There used to be a en EXT3 Linux partition on it, where GRUB would boot from. Now something has happened, so it is gone. I assume there also have been a swap partition, but not sure.

Can anyone make anything out of this? Or perhaps suggestions on what I can try to get the EXT3 partition back with data on?

Sandra
  • 9,973
  • 37
  • 104
  • 160

3 Answers3

5

Like it says, writing the partition table back should set the correct flags - however there must be a reason they changed to 0 in the first lpace - you may find that you have to run an fsck on the partition - and even then the disk may not be recoverable.

symcbean
  • 19,931
  • 1
  • 29
  • 49
  • Ok, now I have written the partition table with `w`, and now it doesn't give any warnings. But how do I mount this Extended partition? If I delete it with `d` and create a new with `n` and set the type to `83 Linux`, I still can't mount it. – Sandra Feb 01 '11 at 15:15
  • erm, if you deleted it then you'll have a lot of trouble accessing any data on it unless you recreate it with **exactly** the same settings as before. Something has changed the partition map - it may have changed data on the partition too. Try running fsck on it first. - just seen your later update below – symcbean Feb 02 '11 at 17:14
4

After fixing the partition table with fdisk, just pressing w I was able to recover everything using TestDisk.

Sandra
  • 9,973
  • 37
  • 104
  • 160
  • TestDisk is definetely the tool people look for in such a situation, +1 –  Nov 21 '13 at 09:44
4

gparted has the ability to scan your disks for "lost" partitions of most types.

If you weren't able to remember exactly where it was (and didn't lucky like you did), the rescue command in gparted will do the work for you.

MikeyB
  • 38,725
  • 10
  • 102
  • 186