DD avec HFS+, table des partitions écrasée par commande dd

Comment utiliser TestDisk pour récupérer une partition perdue
Locked
Message
Author
Johndoge
Posts: 5
Joined: 05 Feb 2014, 10:27

DD avec HFS+, table des partitions écrasée par commande dd

#1 Post by Johndoge »

Bonjour,

J'ai un disque dur externe de 2 TB qui a été formaté en HFS+ et sur lequel j'ai écrasé la table des partitions quand je l'ai ciblé par accident avec sudo dd. En plus, j'ai suivi un autre guide et essayé de placer de nouvelles partitions HFS+ à la main sur les blocs que Deeper Search me semblait indiquer, mais ca n'a pas marché et j'ai mal documenté mon processus. Il me semble donc qu'il faudra ignorer la première partie du disque complètement.

Voici les parties intéressantes de l'instant où j'ai mal ciblé la commande dd:

Code: Select all

EXTRAIT DU TERMINAL BASH

Felixs-MacBook-Air:~ Felix$ diskutil list
[...]
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *2.0 TB     disk2
   1:                  Apple_HFS WD-40                   2.0 TB     disk2s1

$ diskutil unmountDisk /dev/disk2
Unmount of all volumes on disk2 was successful

$ sudo dd if=/Users/Felix/Downloads/xubuntu-12.04.3-alternate-i386.img of=/dev/disk2 bs=1m
^C503+0 records in
502+0 records out
526385152 bytes transferred in 16.409358 secs (32078351 bytes/sec)
$ diskutil list
[...]
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *2.0 TB     disk2
   1:                       0x17                         715.1 MB   disk2s1
Si je lis bien j'ai couvert les premiers 502 MB du disque dur avec cet image de xubuntu.

Avec la version 64 bit de testdisk, j'ai effectué un premier scan sur les premiers 14% du disque, ce qui obtient les resultats ci-dessous. J'ai arrêté ce scan car la partie intéressante est le début du disque ou un autre indice qui permet de restaurer la partition. J'ai enchainé le scan profond

Code: Select all

EXTRAIT DE TESTDISK.LOG

[...]
LVM magic value at 31676/178/3

LVM magic value at 31685/19/35
Search for partition aborted

Results
     MS Data                354087269  354093442       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
     MS Data                354093442  354099615       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
   P MS Data                354099734  354120472      20739 [NO NAME]
     FAT12, blocksize=4096, 10 MB / 10 MiB
     MS Data                358938549  358944722       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
     MS Data                358944722  358950895       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
   P MS Data                358951010  358971748      20739 [NO NAME]
     FAT12, blocksize=4096, 10 MB / 10 MiB
     MS Data                363749573  363755746       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
     MS Data                363755746  363761919       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
   P MS Data                363762034  363782772      20739 [NO NAME]
     FAT12, blocksize=4096, 10 MB / 10 MiB
   P MS Data                371716138  371719017       2880 [EFISECTOR]
     FAT12, blocksize=512, 1474 KB / 1440 KiB
     MS Data                371720053  371726226       6174
     NTFS found using backup sector, blocksize=512, 3161 KB / 3087 KiB
     MS Data                371726226  371732399       6174 [Boot]
     NTFS, blocksize=512, 3161 KB / 3087 KiB
   P MS Data                377878122  377881001       2880 [EFISECTOR]
     FAT12, blocksize=512, 1474 KB / 1440 KiB
   P MS Data                377881002  377883881       2880 [EFISECTOR]
     FAT12, blocksize=512, 1474 KB / 1440 KiB
   P MS Data                421662274  421665153       2880 [EFISECTOR]
     FAT12, blocksize=512, 1474 KB / 1440 KiB
     MS Data                421674913
A ce point, je suis tenté d'acheter le même disque dur, le formatter comme l'ancien et copier la table des partitions directement par dd. Pourtant j'en ai aucun besoin, la solution me semble brute, et je ne suis pas sûr qu'elle portera fruit - je connais mal HFS+.

Est-ce que vous avez des conseils pour bien placer la partition HFS+ à partir de ces données? Je vais rajouter les résultats du scan profond demain.

Merci d'avance!

Johndoge
Posts: 5
Joined: 05 Feb 2014, 10:27

Re: DD avec HFS+, table des partitions écrasée par commande

#2 Post by Johndoge »

Voilà les résultats du Deeper Search sur à peu près 30% du disque:

Code: Select all

Command line: TestDisk

TestDisk 6.14, Data Recovery Utility, July 2013
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Windows 7 (7601) SP1
Compiler: GCC 4.7, MinGW 3.11
Compilation date: Jul 30 2013 14:09:04
ext2fs lib: none, ntfs lib: 10:0:0, reiserfs lib: none, ewf lib: 20120504
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\PhysicalDrive0)=1000204886016
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\PhysicalDrive1)=2000396746752
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\C:)=1000097185792
filewin32_getfilesize(\\.\D:) GetFileSize err ファンクションが間違っています。


filewin32_setfilepointer(\\.\D:) SetFilePointer err ファンクションが間違っています。


Warning: can't get size for \\.\D:
Hard disk list
Disk \\.\PhysicalDrive0 - 1000 GB / 931 GiB - CHS 121601 255 63, sector size=512
Disk \\.\PhysicalDrive1 - 2000 GB / 1863 GiB - CHS 243201 255 63, sector size=512
Drive C: - 1000 GB / 931 GiB - CHS 121588 255 63, sector size=512

Partition table type (auto): None
Disk \\.\PhysicalDrive1 - 2000 GB / 1863 GiB
Partition table type: Mac

Analyse Disk \\.\PhysicalDrive1 - 2000 GB / 1863 GiB - CHS 243201 255 63
Current partition structure:
Bad MAC partition, invalid block0 signature
read_part_mac: bad DPME signature

search_part()
Disk \\.\PhysicalDrive1 - 2000 GB / 1863 GiB - CHS 243201 255 63
Search for partition aborted

Results

interface_write()
 
No partition found or selected for recovery

search_part()
Disk \\.\PhysicalDrive1 - 2000 GB / 1863 GiB - CHS 243201 255 63
check_FAT: Bad number of sectors per cluster
FAT12 at 22041/175/45
FAT1 : 1-8
FAT2 : 9-16
start_rootdir : 17
Data : 49-20736
sectors : 20739
cluster_size : 8
no_of_cluster : 2586 (2 - 2587)
fat_length 8 calculated 8
FAT differs, FAT sectors=0-8/8
heads/cylinder 4 (FAT) != 255 (HD)
sect/track 17 (FAT) != 63 (HD)

FAT12 at 22041/175/45
     Unknown                354099734  354120472      20739 [NO NAME]
     FAT12, blocksize=4096, 10 MB / 10 MiB
Partition not added.
check_FAT: Unusual media descriptor (0xf0!=0xf8)
FAT12 at 26654/164/29
FAT1 : 1-9
FAT2 : 10-18
start_rootdir : 19
Data : 33-2879
sectors : 2880
cluster_size : 1
no_of_cluster : 2847 (2 - 2848)
fat_length 9 calculated 9
heads/cylinder 2 (FAT) != 255 (HD)
sect/track 18 (FAT) != 63 (HD)

FAT12 at 26654/164/29
     Unknown                428206870  428209749       2880 [EFISECTOR]
     FAT12, blocksize=512, 1474 KB / 1440 KiB
Partition not added.
check_FAT: Unusual media descriptor (0xf0!=0xf8)
FAT12 at 26654/210/11
FAT1 : 1-9
FAT2 : 10-18
start_rootdir : 19
Data : 33-2879
sectors : 2880
cluster_size : 1
no_of_cluster : 2847 (2 - 2848)
fat_length 9 calculated 9
heads/cylinder 2 (FAT) != 255 (HD)
sect/track 18 (FAT) != 63 (HD)

FAT12 at 26654/210/11
     Unknown                428209750  428212629       2880 [EFISECTOR]
     FAT12, blocksize=512, 1474 KB / 1440 KiB
Partition not added.
check_FAT: Unusual media descriptor (0xf0!=0xf8)
FAT12 at 26682/201/30
FAT1 : 1-9
FAT2 : 10-18
start_rootdir : 19
Data : 33-2879
sectors : 2880
cluster_size : 1
no_of_cluster : 2847 (2 - 2848)
fat_length 9 calculated 9
heads/cylinder 2 (FAT) != 255 (HD)
sect/track 18 (FAT) != 63 (HD)

FAT12 at 26682/201/30
     Unknown                428659022  428661901       2880 [EFISECTOR]
     FAT12, blocksize=512, 1474 KB / 1440 KiB
Partition not added.
check_FAT: Unusual media descriptor (0xf0!=0xf8)
FAT12 at 27085/155/37
FAT1 : 1-9
FAT2 : 10-18
start_rootdir : 19
Data : 33-2879
sectors : 2880
cluster_size : 1
no_of_cluster : 2847 (2 - 2848)
fat_length 9 calculated 9
heads/cylinder 2 (FAT) != 255 (HD)
sect/track 18 (FAT) != 63 (HD)

FAT12 at 27085/155/37
     Unknown                435130326  435133205       2880 [EFISECTOR]
     FAT12, blocksize=512, 1474 KB / 1440 KiB
Partition not added.
check_FAT: Unusual media descriptor (0xf0!=0xf8)
FAT12 at 27085/201/19
FAT1 : 1-9
FAT2 : 10-18
start_rootdir : 19
Data : 33-2879
sectors : 2880
cluster_size : 1
no_of_cluster : 2847 (2 - 2848)
fat_length 9 calculated 9
heads/cylinder 2 (FAT) != 255 (HD)
sect/track 18 (FAT) != 63 (HD)

FAT12 at 27085/201/19
     Unknown                435133206  435136085       2880 [EFISECTOR]
     FAT12, blocksize=512, 1474 KB / 1440 KiB
Partition not added.
check_FAT: Unusual media descriptor (0xf0!=0xf8)
FAT12 at 27436/9/44
FAT1 : 1-9
FAT2 : 10-18
start_rootdir : 19
Data : 33-2879
sectors : 2880
cluster_size : 1
no_of_cluster : 2847 (2 - 2848)
fat_length 9 calculated 9
heads/cylinder 2 (FAT) != 255 (HD)
sect/track 18 (FAT) != 63 (HD)

FAT12 at 27436/9/44
     Unknown                440759950  440762829       2880 [EFISECTOR]
     FAT12, blocksize=512, 1474 KB / 1440 KiB
Partition not added.
Search for partition aborted

Results

interface_write()
 
No partition found or selected for recovery
simulate write!

Analyse Disk \\.\PhysicalDrive1 - 2000 GB / 1863 GiB - CHS 243201 255 63
Current partition structure:
Bad MAC partition, invalid block0 signature
read_part_mac: bad DPME signature

search_part()
Disk \\.\PhysicalDrive1 - 2000 GB / 1863 GiB - CHS 243201 255 63
Search for partition aborted

Results

interface_write()
 
No partition found or selected for recovery
simulate write!

TestDisk exited normally.
Est-ce qu'il y a de l'information qui sert à placer la table de partitions HFS+? J'aimerai offrir une prime de ~5 Euro pour l'info qui mène à la réparation des données.

Johndoge
Posts: 5
Joined: 05 Feb 2014, 10:27

Re: DD avec HFS+, table des partitions écrasée par commande

#3 Post by Johndoge »

Je double la prime à 10 Euro :)

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

Re: DD avec HFS+, table des partitions écrasée par commande

#4 Post by cgrenier »

Il faut utiliser une table des partitions EFI GPT et non Mac comme lors de votre dernier scan.

Locked