Recover deleted 1TB EXT4 partition and created 17MB MS GPT partition

Using TestDisk to repair the filesystem
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
Post Reply
Message
Author
quina
Posts: 1
Joined: 06 Aug 2018, 23:41

Recover deleted 1TB EXT4 partition and created 17MB MS GPT partition

#1 Post by quina » 07 Aug 2018, 00:11

<t>Hello!<br/>
I would like to recovery my EXT4 1TB partition. Working on Windows 10, forgot it is EXT4 partition. Entered computer managment ->storage and switched the disk from offline to online. Windows asks should it create GPT or MBR partition table (something like https://www.partitionwizard.com/images/ ... rive-2.png). Chose GPT and then windows created 17MB partition and remaining space marked as raw data. Below some infomration from test disk.</t>
<quote>

Tue Aug 7 00:26:11 2018
Command line: TestDisk

TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 4.15.0-20-generic (#21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018) x86_64
Compiler: GCC 7.2
ext2fs lib: 1.44.1, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: none, curses lib: ncurses 6.0
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size 1953525168 sectors
/dev/sda: user_max 1953525168 sectors
/dev/sda: native_max 1953525168 sectors
/dev/sda: dco 1953525168 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Hard disk list
Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63, sector size=512 - WDC WD10EZEX-21M2NA0, S/N:WCC3FC37H2E3, FW:01.01A01

Partition table type (auto): None
Disk /dev/sda - 1000 GB / 931 GiB - WDC WD10EZEX-21M2NA0
Partition table type: None

Analyse Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63
recover_EXT2: "e2fsck -b 98304 -B 4096 device" may be needed
Current partition structure:
P ext4 0 0 1 121601 80 63 1953525168 [DANE]

search_part()
Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63

block_group_nr 1

recover_EXT2: part_offset problem

block_group_nr 1

recover_EXT2: "e2fsck -b 32768 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=1/7452, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 244190646
recover_EXT2: part_size 1953525168
ext4 0 0 1 121601 80 63 1953525168 [DANE]
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 1000 GB / 931 GiB

Results
P ext4 0 0 1 121601 80 63 1953525168 [DANE]
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 1000 GB / 931 GiB

Hint for advanced users. dmsetup may be used if you prefer to avoid to rewrite the partition table for the moment:
echo "0 1953525168 linear /dev/sda 0" | dmsetup create test0


dir_partition inode=2
P ext4 0 0 1 121601 80 63 1953525168 [DANE]
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 1000 GB / 931 GiB
ext2fs_dir_iterate failed with error 2133571387.
Directory /

interface_write()
P ext4 0 0 1 121601 80 63 1953525168 [DANE]

Write isn't available because the partition table type "None" has been selected.

search_part()
Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63

block_group_nr 1

recover_EXT2: part_offset problem

block_group_nr 1

recover_EXT2: "e2fsck -b 32768 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=1/7452, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 244190646
recover_EXT2: part_size 1953525168
ext4 0 0 1 121601 80 63 1953525168 [DANE]
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 1000 GB / 931 GiB

block_group_nr 3

recover_EXT2: part_offset problem

block_group_nr 3

recover_EXT2: "e2fsck -b 98304 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=3/7452, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 244190646
recover_EXT2: part_size 1953525168
ext4 0 0 1 121601 80 63 1953525168 [DANE]
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 1000 GB / 931 GiB

</quote>
and so on...

Sponsored links

User avatar
cgrenier
Site Admin
Posts: 4510
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Recover deleted 1TB EXT4 partition and created 17MB MS GPT partition

#2 Post by cgrenier » 07 Aug 2018, 18:55

Your disk was not partitioned. Run "fsck.ext4 /dev/sda".

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests