2

Recently, my Pi 3 broke, and I had some important files on its Raspbian Stretch SD card. I would like to get these files off the SD card without buying a whole new Pi.
Does anyone know a way of doing this?

Thanks!

  • Just plug it into your computer. It doesn't work? – Matej Apr 18 '19 at 21:46
  • All I get is the Boot partition. The files I need are on a seperate EXT4 partition that I can't access from my Mac. – Joelvanf Apr 18 '19 at 21:54
  • Try ls /dev can you see new device here? I am not sure about names on Mac but on linux SD card is mmcblkxxx – Matej Apr 18 '19 at 21:58
1

To view files from your EXT4 partition you'll need to download FUSE for macOS. This solution only lets you read, not write, but this should be enough to recover your files.

brew cask install osxfuse
brew install ext4fuse

Create a directory where you want to mount the EXT4 partition. I'll just call it mnt. Navigate to the directory containing mnt and type (including the quotation marks)

sudo ext4fuse "/dev/disk2s2" "mnt/" -o allow_other

In my case, the micro SD card is under /dev/disk2 and the EXT4 partition corresponds to disk2s2. To make sure which is your partition, type diskutil list.

Then you can cd into mnt/ and recover your files, for example by issuing the dd command and saving a copy on your Mac. Let me know if this works, and if you're facing any issues related to FUSE.

To unmount the partition

sudo umount mnt

References

Mount EXT4 partitions on macOS

ext4fuse mount-point disappearing

|improve this answer|||||
0

One way is to boot a live Linux CD on your Mac.

I do not have a Mac so can't vouch for the following instructions.

https://www.howtogeek.com/213396/how-to-boot-a-linux-live-usb-drive-on-your-mac/

Once Linux is booted it will be able to see the file systems on the SD card (FAT for the boot partition, and ext4 for the rest).

|improve this answer|||||
0

macOS can't (actually won't) show Linux ext4 partitions. There used to be 3rd party software to mount these, but Apple are making it more difficult with each new release, and AFAIK it is not possible with SIP.

You can see the contents on any Linux OS - this can be a virtual machine, a bootable image or another Pi.

I find a Pi with a fresh Raspbian installation and SD Card reader the easiest.

See https://raspberrypi.stackexchange.com/a/95156/8697

|improve this answer|||||

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.