Skip to content

Instantly share code, notes, and snippets.

@treehouse-su
Last active December 11, 2015 16:19
Show Gist options
  • Save treehouse-su/4626232 to your computer and use it in GitHub Desktop.
Save treehouse-su/4626232 to your computer and use it in GitHub Desktop.
Cloning the SDcard of the raspberry pi while running remotely ... (second SDcard is attached usb SDcard-Reader)
#copy your ssh key to root@raspberrypi
ssh root@raspberrypi.local 'aptitude install screen'
ssh root@raspberrypi.local 'screen -d -m -S clone'
ssh root@raspberrypi.local 'echo u > /proc/sysrq-trigger'
ssh root@raspberrypi.local 'screen -x clone'
dd if=/dev/mmcblk0 bs=1M of=/dev/sda count=4K
#for the first 4GB
#detach with "CRTL-a d"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment