1

So my Rasberry Pi had some sort of failure, and I'm trying to recover some data from the SD card.

Since I didn't have an SD reader on hand I chucked the SD into my android phone and tried to use the file explorer to find the files I wanted. However, android didn't recognize the card properly, and I ended up having to find an SD reader.

The problem is that the SD card looks like nothing the original backup I did:

enter image description here

Instead, these are the files it now contains (as viewed from Ubuntu):

enter image description here

As you can see, Android has added some of its own files to it - and the Ubuntu structure appears to have disappeared. Am I still able to access the Ubuntu files?

In regards to the actual failure. I believe it was knocked hard. Neither the ethernet or USB slots work, and the Pi boots and prints the error (HMDI works): VFS: unable to mount root fs on unknown- block(179,2).

I've also created a SD cloned image of the card using dd, which can be grabbed from here.

Viewing the SD card in GParted shows the following:

enter image description here

Which shows a damaged (but existing) second partition.

  • "the SD card looks like nothing the original backup I did" What backup? What did that look like? What's missing? What's added (other than the Sep 20 Android ones)? – bye Sep 19 '16 at 12:19
  • Sorry - updated with a picture of the original backup - which was essentially a fresh Ubuntu install. – Darkstarone Sep 19 '16 at 12:39
  • So what's in that "KINGSTON" partition? – goldilocks Sep 19 '16 at 13:58
  • That's not a partition it's a Kingston 32GB USB drive. I'm viewing the SD card on my laptop via SD reader. – Darkstarone Sep 19 '16 at 20:15
1

What you see is just the Boot-Partition of your Pi. It is FAT32 and therefore can be read by your phone. The Root-Partition (with all your data) is of type Ext4. You don't seem to have mounted it or your partition table got damaged and is therefore lost. Check your device list if you can find another partition. And check your mounted partitions.

ls /dev
mount

Compare the outputs and see which device is mounted for PI_BOOT and if there is another partition. If the partition is not visible you might try to use ParitionMagic. But this requires higher skills.

  • As far as I'm aware Android, like Windows, cannot read ext4 and therefore won't show the root partition, it will only show the first one. This doesn't mean there is anything wrong with the card. – goldilocks Sep 19 '16 at 13:11
  • Yes, but as Darkstarone stated he is trying to get to his ext4 partition on Ubuntu. – kwasmich Sep 19 '16 at 13:27
  • I guess you're right -- although s/he doesn't actually state that, it does look like a ubuntu-esque file browser and presumably "getting an SD card reader" meant a USB adapter for some other computer. I took "access the Ubuntu files" literally to mean it was Ubuntu that was installed on the card. So either Android wrecked the MBR (I've never tried sticking a pi card in an Android device because it seems pointless) or (more likely) it was wrecked in "the failure". – goldilocks Sep 19 '16 at 13:56
  • Should have stated - I'm using Ubuntu to access the SD card and that was the only set of files shown. It's quite possible the MBR was wrecked in the failure. I'll add a section on the failure specifically (Ethernet/USB not working) and error message is: VFS: unable to mount root fs on unknown- block(179,2). – Darkstarone Sep 19 '16 at 20:16
  • Also I've used gparted to find the other partition (mmcblk0p2), but it's damaged and I'm not sure what my next step is. I've updated my answer with additional information, as well as a dd image. – Darkstarone Sep 19 '16 at 20:57
0

Ok, so turns out the Android install files were a red-herring (as some users noted), and this was actually a relatively simple operation.

What I did was use TeskDisk to find the missing data partition. This is done by using the analyse function. Once I had the lost partition I was able to explore the structure and retrieve the specific files I needed.

Interestingly, PhotoRec couldn't recover the specific file, since it only returned *.sqlite, and not any *.sqlite3 files.

Thank you to everyone who helped. Since the raspberry pi is bricked, I've ordered a new one and I'll use my original backups (plus the retrieved database file) to bring my server back to its current state.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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