Mounting external encrpyted SATA SSD

I have an encrypted SATA SSD from a laptop that was running tumbleweed yesterday and now has hardware display errors. I have removed this drive from the laptop. I have a USB-SATA adapter+power kit that I was expecting to just be able to plug this drive into and mount with the drive password on another laptop to retrieve data.

  1. The power and USB indicator lights on the adapter kit light up.
  2. Plugging the USB cable into another laptop running tumbleweed and KDE produces the normal audio indicator that a drive has been plugged in, but the drive does not appear in dolphin (the KDE graphical file manager) under devices.
  3. I don’t see any new devices with df.

How do I get this drive mounted?

Being an USB device:

  • Unplug the device
  • Run dmesg --follow
  • Plug in the device again
  • Share the output you got after plug in
[257714.074547] [ T154212] usb 3-5: new high-speed USB device number 11 using xhci_hcd
[257714.199064] [ T154212] usb 3-5: New USB device found, idVendor=152d, idProduct=2338, bcdDevice= 1.00
[257714.199074] [ T154212] usb 3-5: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[257714.199077] [ T154212] usb 3-5: Product: USB to ATA/ATAPI bridge
[257714.199079] [ T154212] usb 3-5: Manufacturer: JMicron
[257714.199081] [ T154212] usb 3-5: SerialNumber: 131788094247
[257714.202831] [ T154212] usb-storage 3-5:1.0: USB Mass Storage device detected
[257714.203588] [ T154212] scsi host0: usb-storage 3-5:1.0
[257715.285189] [ T154587] scsi 0:0:0:0: Direct-Access     SAMSUNG  MZ7LN256HAJQ-000      PQ: 0 ANSI: 2 CCS
[257715.285977] [ T154587] sd 0:0:0:0: Attached scsi generic sg0 type 0
[257715.287409] [ T154585] sd 0:0:0:0: [sda] 62514774 4096-byte logical blocks: (256 GB/238 GiB)
[257715.288400] [ T154585] sd 0:0:0:0: [sda] Write Protect is off
[257715.288407] [ T154585] sd 0:0:0:0: [sda] Mode Sense: 28 00 00 00
[257715.289170] [ T154585] sd 0:0:0:0: [sda] No Caching mode page found
[257715.289177] [ T154585] sd 0:0:0:0: [sda] Assuming drive cache: write through
[257715.302304] [ T154585] sd 0:0:0:0: [sda] Attached SCSI disk

So it is detected as a mass storage device.

maybe now look if there is any partitioning and/or detection of file systems possible:

lsblk -f

and maybe

fdisk -l

It would be useful as well to know what was used to encrypt the drive.

fdisk -l shows:

Disk /dev/sda: 238.47 GiB, 256060514304 bytes, 62514774 sectors
Disk model: MZ7LN256HAJQ-000
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start      End  Sectors   Size Id Type
/dev/sda1           1 62514773 62514773 238.5G ee GPT

The disk doesn’t show up with lsblk -f .

The disk was encrpyted with YaST when setting up an openSUSE install in ~2019.

Please, one does not say:

but one includes the line with the prompt and the command inside the copy/paste. Then everybody can see exactly what you see before you: what your working directory is, what the user is, what the user did and what the user got. Also copy/paste including the new prompt line so that we can see that the output is complete. That last one is e.g. in his case important for the lsblk listing. No story telling, but showing.

I am e.g. confused by the fact that you only seem to have that sda that is connected by you as an extra disk, but that there is no disk with the system you are running???
I was already confused earlier that the added mass storage device was enumerated as sda.

Otherwise there seem to be one partition that fills the whole of the disk and that is of type ee, said to be GPT.

I do not knowing much about encryption, but I assume the partition is encrypted and not the whole disk.

localhost:/home/matt # fdisk -l
Disk /dev/nvme0n1: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: WD_BLACK SN770 2TB                      
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: gpt
Disk identifier: DBEEB820-5F2C-41BD-9BBF-DA54ED9B990F

