ext4 partition on external hard drive

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
Sicabol
Posts: 3
Joined: 16 Jul 2012, 15:05
Location: Brittany / France

ext4 partition on external hard drive

#1 Post by Sicabol »

Hi !

First, thanks for TestDisk ;)

I use Ubuntu 12.04 for my work and sometime Windows 7 (games & music).
I've got an external hard drive of 1To with two partitions, one on ext4 format (where I've put three virtual machine for VirtualBox and where I dupplicate important files via DejaDup) and one on FAT32 format (where I put some files that could be opened on Ubuntu or on Windows). So I've cut the hard drive in two 500Go partitions.

When I've plugged my hard drive the other day, only the FAT32 was appearing… and I've discovered TestDisk :D
I've tried to check the disk but it couldn't seems to retrieve the ext4 partitions (three ext4 partitions were displayed, from where I couldn't see the content by using the P key). So I've tried the deep search…

… and here are the results (after 4 hours) :

Code: Select all

Disk /dev/sdc - 1000 GB / 931 GiB - CHS 121601 255 63
     Partition               Start        End    Size in sectors
>D Linux                 6483  58 40  7698 229 19   19529728
 D Linux                 6484  31 12  7699 201 54   19529728
 D Linux                 6484 193 46  7700 109 25   19529728
 D Linux                 6485   3 47  7700 174 26   19529728
 D Linux                 6486 106 21  7702  21 63   19529728
 D Linux                 6486 236 23  7702 152  2   19529728
 D Linux                 6489  23 63  7704 194 42   19529728
 D Linux                 6494  81 52  7709 252 31   19529728
 D Linux                 6495  21 55  7710 192 34   19529728
 D Linux                 6496 221 62  7712 137 41   19529728
 D Linux                 7938 241 48  9154 157 27   19529728
 D Linux                 7940 154 23  9156  70  2   19529728
 D Linux                 7941 126 58  9157  42 37   19529728
 D Linux                28261 161 61 29477  77 40   19529728
 D Linux                28264 112  9 29480  27 51   19529728
 D Linux                28265   1  1 29480 254 63   19534977
 D Linux                28268  67 24 29483 238  3   19529728
 D Linux                28270  44 63 29485 215 42   19529728
 D Linux                28271 115  5 29487  30 47   19529728
 D Linux                28272  87 40 29488   3 19   19529728
 D Linux                28274  97 48 29490  13 27   19529728
 D Linux                28274 195 18 29490 110 60   19529728
 * FAT32 LBA            63741  13 17 121601  57 56  929523712 [Windows]
Everything is shown as "Deleted" ?! Is it possible to merge all these Linux partitions to one (as it was before) ? Do you think it's possible to retrieve the files from that mess ?

Thanks a lot !

User avatar
Fiona
Posts: 2835
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: ext4 partition on external hard drive

#2 Post by Fiona »

After "Deep Search" did you have a try to list your files?
Easily check each linux partition using your up and down arrow key and press p to list your files.
If you found a correct partition you can use your right or left key to set it to P for primary or L for logical.
The * (star is primary active and bootable).
Partitions which are marked as D for deleted will be not considered for recovery.
Often after Deeper Search if TestDisk found mor then one partition they're displayed as D in case they overlap.
Reason is, two partitions cannot use the same space.

Fiona

Sicabol
Posts: 3
Joined: 16 Jul 2012, 15:05
Location: Brittany / France

Re: ext4 partition on external hard drive

#3 Post by Sicabol »

Hi Fiona,

yes, I did use the "P" key option to try to list the files from each Linux partition… but I got an error saying no file could be displayed (I don't remember the exact message). And it doesn't seem they overlap.
Thanks for the help !

Sicabol
Posts: 3
Joined: 16 Jul 2012, 15:05
Location: Brittany / France

Re: ext4 partition on external hard drive

#4 Post by Sicabol »

I will try to add more details about what I do… :)

First I use TestDisk 6.14-WIP.
After selecting my USB hard drive, TestDisk choose by default [None] as partition table type… As there should be two partitions, I choose [Intel].
If I choose [Advanced], TestDisk displays this :

Code: Select all

Disk /dev/sdc - 1000 GB / 931 GiB - CHS 121601 255 63

     Partition                  Start        End    Size in sectors
> 1 * Linux                 6483  58 40  7698 229 19   19529728
  2 P Linux                 7938 241 48  9154 157 27   19529728
  3 P Linux                28261 161 61 29477  77 40   19529728
  4 E extended LBA         29477  77 41 121601  57 56 1479970816
  5 L FAT32 LBA            63741  13 17 121601  57 56  929523712 [Windows]

 [  Type  ] >[Superblock]  [  List  ]  [Image Creation]  [  Quit  ]
                    Locate ext2/ext3/ext4 backup superblock
By using
  • on a Linux "partition", I have the following error (for example with the first one) :

    Code: Select all

     1 * Linux                 6483  58 40  7698 229 19   19529728
    Directory /
    
    No file found, filesystem may be damaged.
    The most important files are three virtual machines, 100Go files each…

Locked