create image from current state of the eMMC

hey guys!

the topic actually says it all… im looking for a way to save the current state of my BBB to its sd card. im just tired of setting things up again every time i mess my BBB up and have to flash the eMMC again…
unfortunately im pretty new to linux as well so i would be really greatful for some tips of you guys!


This has been covered a lot on this forum. You might just to a search on the forum and see what comes up. Try something like “backup eMMC image”.


I would like to know the answer to this one too, Nik J

so search the forums. I’ve posted at least once on it, probably more than once.

Let’s not forget Google as well.,mod=6&sourceid=chrome&ie=UTF-8#q=Backing+up+eMMC+image+on+BBB&safe=off


I had this exact same question as well. Thanks for posting.

I found this link using Gerald Google search link. Look like a reasonable approach to back up the image: .

Perhaps this should be added to the BeableBone FAQ? ( ) also might make sense to add the info here as well
( )

Gerald, are you the best person to contact regarding this suggestion? (i.e. are you Gerald Coley referenced on the wiki? “If you have any questions or issues with the content on this Wiki, contact Gerald Coley”)

I will add it to my long list of things. After you confirm that it works.


thx a lot for your fast help as always!
actually i did use the standard google search, but only found topics about how to flash the eMMC…
i dont know why but it didnt even come to my mind to use the search function in this forum :smiley:
keep up your great support guys!

I can confirm that this works…note that I didn’t test by going back to the eMMC but that could be done by copying the backup image to a bootable SD card and dd’ing it to the eMMC.

This is my process:
1 - to backup (on BBB…takes about 10min):

boot via SD card

dd if=/dev/mmcblk1 bs=1M | ssh user@ip ‘dd of=/home/user/backup.img bs=1M’

2 - to restore to a SD card (on Linux laptop…takes about 10-20min)

dd if=/home/user/backup.img of=/dev/ bs=1M

Also note that you can save just one partition and then it can be mounted on a Linux machine…for example:
1 - on BBB

boot via SD card

dd if=/dev/mmcblk1p2 bs=1M | ssh user@ip ‘dd of=/home/user/backup.img bs=1M’

2 - on Linux machine

sudo mount backup.img /mnt


What size SD card is needed?


Minimum 2g. I used an 8g, but the dd’d image file is only 1.9g

OK. I will work to type this up for the Wiki and send it to you to confirm. I need to add more detail for wayward souls in the instructions.


The steps below result in a permission denied error with accessing the device file (/dev/mmcblk1). Does the device file represent the eMMC?

I’ve used Robert Nelsons scripts for this - if you installed using his kernel and the steps outlined here: then you’ll have /boot/uboot/scripts/tools/

I ran this to backup my eMMC to SD, then verified the results by creating the file “/boot/uboot/flash-eMMC.txt” on the SD, then rebooting from that SD to reinstall the OS back to the eMMC.

From memory I did have to modify the script to swap source and destination in the script: source="/dev/mmcblk0" on my version. It’s pretty easy to identify which is which as the eMMC is 1.7GB on partition 2 - identify it with “df -kh”.

bbb::/boot/uboot/tools/scripts> df -kh
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p2 1.7G 1.1G 520M 68% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 247M 4.0K 247M 1% /dev
tmpfs 50M 284K 50M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 249M 0 249M 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/mmcblk0p1 64M 35M 30M 54% /boot/uboot

Useful if you’re testing this and lose track of what you’ve booted from.

I can’t remember if I tried this with the latest Angstrom version (09.04), but the mmcblk1 should represent the eMMC if you booted off of a SD card (typically the boot device is mmcblk0).
Also to state the obvious, you do need to be root in order to dd from the device.
ps. I think that generally opinion on other posts was that this wasn’t probably the preferred way to backup, but I don’t recall what was advised. Definitely backing up a partition being actively used is risky, in other words, ensure the device/disk being backed up is unmounted.