Mauvaise manip avec dd, mon pc ne démarre plus Topic is solved

Utiliser TestDisk pour réparer le système de fichier
Locked
Message
Author
ShukatsuRonin
Posts: 2
Joined: 18 Mar 2013, 11:31

Mauvaise manip avec dd, mon pc ne démarre plus  Topic is solved

#1 Post by ShukatsuRonin » 18 Mar 2013, 11:54

Bonjour, j'ai commencé à parler de mon prolème sur ubuntu-fr.org. La totalité de la conversion se trouve ici.

Pour résumer la situation, j'ai commis l'erreur de diriger la commande dd vers mon sda lors de la tentative de création d'une live-usb :oops:
Mon pc date de 2011. Il est en double amorçage Win7/Xubuntu. De mémoire, Il était partiionné ainsi : mbr, Windows drv (c'est testdisk qui m'a rappelé cette dernière), Windows 7, /boot, /, /home, swap, Lenovo Recovery et de petits espaces non-alloués au milieu.

La commande dd if=/proc/partitions | hexdump -C | less me donne ceci :

Code: Select all

00000000  6d 61 6a 6f 72 20 6d 69  6e 6f 72 20 20 23 62 6c  |major minor  #bl|
00000010  6f 63 6b 73 20 20 6e 61  6d 65 0a 0a 20 20 20 37  |ocks  name..   7|
00000020  20 20 20 20 20 20 20 20  30 20 20 20 20 20 20 36  |        0      6|
00000030  31 37 32 38 20 6c 6f 6f  70 30 0a 20 20 20 37 20  |1728 loop0.   7 |
00000040  20 20 20 20 20 20 20 31  20 20 20 20 20 32 33 31  |       1     231|
00000050  30 37 36 20 6c 6f 6f 70  31 0a 20 20 20 38 20 20  |076 loop1.   8  |
00000060  20 20 20 20 20 20 30 20  20 33 31 32 35 37 31 32  |      0  3125712|
00000070  32 34 20 73 64 61 0a 20  20 20 38 20 20 20 20 20  |24 sda.   8     |
00000080  20 20 20 31 20 20 20 20  20 20 20 34 30 39 36 20  |   1       4096 |
00000090  73 64 61 31 0a 20 20 20  38 20 20 20 20 20 20 20  |sda1.   8       |
000000a0  20 32 20 20 20 20 20 39  37 31 35 37 34 20 73 64  | 2     971574 sd|
000000b0  61 32 0a 20 20 20 38 20  20 20 20 20 20 20 31 36  |a2.   8       16|
000000c0  20 20 20 20 33 39 31 35  37 37 36 20 73 64 62 0a  |    3915776 sdb.|
000000d0  20 20 20 38 20 20 20 20  20 20 20 31 37 20 20 20  |   8       17   |
000000e0  20 33 39 31 33 31 36 31  20 73 64 62 31 0a        | 3913161 sdb1.|
000000ee
La recherche rapide avec testdisk arrive à ce résultat :

Code: Select all

Disk /dev/sda - 320 GB / 298 GiB - CHS 38913 255 63
     Partition               Start        End    Size in sectors
>* FAT12                    0   6 27     0 136 28       8192 [BOOT]
 P HPFS - NTFS            153  27  3  3722 154 16   57344000 [Windows7_OS]
 P Linux                 3722 186 49  3746 243 17     389120
 L Linux                 3747  20 50  4962 191 29   19529728
 L Linux                 4962 223 62 37150 245 23  517101568
 L HPFS - NTFS          37638  83 14 38913  37 36   20480000 [Lenovo_Recovery]
Pas de trace du swap donc.

J'ai lancé la recherche approfondie qui m'a donné cette conclusion :

Code: Select all

Disk /dev/sda - 320 GB / 298 GiB - CHS 38913 255 63

The harddisk (320 GB / 298 GiB) seems too small! (< 3436 GB / 3200 GiB)
Check the harddisk size: HD jumpers settings, BIOS detection...

The following partitions can't be recovered:
     Partition               Start        End    Size in sectors
>  Linux                20905 201 33 53093 222 57  517101568
   FAT12                188427 109 25 417808  94 31 3685004827
Me doutant que ce ne sera pas suffisant, je joins le fichier log

Code: Select all

Sun Mar 17 19:00:58 2013
Command line: TestDisk

TestDisk 6.14-WIP, Data Recovery Utility, September 2012
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 3.7.9-pmagic64 (#1 SMP PREEMPT Sun Feb 17 21:06:23 CST 2013) x86_64
Compiler: GCC 4.7
Compilation date: 2013-02-16T11:38:45
ext2fs lib: 1.42.7, ntfs lib: libntfs-3g, reiserfs lib: 0.3.0.5, ewf lib: none
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size       625142448 sectors
/dev/sda: user_max   625142448 sectors
/dev/sda: native_max 625142448 sectors
/dev/sda: dco        625142448 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 1 sectors, sector size=512
Hard disk list
Disk /dev/sda - 320 GB / 298 GiB - CHS 38913 255 63, sector size=512 - WDC WD3200BEVT-08A23T1, S/N:WD-WXJ1A21K1456, FW:02.01A02
Disk /dev/sdb - 4009 MB / 3824 MiB - CHS 1018 124 62, sector size=512 - BUFFALO USB Flash Disk, FW:4000

Partition table type (auto): None
Disk /dev/sda - 320 GB / 298 GiB - WDC WD3200BEVT-08A23T1
Partition table type: Intel

Analyse Disk /dev/sda - 320 GB / 298 GiB - CHS 38913 255 63
Geometry from i386 MBR: head=64 sector=32
BAD_RS LBA=404 776
check_part_i386 1 type EF: no test
BAD_RS LBA=8596 65036
check_part_i386 failed for partition type 83
Current partition structure:
 1 * EFI (FAT-12/16/32)       0   6 27     0 136 28       8192

Bad relative sector.
No ext2, JFS, Reiser, cramfs or XFS marker
 2 P Linux                    0 136 29   121 125  4    1943148
 2 P Linux                    0 136 29   121 125  4    1943148

Bad relative sector.

search_part()
Disk /dev/sda - 320 GB / 298 GiB - CHS 38913 255 63
FAT12 at 0/6/27
FAT1 : 1-6
FAT2 : 7-12
start_rootdir : 13
Data : 45-8188
sectors : 8192
cluster_size : 4
no_of_cluster : 2036 (2 - 2037)
fat_length 6 calculated 6
heads/cylinder 64 (FAT) != 255 (HD)
sect/track 32 (FAT) != 63 (HD)

FAT12 at 0/6/27
     FAT12                    0   6 27     0 136 28       8192 [BOOT]
     FAT12, blocksize=2048, 4194 KB / 4096 KiB
NTFS at 153/27/3
filesystem size           57343993
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     HPFS - NTFS            153  27  3  3722 154  9   57343993 [Windows7_OS]
     NTFS, blocksize=4096, 29 GB / 27 GiB

recover_EXT2: s_block_group_nr=0/23, s_mnt_count=218/4294967295, s_blocks_per_group=8192, s_inodes_per_group=2032
recover_EXT2: s_blocksize=1024
recover_EXT2: s_blocks_count 194560
recover_EXT2: part_size 389120
     Linux                 3722 186 49  3746 243 17     389120
     ext4 blocksize=1024 Sparse superblock, 199 MB / 190 MiB

recover_EXT2: s_block_group_nr=0/74, s_mnt_count=218/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8144
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 2441216
recover_EXT2: part_size 19529728
     Linux                 3747  20 50  4962 191 29   19529728
     ext4 blocksize=4096 Large file Sparse superblock, 9999 MB / 9536 MiB

recover_EXT2: s_block_group_nr=0/1972, s_mnt_count=218/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 64637696
recover_EXT2: part_size 517101568
     Linux                 4962 223 62 37150 245 23  517101568
     ext4 blocksize=4096 Large file Sparse superblock, 264 GB / 246 GiB
NTFS at 37638/83/14
filesystem size           20480000
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     HPFS - NTFS          37638  83 14 38913  37 36   20480000 [Lenovo_Recovery]
     NTFS, blocksize=4096, 10485 MB / 10000 MiB

Results
   * FAT12                    0   6 27     0 136 28       8192 [BOOT]
     FAT12, blocksize=2048, 4194 KB / 4096 KiB
   P HPFS - NTFS            153  27  3  3722 154 16   57344000 [Windows7_OS]
     NTFS, blocksize=4096, 29 GB / 27 GiB
   P Linux                 3722 186 49  3746 243 17     389120
     ext4 blocksize=1024 Sparse superblock, 199 MB / 190 MiB
   L Linux                 3747  20 50  4962 191 29   19529728
     ext4 blocksize=4096 Large file Sparse superblock, 9999 MB / 9536 MiB
   L Linux                 4962 223 62 37150 245 23  517101568
     ext4 blocksize=4096 Large file Sparse superblock, 264 GB / 246 GiB
   L HPFS - NTFS          37638  83 14 38913  37 36   20480000 [Lenovo_Recovery]
     NTFS, blocksize=4096, 10485 MB / 10000 MiB
add_ext_part_i386: max
add_ext_part_i386: max

interface_write()
 1 * FAT12                    0   6 27     0 136 28       8192 [BOOT]
 2 P HPFS - NTFS            153  27  3  3722 154 16   57344000 [Windows7_OS]
 3 P Linux                 3722 186 49  3746 243 17     389120
 4 E extended LBA          3746 243 18 38913  70  5  564946944
 5 L Linux                 3747  20 50  4962 191 29   19529728
 6 L Linux                 4962 223 62 37150 245 23  517101568
 7 L HPFS - NTFS          37638  83 14 38913  37 36   20480000 [Lenovo_Recovery]

search_part()
Disk /dev/sda - 320 GB / 298 GiB - CHS 38913 255 63
FAT12 at 0/6/27
FAT1 : 1-6
FAT2 : 7-12
start_rootdir : 13
Data : 45-8188
sectors : 8192
cluster_size : 4
no_of_cluster : 2036 (2 - 2037)
fat_length 6 calculated 6
heads/cylinder 64 (FAT) != 255 (HD)
sect/track 32 (FAT) != 63 (HD)

FAT12 at 0/6/27
     FAT12                    0   6 27     0 136 28       8192 [BOOT]
     FAT12, blocksize=2048, 4194 KB / 4096 KiB
NTFS at 153/27/2
filesystem size           2457600
sectors_per_cluster       8
mft_lcn                   102400
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     HPFS - NTFS              0  32 33   153  27  2    2457600 [SYSTEM_DRV]
     NTFS found using backup sector, blocksize=4096, 1258 MB / 1200 MiB
NTFS at 153/27/3
filesystem size           57343993
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     HPFS - NTFS            153  27  3  3722 154  9   57343993 [Windows7_OS]
     NTFS, blocksize=4096, 29 GB / 27 GiB
NTFS at 3722/154/16
filesystem size           57343993
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     HPFS - NTFS            153  27 10  3722 154 16   57343993
     NTFS found using backup sector, blocksize=4096, 29 GB / 27 GiB

recover_EXT2: s_block_group_nr=0/23, s_mnt_count=218/4294967295, s_blocks_per_group=8192, s_inodes_per_group=2032
recover_EXT2: s_blocksize=1024
recover_EXT2: s_blocks_count 194560
recover_EXT2: part_size 389120
     Linux                 3722 186 49  3746 243 17     389120
     ext4 blocksize=1024 Sparse superblock, 199 MB / 190 MiB

block_group_nr 1

recover_EXT2: "e2fsck -b 8193 -B 1024 device" may be needed
recover_EXT2: s_block_group_nr=1/23, s_mnt_count=0/4294967295, s_blocks_per_group=8192, s_inodes_per_group=2032
recover_EXT2: s_blocksize=1024
recover_EXT2: s_blocks_count 194560
recover_EXT2: part_size 389120
     Linux                 3722 186 47  3746 243 15     389120
     ext4 blocksize=1024 Sparse superblock Backup superblock, 199 MB / 190 MiB

block_group_nr 3

recover_EXT2: "e2fsck -b 24577 -B 1024 device" may be needed
recover_EXT2: s_block_group_nr=3/23, s_mnt_count=0/4294967295, s_blocks_per_group=8192, s_inodes_per_group=2032
recover_EXT2: s_blocksize=1024
recover_EXT2: s_blocks_count 194560
recover_EXT2: part_size 389120
     Linux                 3722 186 47  3746 243 15     389120
     ext4 blocksize=1024 Sparse superblock Backup superblock, 199 MB / 190 MiB

block_group_nr 5

recover_EXT2: "e2fsck -b 40961 -B 1024 device" may be needed
recover_EXT2: s_block_group_nr=5/23, s_mnt_count=0/4294967295, s_blocks_per_group=8192, s_inodes_per_group=2032
recover_EXT2: s_blocksize=1024
recover_EXT2: s_blocks_count 194560
recover_EXT2: part_size 389120
     Linux                 3722 186 47  3746 243 15     389120
     ext4 blocksize=1024 Sparse superblock Backup superblock, 199 MB / 190 MiB

block_group_nr 7

recover_EXT2: "e2fsck -b 57345 -B 1024 device" may be needed
recover_EXT2: s_block_group_nr=7/23, s_mnt_count=0/4294967295, s_blocks_per_group=8192, s_inodes_per_group=2032
recover_EXT2: s_blocksize=1024
recover_EXT2: s_blocks_count 194560
recover_EXT2: part_size 389120
     Linux                 3722 186 47  3746 243 15     389120
     ext4 blocksize=1024 Sparse superblock Backup superblock, 199 MB / 190 MiB

block_group_nr 9

recover_EXT2: "e2fsck -b 73729 -B 1024 device" may be needed
recover_EXT2: s_block_group_nr=9/23, s_mnt_count=0/4294967295, s_blocks_per_group=8192, s_inodes_per_group=2032
recover_EXT2: s_blocksize=1024
recover_EXT2: s_blocks_count 194560
recover_EXT2: part_size 389120
     Linux                 3722 186 47  3746 243 15     389120
     ext4 blocksize=1024 Sparse superblock Backup superblock, 199 MB / 190 MiB

recover_EXT2: s_block_group_nr=0/74, s_mnt_count=218/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8144
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 2441216
recover_EXT2: part_size 19529728
     Linux                 3747  20 50  4962 191 29   19529728
     ext4 blocksize=4096 Large file Sparse superblock, 9999 MB / 9536 MiB

recover_EXT2: s_block_group_nr=0/74, s_mnt_count=217/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8144
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 2441216
recover_EXT2: part_size 19529728
     Linux                 4289   2  2  5504 172 44   19529728
     ext4 blocksize=4096 Large file Sparse superblock Recover, 9999 MB / 9536 MiB

recover_EXT2: s_block_group_nr=0/74, s_mnt_count=193/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8144
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 2441216
recover_EXT2: part_size 19529728
     Linux                 4295 227 29  5511 143  8   19529728
     ext4 blocksize=4096 Large file Sparse superblock Recover, 9999 MB / 9536 MiB

recover_EXT2: s_block_group_nr=0/74, s_mnt_count=193/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8144
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 2441216
recover_EXT2: part_size 19529728
     Linux                 4296   0  1  5511 170 43   19529728
     ext4 blocksize=4096 Large file Sparse superblock Recover, 9999 MB / 9536 MiB

recover_EXT2: s_block_group_nr=0/74, s_mnt_count=193/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8144
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 2441216
recover_EXT2: part_size 19529728
     Linux                 4296  69 62  5511 240 41   19529728
     ext4 blocksize=4096 Large file Sparse superblock Recover, 9999 MB / 9536 MiB

recover_EXT2: s_block_group_nr=0/74, s_mnt_count=182/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8144
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 2441216
recover_EXT2: part_size 19529728
     Linux                 4301  30 18  5516 200 60   19529728
     ext4 blocksize=4096 Large file Sparse superblock Recover, 9999 MB / 9536 MiB

recover_EXT2: s_block_group_nr=0/1972, s_mnt_count=218/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 64637696
recover_EXT2: part_size 517101568
     Linux                 4962 223 62 37150 245 23  517101568
     ext4 blocksize=4096 Large file Sparse superblock, 264 GB / 246 GiB
BAD_RS LBA=3027086646 16206995
check_FAT: can't read FAT boot sector
check_part_i386 failed for partition type 01
     FAT12                188427 109 25 417808  94 31 3685004827
This partition ends after the disk limits. (start=3027086646, size=3685004827, end=2417124176, disk end=625142448)

recover_EXT2: s_block_group_nr=0/1972, s_mnt_count=218/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 64637696
recover_EXT2: part_size 517101568
     Linux                20905 201 33 53093 222 57  517101568
     ext4 blocksize=4096 Large file Sparse superblock Recover, 264 GB / 246 GiB
This partition ends after the disk limits. (start=335851520, size=517101568, end=852953087, disk end=625142448)
NTFS at 37638/83/14
filesystem size           20480000
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     HPFS - NTFS          37638  83 14 38913  37 36   20480000 [Lenovo_Recovery]
     NTFS, blocksize=4096, 10485 MB / 10000 MiB
NTFS at 38913/37/36
filesystem size           20480000
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     HPFS - NTFS          37638  83 14 38913  37 36   20480000 [Lenovo_Recovery]
     NTFS found using backup sector, blocksize=4096, 10485 MB / 10000 MiB
NTFS at 153/27/2
filesystem size           2457600
sectors_per_cluster       8
mft_lcn                   102400
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
NTFS at 153/27/3
filesystem size           57343993
sectors_per_cluster       8
mft_lcn     
Merci d'avance

Sponsored links

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

Re: Mauvaise manip avec dd, mon pc ne démarre plus

#2 Post by cgrenier » 24 Mar 2013, 09:41

La conclusion du Deeper Search manque, elle se trouve sur l'écran suivant...
Si toutes les partitions sont listés après Quick Search sauf le swap, on peut choisir Write et confirmer.
Et après un reboot, recréer une partition de swap.

ShukatsuRonin
Posts: 2
Joined: 18 Mar 2013, 11:31

Re: Mauvaise manip avec dd, mon pc ne démarre plus

#3 Post by ShukatsuRonin » 24 Mar 2013, 16:14

En fait, il y a eu quelques embûches supplémentaires, par exemple, après write le secteur de boot de l'iso - qui avait été écrit au début du disque dur - était toujours présent et empêchait le démarrage. Il a fallu effacer la toute première partition, labellisée par erreur boot, pour que mon ordinateur puisse être lancé.

En tout état de cause, à l'exception de la partition recovery de Win7 que grub refuse toujours d'afficher, tout semble être rentré dans l'ordre.

Un très, très grand merci pour le fabuleux outil qu'est testdisk.

P.S. : pour ceux que le détail pourrait intéresser, l'aide que j'ai reçue et qui m'a permis d'en arriver à résoudre le problème, se trouve dans le fil en lien dans mon 1er message.

Locked

Who is online

Users browsing this forum: No registered users and 1 guest