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?
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
Then you can
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
To unmount the partition
sudo umount mnt
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.
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).
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.