I've got a HDD, gotta look for any data left on it. I don't need a 1:1 copy of the drive to determine if any data is even there still, and i'm also strapped for space, so I threw together a little 20-line or so Python script to skip over large amounts of empty space so I only have to sift through what little it finds to see if anything's left at all. I wrote it, ran it... and it took a while. Too long. My SSD was floored and RAM was full for no reason. I double-checked my code...

device_size = len(device.read())

If you don't get it, this would've tried to load the ENTIRE DRIVE'S CONTENTS into RAM before giving the length. The drive's 128GB or so. That's not happening.

I'm a fucking idiot.

This is what this was for. This ain't ext4. What in the fuck...?

  • 4
  • 6
    @BadFox that's not very cd of you
  • 4
    @Parzi But it's very pwd
  • 7
    i want that pattern as a knited sweater 😄
  • 2
  • 1
    @heyheni I can supply the dump, if you'd like xD
  • 0
  • 1
    Why haven't you used a proper tool for this? There are dedicated programs to work with failed drives, dead filesystems and badsectors.
  • 0
    @mt3o I, uh... I have. TestDisk, the official SD Formatter ting, several partition managers, MS-DOS (the only one that straight tells me "lol this drive ded", interestingly, as the rest "complete" fine but then reload partition data and nothing happened), Win9x, parted, dd, etc.

    The first half of Sector 0 is unmodifiable (welp) and the entire rest of the drive has the last 2 bits of EVERY BYTE off, no matter what. Technically writable, but you'd need a custom FS and access driver, if we disregard the Sector 0 issue.
  • 1
    Ok, so the drive is damaged. I don't know on how it technically works, but loosing 2 bits - is a pattern. Does it give a hint on which part is that?
  • 0
    @mt3o It's a Micro SD card. Unless you have an electron microscope and a microscopic surgical mimic handy, it's not gonna be fixed. I can't even RMA it, as I lost the receipt and that means I can't return it either.

    Wait, my library has an electron microscope...
Add Comment