Et d'abord, un grand merci au développeur de Testdisk et de Photorec, qui n'ont permis il y quelques années de récupérer les documents de thèse d'un ami, sur un disque qui avait pris chaud.
Mon problème actuel devrait pouvoir se régler facilement via Testdisk, mais je ne sais pas quelle est bonne option prendre, ni trop comment m'y prendre.
Origine du mal: En testant la version live de la distribution linux Netrunner, j'ai essayé leur utilitaire d'installation. J'ai été jusqu'à l'étape de partitionnement. Il me semble que c'est le scan effectué à ce moment là qui a corrompu mes partitions.
Le mal, avant 18h: J'ai deux partitions logiques, la première formatée en ext2, la seconde contenant deux partitions étendues en ext4 (une pour mon système, l'autre pour mes données /home). Les gestionnaires de partition comme Gparted les voient comme "non formatées"... et donc, ne les lisent pas, ne les montent pas, etc.
Le mal, après 18h: vu que testdisk voyait mes partitions et mes données, j'ai tenté un WRITE. Mais depuis, le disque semble vide.
Voici le résultat des tests courants, AVANT 18h:
- Test SMART
Code: Select all
live@live-pc:~$ sudo smartctl -s on -a /dev/sda
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.8.0-1-amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Seagate Maxtor DiamondMax 20
Device Model: MAXTOR STM3160211AS
Serial Number: 6PT40KKG
Firmware Version: 3.AAE
User Capacity: 160,041,885,696 bytes [160 GB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA/ATAPI-7 (minor revision not indicated)
Local Time is: Wed Feb 1 12:37:32 2017 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
See vendor-specific Attribute list for marginal Attributes.
General SMART Values:
Offline data collection status: (0x82) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 430) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 54) minutes.
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 113 095 006 Pre-fail Always - 168297440
3 Spin_Up_Time 0x0003 095 095 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 099 099 020 Old_age Always - 1853
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 086 060 030 Pre-fail Always - 417063585
9 Power_On_Hours 0x0032 069 069 000 Old_age Always - 27365
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 099 099 020 Old_age Always - 1852
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 052 039 045 Old_age Always In_the_past 48 (Min/Max 28/48 #687)
194 Temperature_Celsius 0x0022 048 061 000 Old_age Always - 48 (0 15 0 0 0)
195 Hardware_ECC_Recovered 0x001a 062 048 000 Old_age Always - 203454584
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 1
200 Multi_Zone_Error_Rate 0x0000 100 253 000 Old_age Offline - 0
202 Data_Address_Mark_Errs 0x0032 100 253 000 Old_age Always - 0
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 27364 -
# 2 Short offline Completed without error 00% 12718 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
- SFDISK ensuite, qui reconnait bien toutes mes partitions (avant 18h. Puisque après mon WRITE, il ne voit plus rien)
Code: Select all
live@live-pc:~$ sudo sfdisk -luS
Disk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00052622
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 6836223 6834176 3.3G 83 Linux
/dev/sda2 6838270 312580095 305741826 145.8G 5 Extended
/dev/sda5 6838272 14649343 7811072 3.7G 82 Linux swap / Solaris
/dev/sda6 14651392 57618431 42967040 20.5G 83 Linux
/dev/sda7 57620480 312580095 254959616 121.6G 83 Linux
- DSMEG
Même si je n'ai jamais compris l'intérêt de cette commande, je sais qu'elle intéresse des experts
Code: Select all
live@live-pc:~$ sudo dmesg|tail
[ 1935.195523] IPv6: ADDRCONF(NETDEV_UP): wlp4s7: link is not ready
[ 2134.746730] sda: sda1 sda2 < sda5 sda6 sda7 >
[ 2195.271936] systemd[1]: apt-daily.timer: Adding 11h 9min 28.107487s random time.
[ 2195.606708] systemd[1]: apt-daily.timer: Adding 10h 41min 24.900907s random time.
[ 2195.709616] systemd[1]: apt-daily.timer: Adding 21min 55.624563s random time.
[ 2195.810738] systemd[1]: apt-daily.timer: Adding 10h 57min 945.087ms random time.
[ 2195.937045] systemd[1]: apt-daily.timer: Adding 7h 29min 18.055063s random time.
[ 2203.106080] systemd[1]: apt-daily.timer: Adding 47min 51.428653s random time.
[ 2204.487459] systemd[1]: apt-daily.timer: Adding 42min 54.166161s random time.
[ 2250.234759] IPv6: ADDRCONF(NETDEV_UP): wlp4s7: link is not ready
- TestDisk
Testdisk voit mes partitions sans Quicksearch. La recherche simple me permet de naviguer dans la partition de mon /home. Il a fallu une recherche profonde pour retrouver également la partition contenant ma racine.
Je les ai notées L ici
Code: Select all
Disk /dev/sda - 160 GB / 149 GiB - CHS 19457 255 63
Partition Start End Size in sectors
>D Linux 0 32 33 19196 65 5 308385792
D Linux 127 252 62 4054 112 26 63078400
D Linux Swap 425 169 1 911 224 17 7811072
D Linux 677 177 13 4604 36 40 63078400
L Linux 912 1 50 3586 148 18 42967040
D Linux 2243 44 42 4917 191 10 42967040
L Linux 3586 180 51 19457 53 52 254959616
D FAT12 11772 182 59 11773 90 29 10240 [ElTorito]
Structure: Ok. Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
*=Primary bootable P=Primary L=Logical E=Extended D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
Enter: to continue
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 157 GB / 147 GiB
1) Après ma recherche profonde, le message d'avertissement suivant m'a été donné
Code: Select all
Disk /dev/sda - 160 GB / 149 GiB - CHS 19457 255 63
Warning: the current number of heads per cylinder is 255
but the correct value may be 128.
You can use the Geometry menu to change this value.
It's something to try if
- some partitions are not found by TestDisk
- or the partition table can not be written because partitions overlaps.
2) En visitant la partition contenant le home de mon Testdisk, je peux visiter tous les dossiers, sauf mon dossier principal (dossier grishka), qui apparaît étrangement...
Code: Select all
drwxr-xr-x 0 0 4096 10-Apr-2014 22:12 ..
drwx------ 0 0 16384 12-May-2014 11:53 lost+found
?rwsrwsrwt 65535 65535 18446744073709551615 7-Feb-2106 06:28 grishka
drwxr-xr-x 1001 1002 4096 25-Jun-2015 21:45 autre
drwx------ 1001 11 4096 27-Aug-2015 19:36 invit
Après le WRITE fait à 18h, les partitions n'étaient plus reconnues par un gestionnaire de partitions et le MBR semblait déterrioré puisque maintenant testdisk m'indique
Code: Select all
Partition sector doesn't have the endmark 0xAA55
J'ai déjà fait de la récupération de données sur disque endommagé, j'ai déjà réparé des partitions corrompues, mais là je ne sais pas trop à quoi correspond mon problème.
Est-ce qu'une simple manip sur les secteurs et les cylindres peut me permettre de réutiliser mon disque sans avoir besoin d'aller chercher/copier/coller les données, ou d'effectuer une image (ce qui signifie que je dois acheter un nouveau disque provisoirement, etc.)?
Le problème s'étant empiré, je ne touche plus à rien avant conseil d'un expert.
Merci pour votre lecture!