Device             Start        End    Sectors  Size Type
/dev/nvme0n1p1      2048    1050623    1048576  512M EFI System
/dev/nvme0n1p2   1050624  111151103  110100480 52.5G Linux filesystem
/dev/nvme0n1p3 111151104  115345407    4194304    2G Linux swap
/dev/nvme0n1p4 115345408 3907029134 3791683727  1.8T Linux filesystem


Disk /dev/mapper/cr_root: 52.48 GiB, 56354668544 bytes, 110067712 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


Disk /dev/mapper/cr_swap: 1.98 GiB, 2130706432 bytes, 4161536 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


Disk /dev/mapper/cr_home: 1.77 TiB, 1941325291008 bytes, 3791650959 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
GPT PMBR size mismatch (500118191 != 62514773) will be corrected by write.


Disk /dev/sda: 238.47 GiB, 256060514304 bytes, 62514774 sectors
Disk model: MZ7LN256HAJQ-000
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start      End  Sectors   Size Id Type
/dev/sda1           1 62514773 62514773 238.5G ee GPT

There are multiple partitions on the external SSD (at least /swap, /home, /). I don’t remember what exactly is encrypted.

Thanks for the now complete fdisk listing, I already has a vague idea that the system was on SSD devices, but now all is clear.

Although you did not post the lsblk -f, you say that sda is not in that listing. Very strange.

The system now sees on sda a DOS partitioning table with only one partition, that uses the rest of the space on the disk. That does not concur with your impression of having root partition, swap partition and a one for /home. But maybe my lack of knowledge how YaST creates that encryption does not help. Better wait until others, like @hendersj , enter the daylight part of the globe.

From long ago I remember that installing with encryption was often done using the Logical Volume manager. I assume you do not have any /etc/fstab from the original system this was the system disk of.

This is protective MBR, but apparently something is not correct so both fdisk and kernel do not see GPT. Show

gdisk -l /dev/sda

-f means “filesystem”. What do you expect to see if no filesystem on this device is detected?

It does NOT mean: show nothing when no file system detected.
It means show an lsblk listing with, apart from other columns listed by default, showing file system types when detected.

I was trying not to distract with irrelevant information.

matt@localhost:~> lsblk -f
NAME        FSTYPE      FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                                     
nvme0n1                                                                                 
├─nvme0n1p1 vfat        FAT32       3F29-D943                             504.8M     1% /boot/efi
├─nvme0n1p2 crypto_LUKS 2           c20d2ea8-3d62-4e2b-86f3-03dba22b8c2d                
│ └─cr_root btrfs                   3358e00c-278e-4e8b-b90e-fffcbf595eac   33.9G    33% /var
│                                                                                       /usr/local
│                                                                                       /boot/grub2/x86_64-efi
│                                                                                       /root
│                                                                                       /opt
│                                                                                       /srv
│                                                                                       /boot/grub2/i386-pc
│                                                                                       /.snapshots
│                                                                                       /
├─nvme0n1p3 crypto_LUKS 2           10bff603-b53a-41df-83ba-6fc06ad39bcf                
│ └─cr_swap swap        1           a5b0a073-ff27-4fb7-949d-60a857aabae9                [SWAP]
└─nvme0n1p4 crypto_LUKS 2           48321ee0-72cb-4a87-bad5-83aef16d5f35                
  └─cr_home xfs                     8b5327e9-8ce6-4477-b64f-b295ccde847b    1.6T    10% /home

I definitely do not have access to the /etc/fstab. It’s on the encrypted, now-external drive.

