[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is it possible to recover deleted ext2 partitions??

On Thu, 20 Nov 2003 16:26:44 +0530, Vikas B N wrote:
> Hi All,
>  I have a system running WinXP and Linux. Except
>  for one partition, all others are ext2 partitions.
>  I had to make some space for a FAT32 partition,
>  so wanted to format one of the ext2 partitions
>  to FAT32. So, I booted into linux and used fdisk
>  to delete a partition(hda5). After deleting the 
>  partition, when fdisk listed the partitions, it
>  had mysteriously deleted all other logical partitions
>  as well!! (except for swap space).
>  I have been doing some googling on this since morning
>  and havent been able to find anything. I have also 
>  tried to use the "undelete" feature in Partition Magic.
>  But it returned an error and didn't go further.
>  Is there anything that I can do about it? I am particular
>  on this because, one of the partitions happen to be my
>  /home... :(
>  Following was the partition structure before I deleted
>  hda5.
> +---+--------+-------+--------------------------------------------+
>|   |        |       |-----------+----+------+-----------+--------|  
>|   |  hda2  | hda3  |    hda5   | 6  | hda7 |   hda8    |  hda9  |
>| 1 |   C:   |  /    |/data(ext2)|swap|/home |/multimedia| /extra |
>|   |  NTFS  | ext2  |    9.8GB  |    |2.0GB |   10GB    |  6.0GB |
>|   | 4.9GB  | 5.0GB |-----------+----+------+-----------+--------|
> +---+--------+-------+--------------------------------------------+
> Partitions:
> 1 --- FAT16,DellUtility,30Mb
> 2 --- NTFS,WinXP Pro,4.9Gb
> 3 --- ext2, /          ,5Gb  
> 5 --- ext2, /data      ,9.8Gb         
> 6 --- swap, /swap      ,512Mb
> 7 --- ext2, /home      ,2.0Gb
> 8 --- ext2, /multimedia,10Gb
> 9 --- ext2, /extra     ,6.0Gb
>  After deleting the partition, now all the logical partitions
>  show up as unallocated free space, except for swap!
> -vikas

Question: when you used fdisk to delete the partitions, and then looked at
them and you saw that there were missing ones, did you actually *write* the
partition table or did you just exit?  If you didn't write it, then you
should be able to boot as before and find the partition table intact.  The
change is only made if you write it after doing all the changes - at least
that's how it was last time I did this.  What exactly does 'fdisk -l
/dev/hda' show with a rescue disk right now?

Man, what a nasty surprise, especially if this happened without writing the
partition table!  I don't suppose you have the actual start and end blocks
for each of these.  If you did, you could just run Linux fdisk and remake
the logical partitions.  The data is still there, but the partition table
has been overwritten.

If you don't have them, you can use gpart or rescuept to get a good idea of
what they are and rebuild the partition table from that.  They should be
pretty accurate if you haven't done extensive repartitioning in the past.

You could get a pretty good guess from the sizes of the partitions, but it
would be better with one of these programs. 


Reply to: