Bonjour,
Voici le problème : suite à un plantage de mon portable (Macbook Air sous Ubuntu 17.10), il est désormais impossible de monter un disque dur USB externe (WD Passport 1To), formaté en ext4 et crypté avec LUKS. A la connexion du disque il est reconnu comme crypté, la saisie du mot de passe et l’authentification se passent normalement, mais impossible de monter la partition cryptée.
Le message d'erreur cryptique est le suivant :
Error mounting /dev/dm-0 at /media/aris/1To: Command-line `mount -t "ext4" -o "uhelper=udisk2,node,nosuid"
"/dev/dm-0" "/media/aris/1To" exited with non-zero exit status 32: mount /media/aris/1To: can't read superblock
on /dev/mapper/luks-71a99279-65e3-4b52-b7f7-1f8e7d77d1f6
(udisks-error-quark, 0)
Après lecture de divers fils de discussion sur ce Forum et une recherche Google, j'ai collecté les infos suivantes
parted
aris@MacBookAir-Linux:~$ sudo parted -l
Modèle: ATA APPLE SSD SM128E (scsi)
Disque /dev/sda : 121GB
Taille des secteurs (logiques/physiques): 512B/4096B
Table de partitions : gpt
Disk Flags:
Numéro Début Fin Taille Système de fichiers Nom Fanions
1 1049kB 538MB 537MB fat32 EFI System Partition démarrage, esp
2 538MB 121GB 121GB ext4
Modèle: WD My Passport 0730 (scsi)
Disque /dev/sdc : 1000GB
Taille des secteurs (logiques/physiques): 512B/512B
Table de partitions : gpt
Disk Flags:
Numéro Début Fin Taille Système de fichiers Nom Fanions
1 20,5kB 210MB 210MB fat32 EFI System Partition démarrage, esp
2 210MB 1000GB 1000GB Apple_HFS_Untitled_1
Modèle: Mappeur de périphériques Linux (crypt) (dm)
Disque /dev/mapper/luks-71a99279-65e3-4b52-b7f7-1f8e7d77d1f6 : 1000GB
Taille des secteurs (logiques/physiques): 512B/512B
Table de partitions : loop
Disk Flags:
Numéro Début Fin Taille Système de fichiers Fanions
1 0,00B 1000GB 1000GB ext4
aris@MacBookAir-Linux:~$
blkid
aris@MacBookAir-Linux:~$ sudo blkid
/dev/sdc2: UUID="71a99279-65e3-4b52-b7f7-1f8e7d77d1f6" TYPE="crypto_LUKS" PARTLABEL="Apple_HFS_Untitled_1" PARTUUID="8639246b-2484-44cd-a9e1-89d93651612b"
/dev/sda1: UUID="430E-C8F3" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="7f62cf63-6b8f-461c-8562-80ab7d30390c"
/dev/sda2: UUID="3d8a2096-b06b-40b6-bdf9-3c2c2b715a75" TYPE="ext4" PARTUUID="ef587fa6-2f00-48d5-8a0e-43d906090f0b"
/dev/sdc1: LABEL="EFI" UUID="04F9-1905" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="8e339c33-db52-4b47-8781-ebbfa1f11771"
/dev/mapper/luks-71a99279-65e3-4b52-b7f7-1f8e7d77d1f6: LABEL="1To" UUID="c535dec1-ae6c-48ee-87d8-6564b8cee286" TYPE="ext4"
aris@MacBookAir-Linux:~$
lsblk
aris@MacBookAir-Linux:~$ sudo lsblk -o SIZE,NAME,FSTYPE,LABEL,MOUNTPOINT
SIZE NAME FSTYPE LABEL MOUNTPOINT
113G sda
512M ├─sda1 vfat /boot/efi
112,5G └─sda2 ext4 /
931,5G sdc
200M ├─sdc1 vfat EFI
931,2G └─sdc2 crypto_LUKS
931,2G └─luks-71a99279-65e3-4b52-b7f7-1f8e7d77d1f6
ext4 1To
aris@MacBookAir-Linux:~$
smartctl
aris@MacBookAir-Linux:~$ sudo smartctl -s on -a /dev/sdc
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.13.0-17-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Western Digital Elements / My Passport (USB, AF)
Device Model: WDC WD10TMVW-11ZSMS1
Serial Number: WD-WXK1AA037022
LU WWN Device Id: 5 0014ee 158c03764
Firmware Version: 01.01A01
User Capacity: 1 000 204 886 016 bytes [1,00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5200 rpm
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS (minor revision not indicated)
SATA Version is: SATA 2.6, 3.0 Gb/s
Local Time is: Mon Nov 27 04:58:48 2017 CET
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 Status command failed: scsi error unsupported field in scsi command
SMART overall-health self-assessment test result: PASSED
Warning: This result is based on an Attribute check.
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
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: (24000) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
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: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 275) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x7035) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0
3 Spin_Up_Time 0x0027 179 163 021 Pre-fail Always - 4041
4 Start_Stop_Count 0x0032 093 093 000 Old_age Always - 7719
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9 Power_On_Hours 0x0032 089 089 000 Old_age Always - 8718
10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 324
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 56
193 Load_Cycle_Count 0x0032 184 184 000 Old_age Always - 48952
194 Temperature_Celsius 0x0022 127 103 000 Old_age Always - 23
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline - 0
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
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.
aris@MacBookAir-Linux:~$
Par ailleurs, avec l'utilitaire
testdisk (extraits)
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
Disk /dev/dm-0 - 999 GB / 931 GiB - 1952782256 sectors
Partition Start End Size in sectors
ext4 0 1952782255 1952782256 [1To]
superblock 0, blocksize=4096 [1To]
superblock 32768, blocksize=4096 [1To]
superblock 98304, blocksize=4096 [1To]
superblock 163840, blocksize=4096 [1To]
superblock 229376, blocksize=4096 [1To]
superblock 294912, blocksize=4096 [1To]
superblock 819200, blocksize=4096 [1To]
superblock 884736, blocksize=4096 [1To]
superblock 1605632, blocksize=4096 [1To]
superblock 2654208, blocksize=4096 [1To]
To repair the filesystem using alternate superblock, run
fsck.ext4 -p -b superblock -B blocksize device
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
Disk /dev/mapper/luks-71a99279-65e3-4b52-b7f7-1f8e7d77d1f6 - 999 GB / 931 GiB - 1952782256 sectors
Partition Start End Size in sectors
ext4 0 1952782255 1952782256 [1To]
superblock 0, blocksize=4096 [1To]
superblock 32768, blocksize=4096 [1To]
superblock 98304, blocksize=4096 [1To]
superblock 163840, blocksize=4096 [1To]
superblock 229376, blocksize=4096 [1To]
superblock 294912, blocksize=4096 [1To]
superblock 819200, blocksize=4096 [1To]
superblock 884736, blocksize=4096 [1To]
superblock 1605632, blocksize=4096 [1To]
superblock 2654208, blocksize=4096 [1To]
To repair the filesystem using alternate superblock, run
fsck.ext4 -p -b superblock -B blocksize device
Toute aide/conseil est la bienvenue (on s'en doute)
;-)