localhost:/home/matt # gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.10

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries in memory.
Disk /dev/sda: 62514774 sectors, 238.5 GiB
Model: MZ7LN256HAJQ-000
Sector size (logical/physical): 4096/4096 bytes
Disk identifier (GUID): FCDB911E-99B8-41D4-A861-779A099CD4F4
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 5
First usable sector is 6, last usable sector is 62514768
Partitions will be aligned on 256-sector boundaries
Total free space is 62514763 sectors (238.5 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
localhost:/home/matt #

Assuming you have used nvme0n1 in the same way as earlier sda, there is something wrong with sda. It should have manifested itself in the same way as nvme0n1.

fdisk interprets what it sees as the protective MBR.
It looks as gdiskseems something that could be a GPT.lsblk` sees only the device with nothing particular on it.

I wonder if something happened to the device after you last used it on that laptop.

That should not even be supported by DOS partitioning.

Show

sudo hexdump -C -n 8192 /dev/sda

If it is too long to paste here, upload to https://paste.opensuse.org/

localhost:/home/matt # hexdump -C -n 8192 /dev/sda
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001c0  02 00 ee fe ff ff 01 00  00 00 af 32 cf 1d 00 00  |...........2....|
000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200  45 46 49 20 50 41 52 54  00 00 01 00 5c 00 00 00  |EFI PART....\...|
00000210  aa b7 dd 9e 00 00 00 00  01 00 00 00 00 00 00 00  |................|
00000220  af 32 cf 1d 00 00 00 00  22 00 00 00 00 00 00 00  |.2......".......|
00000230  8e 32 cf 1d 00 00 00 00  05 92 40 b6 53 a4 39 47  |.2........@.S.9G|
00000240  ab 02 bb 85 2f 47 09 f1  02 00 00 00 00 00 00 00  |..../G..........|
00000250  80 00 00 00 80 00 00 00  fc 61 8c 12 00 00 00 00  |.........a......|
00000260  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000400  28 73 2a c1 1f f8 d2 11  ba 4b 00 a0 c9 3e c9 3b  |(s*......K...>.;|
00000410  fe e8 47 9e 91 d6 d9 4c  87 87 45 cf 1e ab 1a bb  |..G....L..E.....|
00000420  00 08 00 00 00 00 00 00  ff a7 0f 00 00 00 00 00  |................|
00000430  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000480  79 d3 d6 e6 07 f5 c2 44  a2 3c 23 8f 2a 3d f9 28  |y......D.<#.*=.(|
00000490  fe 2d 5d 22 c8 f9 4e 45  a7 71 b1 f0 76 b2 57 36  |.-]"..NE.q..v.W6|
000004a0  00 a8 0f 00 00 00 00 00  8e 32 cf 1d 00 00 00 00  |.........2......|
000004b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00002000

Assuming you have used nvme0n1 in the same way as earlier sda , there is something wrong with sda . It should have manifested itself in the same way as nvme0n1 .

I don’t remember whether it’s exactly the same, but that was the intention.

  1. I ran zypper dup on a functioning Tumbleweed distribution on a Lenovo T480 laptop. It ran as normal.
  2. I rebooted.
  3. Laptop failed to boot. Tumbleweed update, laptop no longer boots
  4. I rebooted many (~10 times). Failure mode was always a smart beep code, I assume always the same. The error code indicates a display failure.
  5. I physically removed SSD drive, bringing us to this thread.

The hardware is ~6 years old, and I had already purchased the replacement (where I am trying to read the now external SSD).

I am not expecting the SSD to have failed or been damaged in the past few days, but you never know.

You drive was partitioned for 512 bytes sector size (standard legacy disks). GPT starts in the second sector (whatever size it is) and now your drive claims to have 4K sector size, so GPT is not found.

Most likely it is your

which “optimizes” drive access. Your physical drive is likely 512e (4K physical sector and 512 bytes emulated logical sector).

May be your adapter can be configured to not do it. If not and you have enough space you can simply dd this disk into a file and create loop device over this file with losetup. It defaults to 512 sectors and in any case you can set sector size during creation.

It may work directly over /dev/sda.

Otherwise try to find other adapter that is not that “smart” or plug SATA disks directly into SATA port in your system.