Ddrescue of SSD quickly recovers 0 bytes

I am trying to recover user data from a solid state drive that had Pop_OS (Ubuntu derivative) installed on it and won’t boot anymore.

I watched the Level1Tech video “Data Recovery Tutorial - Getting started with DDRescue and TestDisk”. I am booting the laptop using a Live USB of Pop_OS and trying to recover to a file on an external USB hard drive using ddrescue.

My drives are:

  • /dev/sda is the solid state drive I am attempting to recover
  • /dev/sdb is my bootable live flash drive
  • /dev/sdc is my external hard drive to back up to

Here’s my command output.

$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0   2.1G  1 loop /rofs
sda      8:0    0     0B  0 disk 
├─sda1   8:1    0   498M  0 part 
├─sda2   8:2    0     4G  0 part 
├─sda3   8:3    0 457.3G  0 part 
└─sda4   8:4    0     4G  0 part [SWAP]
sdb      8:16   1  14.8G  0 disk 
├─sdb1   8:17   1   2.4G  0 part /cdrom
├─sdb2   8:18   1     4M  0 part 
└─sdb3   8:19   1  12.4G  0 part /var/crash
                                 /var/log
sdc      8:32   0   4.5T  0 disk 
├─sdc1   8:33   0   128M  0 part 
└─sdc2   8:34   0   4.5T  0 part /media/pop-os/58B8-BBD8
sr0     11:0    1  1024M  0 rom  
zram0  252:0    0   7.6G  0 disk [SWAP]

Don’t miss “Partition 1 does not start on physical sector boundary.” at the end.

$ sudo fdisk -l
Disk /dev/loop0: 2.06 GiB, 2208002048 bytes, 4312504 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/sdb: 14.78 GiB, 15871246336 bytes, 30998528 sectors
Disk model:                 
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: 0x31720e1b

Device     Boot   Start      End  Sectors  Size Id Type
/dev/sdb1  *          0  5064159  5064160  2.4G  0 Empty
/dev/sdb2           488     8679     8192    4M ef EFI (FAT-12/16/32)
/dev/sdb3       5066752 30998527 25931776 12.4G 83 Linux


Disk /dev/zram0: 7.63 GiB, 8193572864 bytes, 2000384 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/sdc: 4.55 TiB, 5000981077504 bytes, 9767541167 sectors
Disk model: Basic           
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: B341B4D5-90FA-4DA7-8D26-647B8DD5B96D

Device      Start        End    Sectors  Size Type
/dev/sdc1      34     262177     262144  128M Microsoft reserved
/dev/sdc2  264192 9767540735 9767276544  4.5T Microsoft basic data

Partition 1 does not start on physical sector boundary.
$ ddrescue -d -r1 /dev/sda asus_recovery.raw asus_recovery.log
ddrescue: Can't open input file: Permission denied

sudo ddrescue finishes instantly.

$ sudo ddrescue -d -r1 /dev/sda asus_recovery.raw asus_recovery.log
GNU ddrescue 1.23
Press Ctrl-C to interrupt
     ipos:        0 B, non-trimmed:        0 B,  current rate:       0 B/s
     opos:        0 B, non-scraped:        0 B,  average rate:       0 B/s
non-tried:        0 B,  bad-sector:        0 B,    error rate:       0 B/s
  rescued:        0 B,   bad areas:        0,        run time:          0s
pct rescued:    0.00%, read errors:        0,  remaining time:         n/a
                              time since last successful read:         n/a
Finished

If it would be helpful, I can reboot to get the error message from when it tries to boot.

What does this mean and where should I go from here?

If it’s an SSD garbage collection might have already trimmed it

This ate 30 TB of my data once. I picked the wrong drive to format for a Windows installation. The Windows 11 installer labeled drives by capacity only; I had to pick between a drive with 30720GB and 3072GB.

I later found out that the usual recovery methods for HDDs wouldn’t work; Windows trimmed the entire SSD. Sad times. :sob:

But how would I know? What are my options for a next step? If it was trimmed, how definitely does that mean the data is complexity gone?

I wasn’t doing any kind of maintenance when this became a problem. If I remember correctly, I just shutdown the computer, saw some error or warning as it was shutting down and then it wouldn’t boot again. If it’s like you’re suggesting, this sounds like a really good case to use a hard drive rather than a SSD (ok maybe that’s an over reaction) or at least do something different with trim settings.

For sure gone

Don’t know if it was trimmed though

How would I know if it was trimmed?

How would I know if this SSD was completely trimmed?

If the OS was on that drive, options are limited. If you have another drive, get that up and working then mount the problem SSD as a secondary drive and you should be able to search it.

journalctl | grep -i trim

Should find TRIM or trim events. If the logs themselves are gone, there’s no cheap way to pivot from that.

Yes the OS was on that drive but as shown above I am able to boot to a live Linux USB environment.

I created a folder to mount to:

sudo mkdir /mnt/pat

and tried to mount the partition that hopefully has the data I want

sudo mount /dev/sda3 /mnt/pat/

The output is:

mount: /mnt/pat: can't read superblock on /dev/sda3.

What is this telling us?