create image from current state of the eMMC

2,382 views
Skip to first unread message

Nik

unread,
Sep 4, 2013, 12:42:01 PM9/4/13
to beagl...@googlegroups.com
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!

thx
nik

Gerald Coley

unread,
Sep 4, 2013, 1:29:20 PM9/4/13
to beagl...@googlegroups.com
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".


Gerald


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

William Pretty Security

unread,
Sep 4, 2013, 1:32:08 PM9/4/13
to beagl...@googlegroups.com

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

--

For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3392 / Virus Database: 3222/6638 - Release Date: 09/04/13

William Hermans

unread,
Sep 4, 2013, 1:42:57 PM9/4/13
to beagl...@googlegroups.com
so search the forums. I've posted at least once on it, probably more than once.

Gerald Coley

unread,
Sep 4, 2013, 1:46:14 PM9/4/13
to beagl...@googlegroups.com

Anewbie

unread,
Sep 4, 2013, 2:40:15 PM9/4/13
to beagl...@googlegroups.com
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:  http://www.berriman.co.uk/how-to-backup-bbb-emmc-card/ .

Perhaps this should be added to the BeableBone FAQ?  (http://circuitco.com/support/index.php?title=BeagleBone_Black_FAQ ) also might make sense to add the info here as well 
http://circuitco.com/support/index.php?title=Updating_The_Software )

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")

Gerald Coley

unread,
Sep 4, 2013, 2:41:51 PM9/4/13
to beagl...@googlegroups.com
I will add it to my long list of things. After you confirm that it works.

Gerald



--

Nik

unread,
Sep 4, 2013, 7:39:54 PM9/4/13
to beagl...@googlegroups.com
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 :D
keep up your great support guys!

Dale Schaafsma

unread,
Sep 6, 2013, 5:12:56 PM9/6/13
to beagl...@googlegroups.com
Gerald,
 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/<sdcard device> 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

 
-Dale

Gerald Coley

unread,
Sep 6, 2013, 7:58:42 PM9/6/13
to beagl...@googlegroups.com
What size SD card is needed?

Gerald

Dale Schaafsma

unread,
Sep 6, 2013, 8:02:30 PM9/6/13
to beagl...@googlegroups.com
Minimum 2g. I used an 8g, but the dd'd image file is only 1.9g
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/i3nZfLpaQRc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

Gerald Coley

unread,
Sep 6, 2013, 8:20:12 PM9/6/13
to beagl...@googlegroups.com
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.

Gerald

napp...@gmail.com

unread,
Nov 16, 2013, 11:11:34 PM11/16/13
to beagl...@googlegroups.com
The steps below result in a permission denied error with accessing the device file (/dev/mmcblk1). Does the device file represent the eMMC?

Mike Bremford

unread,
Nov 18, 2013, 9:57:53 AM11/18/13
to beagl...@googlegroups.com
I've used Robert Nelsons scripts for this - if you installed using his kernel and the steps outlined here: http://elinux.org/BeagleBoardUbuntu#Flasher then you'll have /boot/uboot/scripts/tools/beaglebone-black-copy-eMMC-to-microSD.sh.

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.

Dale Schaafsma

unread,
Nov 18, 2013, 10:13:34 AM11/18/13
to beagl...@googlegroups.com, napp...@gmail.com
Nick,
 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.
-Dale
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.
Reply all
Reply to author
Forward
0 new messages