1

This question already has an answer here:

I have an SD card with raspbian on it that I was using on a Raspberry Pi model B+. While logged into the pi, I wrote some code in .cpp files which were then saved on the Pi.

Now unfortunately the Pi no longer works, is there any way to get my .cpp files off the SD card without getting another Pi?

marked as duplicate by goldilocks May 7 '18 at 17:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

Is there a card reader you can use? If so, you could use Ext2Read on Windows or simply mount and copy/paste your files on Linux.

EDIT

woops didn't see the answer above

  • Excellent! This saved me so much time because otherwise I would have had to write the code all over again, thank you! – oodan123 Nov 19 '15 at 3:40
2

Insert the SD card on another Linux system, and observe the SD card reference through the output of dmesg. Usually it is in the form like the example below

[ 9844.823326] sda: sda1 sda2 [ 9844.825765] sd 0:0:0:0: [sda] Attached SCSI removable disk

As root user, you can mount the second partition that holds your pi's home directory

root@homerpi:/home/pi# mount /dev/sda2 /mnt root@homerpi:/home/pi# cd /mnt

Regards

  • Thank you for your answer! Unfortunately I am using Windows so leriaz's answer was the one I ended up going with – oodan123 Nov 19 '15 at 3:41

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