Wednesday, November 8, 2023

portable (usb) disk recovery

We've nearly all dropped an important HDD on the way to the airport or work and know the (sinking) feeling later that day when data can't be accessed. It's expensive, slow, and intrusive to have data recovered professionally.

So we've mostly switched to SSD's, but even these are of questionable1 reliability.

levels of loss

  • level of destruction -- unable to work at all, unable to be detected, unable to boot
  • type of drive SSD, USB, SDC, HDD
  • file system (ext2, ntfs, reiser, etc)

The easiest thing, the thing we'd like to do, is reset the dirty bit, or re-establish a corrupted MBR, and be able to plug our drive back in for normal use. Then we find that each crash can have a different level of complexity -- the dirty bit is often possible, the corrupted boot sector typically not.

Some of our luck in a crash also has to do with the file system. If a person has an HDD formatted in NTFS, then it needs a bootable NTFS sector even if it's just a portable data disk.

expectations: think data first, access second

The data crash reveals the drive to be unreliable; if I greedily aim to re-establish a boot sector, I might lose the data if the boot sector attempt fails. Check to see if the data is intact and shoot for that first, even if it's more time consuming than restoring access through a repaired boot.

software: testdisk

At the start of the fail I cycled through all my disk software, fdisk, cfdisk, gparted, ntfsfixbootand best so far seems to be testdisk. Also might take a look at wipefreespace on the AUR.

Data Recovery with Test Disk (18:22) oswyguy, 2018. This poor guy needs sunlight, but a superb TestDisk video beginning about 7:30.

WD Passport 1000GB, (1058:0748)

I employed the usuals to gather info and attempt repairs, cfdisk, fdisk, gparted, and from the AUR, . None of them did anything

pacman -S testdisk

This retrieved files, but didn't repair the MBR index.

nope

Zero
pacman -S ntfsffixboot
No
pacman -S ntfsfix

1Consider this SSD drive article, from which I quote:

According to the Western Digital's firmware update page, the impacted products are from the SanDisk Extreme Portable SSD V2, SanDisk Extreme Pro Portable SSD V2, and WD My Passport SSD line, and lists the models as follows:

SanDisk Extreme Portable 4TB (SDSSDE61-4T00)
SanDisk Extreme Pro Portable 4TB (SDSSDE81-4T00)
SanDisk Extreme Pro 2TB (SDSSDE81-2T00)
SanDisk Extreme Pro 1TB (SDSSDE81-1T00)
WD My Passport 4TB (WDBAGF0040BGY)

And these drives are still best-sellers on Amazon, so suppliers are being shady AF. SSD's rely on firmware but still must be properly constructed, of course. HDD's were mostly just a hardware situation.

No comments: