0

I've been using a Raspberry Pi 4 (headless) with camera module and Motion installed as a security camera. It worked pretty well for a while and then just stopped. I couldn't access it via ssh anymore so shut it down and tried to boot it up connected to a monitor and it would not boot up - I can't recall the exact error but it was to do with the SD card. So I put the micro SD into my micro SD adapter and plugged it into my laptop running Linux Mint and nothing happened. I tried a different micro SD in the adaptor and this one was recognised immediately but the first one produces, literally, no response. It doesn't show up when using the df utility from the terminal either. Unfortunately there was some video on there that I would like to retrieve. Nothing so important that I would pay thousands on data recovery services but I would be prepared to spend a few hours getting it back.

However, given the complete lack of recognition by my computer, how do I first establish if the data will ever be recoverable?

In response to one of the comments, the adapter is just the official Raspberry Pi microSD adapter so I can use it in a normal size SD card slot. When I normally do this, a window opens automatically showing the contents of the card. With the broken one, nothing happens. And nothing is listed when using the lsblk command either - it just returns the same output as when there is no card inserted:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0   113G  0 disk 
├─sda1   8:1    0   512M  0 part /boot/efi
└─sda2   8:2    0 112.5G  0 part /
4
  • Get another SDCard, build a copy of RaspiOS32 on that and boot your RPi. Insert the borken SDCard in a USB reader, insert the USB reader in your RPi. Run sudo umount /dev/sda1; sudo fsck -f -y /dev/sda; sudo umount /dev/sda2; sudo fsck -f -y /dev/sda2; sudo umount /dev/sda5; sudo fsck -f -y /dev/sda5; sudo umount /dev/sda6; fsck -f -y /dev/sda6 ignore any errors. When that's complete sudo poweroff swap the SDCards and see if your borken one now boots.
    – Dougie
    Commented Jul 29, 2020 at 22:56
  • Currently, I don't have a usb card reader - have just been using an SD card adaptor. Will see if I can get my hands on one and try this out. Thanks for the suggestion. Commented Jul 30, 2020 at 8:46
  • 1
    @Dougie I never would do any writing changes (sudo fsck -f -y) on a broken storage I try to recover. You risk to destroy it more. I would only work on a raw image of the storage (dd if=/dev/sda of=recover.img).
    – Ingo
    Commented Aug 3, 2020 at 8:58
  • 1
    @JimboVader What do you mean with: "So I put the micro SD into my micro SD adapter and plugged it into my laptop running Linux Mint and nothing happened." What do you expect to happen? Please attach the broken SD Card to the laptop. Then edit your question and add the output of this command to it: lsblk.
    – Ingo
    Commented Aug 3, 2020 at 9:10

1 Answer 1

2

If you want to recover a broken SD Card the operating system must have access to the device. You must have at least a device file, something like /dev/sdb. Because it is broken it's possible that you don't see partitions (/dev/sdb1) but you need the raw device file to access the SD Card. But as shown with lsblk the operating system cannot find the device so you are lost without very low level special hardware equipment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.