Erreur disque dur cible avec commande dd

Comment utiliser TestDisk pour récupérer une partition perdue
Locked
Message
Author
torrom
Posts: 4
Joined: 02 May 2014, 12:46

Erreur disque dur cible avec commande dd

#1 Post by torrom »

Bonjour,
en voulant créer une clef usb bootable d'un iso (ubuntu 14.04) a l'aide de la commande dd (sudo dd bs=4M if=/home/marc/Téléchargements/ubuntu-14.04-desktop-i386.iso of=/dev/sdd && sync), je me suis lamentablement tromper sur la cible...
Le disque en question :

>Disk /dev/sdb - 164 GB / 153 GiB - Hitachi HDS721616PLA380

ne contenait qu'une seule partition ntfs sur la totalité du disque, pleine a environ 85-90%

Apercus de testdisk avant Quicksearch :

Disk /dev/sdb - 164 GB / 153 GiB - CHS 20023 255 63
Current partition structure:
Partition Start End Size in sectors

No ext2, JFS, Reiser, cramfs or XFS marker
1 P Linux 0 1 2 123 167 44 1986496
1 P Linux 0 1 2 123 167 44 1986496

Bad relative sector.
No partition is bootable


Quicksearch et Deep Search ne trouve aucune partition.

Disk /dev/sdb - 164 GB / 153 GiB - CHS 20023 255 63
Partition Start End Size in sectors


Keys A: add partition, L: load backup, Enter: to continue



Disk /dev/sdb - 164 GB / 153 GiB - CHS 20023 255 63

Partition Start End Size in sectors

No partition found or selected for recovery

>[ Quit ]
Return to main menu



Est-il possible de récupérer l’intégrité de la table de partition même si je dois me faire une raison sur les 1GO de données du début du disque ? Ou ne me reste t-il que photorec ou recuva ou autre comme solution?

Merci par avance de vos réponses.

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

Re: Erreur disque dur cible avec commande dd

#2 Post by cgrenier »

TestDisk aurait retrouver la partition NTFS à partir de son secteur de secours (backup boot sector) vers la fin du Deep Search.
Vu que ce n'est pas le cas, dans le menu Advanced, appuies sur la touche 'a' pour ajouter manuellement une partition commençant en "0 32 33", changes le type en NTFS, choisis Boot, RebuildBS, List. Si cela marche, choisis Write, confirm puis retrouve cette partition via Analyse, Quick Search... et choisis d'écrire une table des partitions avec cette
partition NTFS.

torrom
Posts: 4
Joined: 02 May 2014, 12:46

Re: Erreur disque dur cible avec commande dd

#3 Post by torrom »

Merci Christophe pour votre réponse rapide,

je suis arrêté après le RebuildBS, List ne produit aucune réaction...

Disk /dev/sdb - 164 GB / 153 GiB - CHS 20023 255 63
Partition Start End Size in sectors
HPFS - NTFS 0 32 33 20022 254 63 321667447

filesystem size 321667447 4882097157547832251
sectors_per_cluster 8 247
mft_lcn 4 4131064834327517177
mftmirr_lcn 12558463 16775521510437638977
clusters_per_mft_record -10 -30
clusters_per_index_record 1 35
Extrapolated boot sector and current boot sector are different.


[ Dump ] >[ List ] [ Write ] [ Quit ]
List directories and files

Encore merci.

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

Re: Erreur disque dur cible avec commande dd

#4 Post by cgrenier »

Pouvez-vous poster le contenu du fichier testdisk.log ? Il y aura peut-être plus d'info...

torrom
Posts: 4
Joined: 02 May 2014, 12:46

Re: Erreur disque dur cible avec commande dd

#5 Post by torrom »

bonjour,
voici le testdisk.log:

Code: Select all


Thu May 15 10:24:03 2014
Command line: TestDisk

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 3.2.0-38-generic (#61-Ubuntu SMP Tue Feb 19 12:18:21 UTC 2013) x86_64
Compiler: GCC 4.6
Compilation date: 2012-02-05T07:15:52
ext2fs lib: 1.42, ntfs lib: 10:0:0, reiserfs lib: none, ewf lib: none
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size       321672960 sectors
/dev/sda: user_max   321672960 sectors
/dev/sda: native_max 321672960 sectors
/dev/sda: dco        321672960 sectors
/dev/sdb: LBA, HPA, LBA48, DCO support
/dev/sdb: size       321672960 sectors
/dev/sdb: user_max   321672960 sectors
/dev/sdb: native_max 321672960 sectors
/dev/sdb: dco        321672960 sectors
/dev/sdc: LBA, HPA, DCO support
/dev/sdc: size       240121728 sectors
/dev/sdc: user_max   240121728 sectors
/dev/sdc: native_max 240121728 sectors
/dev/sdc: dco        240121728 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - CHS 1 1 1, sector size=512
Hard disk list
Disk /dev/sda - 164 GB / 153 GiB - CHS 20023 255 63, sector size=512 - Hitachi HDS721616PLA380, S/N:PVB300Z2TWGA0F, FW:P22OAB3A
Disk /dev/sdb - 164 GB / 153 GiB - CHS 20023 255 63, sector size=512 - Hitachi HDS721616PLA380, S/N:PVB300Z2TWENAF, FW:P22OAB3A
Disk /dev/sdc - 122 GB / 114 GiB - CHS 14946 255 63, sector size=512 - Maxtor 6B120P0, S/N:B40XLRRH, FW:BAH41B70

Partition table type (auto): None
Disk /dev/sdb - 164 GB / 153 GiB - Hitachi HDS721616PLA380
Partition table type: Intel

Analyse Disk /dev/sdb - 164 GB / 153 GiB - CHS 20023 255 63
Geometry from i386 MBR: head=64 sector=32
BAD_RS LBA=64 126
check_part_i386 failed for partition type 83
Current partition structure:
No ext2, JFS, Reiser, cramfs or XFS marker
 1 P Linux                    0   1  2   123 167 44    1986496
 1 P Linux                    0   1  2   123 167 44    1986496

Bad relative sector.
No partition is bootable
Ask the user for vista mode
Allow partial last cylinder : No
search_vista_part: 0

search_part()
Disk /dev/sdb - 164 GB / 153 GiB - CHS 20023 255 63

Results

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

write_mbr_i386: starting...
write_all_log_i386: starting...
No extended partition
Partition table type (auto): None

TestDisk exited normally.


Thu May 15 11:02:35 2014
Command line: TestDisk

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 3.2.0-38-generic (#61-Ubuntu SMP Tue Feb 19 12:18:21 UTC 2013) x86_64
Compiler: GCC 4.6
Compilation date: 2012-02-05T07:15:52
ext2fs lib: 1.42, ntfs lib: 10:0:0, reiserfs lib: none, ewf lib: none
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size       321672960 sectors
/dev/sda: user_max   321672960 sectors
/dev/sda: native_max 321672960 sectors
/dev/sda: dco        321672960 sectors
/dev/sdb: LBA, HPA, LBA48, DCO support
/dev/sdb: size       321672960 sectors
/dev/sdb: user_max   321672960 sectors
/dev/sdb: native_max 321672960 sectors
/dev/sdb: dco        321672960 sectors
/dev/sdc: LBA, HPA, DCO support
/dev/sdc: size       240121728 sectors
/dev/sdc: user_max   240121728 sectors
/dev/sdc: native_max 240121728 sectors
/dev/sdc: dco        240121728 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - CHS 1 1 1, sector size=512
Hard disk list
Disk /dev/sda - 164 GB / 153 GiB - CHS 20023 255 63, sector size=512 - Hitachi HDS721616PLA380, S/N:PVB300Z2TWGA0F, FW:P22OAB3A
Disk /dev/sdb - 164 GB / 153 GiB - CHS 20023 255 63, sector size=512 - Hitachi HDS721616PLA380, S/N:PVB300Z2TWENAF, FW:P22OAB3A
Disk /dev/sdc - 122 GB / 114 GiB - CHS 14946 255 63, sector size=512 - Maxtor 6B120P0, S/N:B40XLRRH, FW:BAH41B70

Partition table type (auto): None
Disk /dev/sdb - 164 GB / 153 GiB - Hitachi HDS721616PLA380
Partition table type: Intel

Analyse Disk /dev/sdb - 164 GB / 153 GiB - CHS 20023 255 63
Geometry from i386 MBR: head=64 sector=32
BAD_RS LBA=64 126
check_part_i386 failed for partition type 83
Current partition structure:
No ext2, JFS, Reiser, cramfs or XFS marker
 1 P Linux                    0   1  2   123 167 44    1986496
 1 P Linux                    0   1  2   123 167 44    1986496

Bad relative sector.
No partition is bootable
Ask the user for vista mode
SIGINT detected! TestDisk has been killed.


Thu May 15 11:08:19 2014
Command line: TestDisk

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 3.2.0-38-generic (#61-Ubuntu SMP Tue Feb 19 12:18:21 UTC 2013) x86_64
Compiler: GCC 4.6
Compilation date: 2012-02-05T07:15:52
ext2fs lib: 1.42, ntfs lib: 10:0:0, reiserfs lib: none, ewf lib: none
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size       321672960 sectors
/dev/sda: user_max   321672960 sectors
/dev/sda: native_max 321672960 sectors
/dev/sda: dco        321672960 sectors
/dev/sdb: LBA, HPA, LBA48, DCO support
/dev/sdb: size       321672960 sectors
/dev/sdb: user_max   321672960 sectors
/dev/sdb: native_max 321672960 sectors
/dev/sdb: dco        321672960 sectors
/dev/sdc: LBA, HPA, DCO support
/dev/sdc: size       240121728 sectors
/dev/sdc: user_max   240121728 sectors
/dev/sdc: native_max 240121728 sectors
/dev/sdc: dco        240121728 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - CHS 1 1 1, sector size=512
Hard disk list
Disk /dev/sda - 164 GB / 153 GiB - CHS 20023 255 63, sector size=512 - Hitachi HDS721616PLA380, S/N:PVB300Z2TWGA0F, FW:P22OAB3A
Disk /dev/sdb - 164 GB / 153 GiB - CHS 20023 255 63, sector size=512 - Hitachi HDS721616PLA380, S/N:PVB300Z2TWENAF, FW:P22OAB3A
Disk /dev/sdc - 122 GB / 114 GiB - CHS 14946 255 63, sector size=512 - Maxtor 6B120P0, S/N:B40XLRRH, FW:BAH41B70

Partition table type (auto): None
Disk /dev/sdb - 164 GB / 153 GiB - Hitachi HDS721616PLA380
Partition table type: Intel

Interface Advanced
Geometry from i386 MBR: head=64 sector=32
BAD_RS LBA=64 126
check_part_i386 failed for partition type 83
 1 P Linux                    0   1  2   123 167 44    1986496
Change partition type:
     HPFS - NTFS              0  32 33 20022 254 63  321667447

ntfs_boot_sector
     HPFS - NTFS              0  32 33 20022 254 63  321667447
filesystem size           4882097157547832251 955227893735231914
sectors_per_cluster       247 19
mft_lcn                   4131064834327517177 8600707852369745500
mftmirr_lcn               16775521510437638977 13313299568921938532
clusters_per_mft_record   -30 40
clusters_per_index_record 35 -92
Boot sector
Status: Bad

Backup boot sector
Status: Bad

Sectors are not identical.

A valid NTFS Boot sector must be present in order to access
any data; even if the partition is not bootable.
$MFT has invalid magic.
ntfs_mft_load(): Failed.
Failed to load $MFT: Erreur d'entrée/sortie.
Failed to startup volume: Erreur d'entrée/sortie.
$MFT has invalid magic.
ntfs_mft_load(): Failed.
Failed to load $MFT: Erreur d'entrée/sortie.
$MFT has invalid magic.
ntfs_mft_load(): Failed.
Failed to load $MFT: Erreur d'entrée/sortie.
Failed to startup volume: Erreur d'entrée/sortie.
$MFT has invalid magic.
ntfs_mft_load(): Failed.
Failed to load $MFT: Erreur d'entrée/sortie.
$MFT has invalid magic.
ntfs_mft_load(): Failed.
Failed to load $MFT: Erreur d'entrée/sortie.
Failed to startup volume: Erreur d'entrée/sortie.
$MFT has invalid magic.
ntfs_mft_load(): Failed.
Failed to load $MFT: Erreur d'entrée/sortie.
rebuild_NTFS_BS
mft at 62259142, seq=1, main=0 res=1
read_mft_info failed
ntfs_find_mft: sectors_per_cluster invalid
ntfs_find_mft: mft_lcn             2058
ntfs_find_mft: mftmirr_lcn         5162
ntfs_find_mft: mft_record_size     1024

mft at 62262246, seq=1, main=0 res=1
read_mft_info failed
ntfs_find_mft: sectors_per_cluster invalid
ntfs_find_mft: mft_lcn             2058
ntfs_find_mft: mftmirr_lcn         5162
ntfs_find_mft: mft_record_size     1024

mft at 100467704, seq=1, main=0 res=1
ntfs_find_mft: mft_lcn             4
ntfs_find_mft: mftmirr_lcn         12558463
Potential partition:
     HPFS - NTFS           3875 115 13 23898  82 43  321667447
ntfs_find_mft: sectors_per_cluster 8
ntfs_find_mft: mft_lcn             4
ntfs_find_mft: mftmirr_lcn         12558463
ntfs_find_mft: mft_record_size     1024
ntfs_find_mft: index_block_size    4096
             New / Current boot sector
filesystem size           321667447 4882097157547832251
sectors_per_cluster       8 247
mft_lcn                   4 4131064834327517177
mftmirr_lcn               12558463 16775521510437638977
clusters_per_mft_record   -10 -30
clusters_per_index_record 1 35
Extrapolated boot sector and current boot sector are different.
filesystem size           321667447 4882097157547832251
sectors_per_cluster       8 247
mft_lcn                   4 4131064834327517177
mftmirr_lcn               12558463 16775521510437638977
clusters_per_mft_record   -10 -30
clusters_per_index_record 1 35
ntfs_device_testdisk_io_ioctl() unimplemented
ntfs_device_testdisk_io_ioctl() unimplemented
Not an exFAT boot sector.
filesystem size           321667447 4882097157547832251
sectors_per_cluster       8 247
mft_lcn                   4 4131064834327517177
mftmirr_lcn               12558463 16775521510437638977
clusters_per_mft_record   -10 -30
clusters_per_index_record 1 35
ntfs_device_testdisk_io_ioctl() unimplemented
ntfs_device_testdisk_io_ioctl() unimplemented
Not an exFAT boot sector.
filesystem size           321667447 4882097157547832251
sectors_per_cluster       8 247
mft_lcn                   4 4131064834327517177
mftmirr_lcn               12558463 16775521510437638977
clusters_per_mft_record   -10 -30
clusters_per_index_record 1 35
ntfs_device_testdisk_io_ioctl() unimplemented
ntfs_device_testdisk_io_ioctl() unimplemented
Not an exFAT boot sector.
filesystem size           321667447 4882097157547832251
sectors_per_cluster       8 247
mft_lcn                   4 4131064834327517177
mftmirr_lcn               12558463 16775521510437638977
clusters_per_mft_record   -10 -30
clusters_per_index_record 1 35

ntfs_boot_sector
     HPFS - NTFS              0  32 33 20022 254 63  321667447
filesystem size           4882097157547832251 955227893735231914
sectors_per_cluster       247 19
mft_lcn                   4131064834327517177 8600707852369745500
mftmirr_lcn               16775521510437638977 13313299568921938532
clusters_per_mft_record   -30 40
clusters_per_index_record 35 -92
Boot sector
Status: Bad

Backup boot sector
Status: Bad

Sectors are not identical.

A valid NTFS Boot sector must be present in order to access
any data; even if the partition is not bootable.

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

Re: Erreur disque dur cible avec commande dd

#6 Post by cgrenier »

Cette fois-ci ajoutez manuellement une partition NTFS commençant en 3875 115 13, réessayer un Boot, RebuildBS, List et postez le nouveau log.

torrom
Posts: 4
Joined: 02 May 2014, 12:46

Re: Erreur disque dur cible avec commande dd

#7 Post by torrom »

bonjour,
cette fois List produit un résultat, mais pas ce qu'il faudrait......

Code: Select all

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
   L HPFS - NTFS           3875 115 13 20022 254 63  259410363
Directory /

>dr-xr-xr-x     0     0         0 15-Feb-2005 22:33 .
 dr-xr-xr-x     0     0         0 15-Feb-2005 22:33 ..
 dr-xr-xr-x     0     0         0 15-Feb-2005 22:33 System Volume Information



Use Right to change directory
    q to quit, : to select the current file, a to select all files
    C to copy the selected files, c to copy the current file
Le log....

Code: Select all


Thu May 22 16:28:38 2014
Command line: TestDisk

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 3.2.0-38-generic (#61-Ubuntu SMP Tue Feb 19 12:18:21 UTC 2013) x86_64
Compiler: GCC 4.6
Compilation date: 2012-02-05T07:15:52
ext2fs lib: 1.42, ntfs lib: 10:0:0, reiserfs lib: none, ewf lib: none
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size       321672960 sectors
/dev/sda: user_max   321672960 sectors
/dev/sda: native_max 321672960 sectors
/dev/sda: dco        321672960 sectors
/dev/sdb: LBA, HPA, LBA48, DCO support
/dev/sdb: size       321672960 sectors
/dev/sdb: user_max   321672960 sectors
/dev/sdb: native_max 321672960 sectors
/dev/sdb: dco        321672960 sectors
/dev/sdc: LBA, HPA, DCO support
/dev/sdc: size       240121728 sectors
/dev/sdc: user_max   240121728 sectors
/dev/sdc: native_max 240121728 sectors
/dev/sdc: dco        240121728 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - CHS 1 1 1, sector size=512
Hard disk list
Disk /dev/sda - 164 GB / 153 GiB - CHS 20023 255 63, sector size=512 - Hitachi HDS721616PLA380, S/N:PVB300Z2TWGA0F, FW:P22OAB3A
Disk /dev/sdb - 164 GB / 153 GiB - CHS 20023 255 63, sector size=512 - Hitachi HDS721616PLA380, S/N:PVB300Z2TWENAF, FW:P22OAB3A
Disk /dev/sdc - 122 GB / 114 GiB - CHS 14946 255 63, sector size=512 - Maxtor 6B120P0, S/N:B40XLRRH, FW:BAH41B70

Partition table type (auto): None
Disk /dev/sdb - 164 GB / 153 GiB - Hitachi HDS721616PLA380
Partition table type: Intel

Interface Advanced
Geometry from i386 MBR: head=64 sector=32
BAD_RS LBA=64 126
check_part_i386 failed for partition type 83
 1 P Linux                    0   1  2   123 167 44    1986496
Change partition type:
     HPFS - NTFS           3875 115 13 20022 254 63  259410363

ntfs_boot_sector
   L HPFS - NTFS           3875 115 13 20022 254 63  259410363
NTFS at 3875/115/13
heads/cylinder 16 (NTFS) != 255 (HD)
sect/track 2 (NTFS) != 63 (HD)
Info: size boot_sector 6174, partition 259410363
filesystem size           6174 955227893735231914
sectors_per_cluster       1 19
mft_lcn                   2058 8600707852369745500
mftmirr_lcn               5162 13313299568921938532
clusters_per_mft_record   2 40
clusters_per_index_record 8 -92
Boot sector
Warning: Incorrect number of heads/cylinder 16 (NTFS) != 255 (HD)
Warning: Incorrect number of sectors per track 2 (NTFS) != 63 (HD)
Status: OK

Backup boot sector
Status: Bad

Sectors are not identical.

A valid NTFS Boot sector must be present in order to access
any data; even if the partition is not bootable.
merci.

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

Re: Erreur disque dur cible avec commande dd

#8 Post by cgrenier »

Rien de concluant. Essayez PhotoRec. Activez le mode Expert dans le menu Options, lorsque PhotoRec vous le proposera, choisissez une taille de bloc/cluster de 512 octets, utilisez les valeurs par défaut sinon.
Bonne chance

Locked