Preserving flashable eMMC image

Hi - I’m making many changes to the contents of my eMMC, and will need to clone this to other BBB devices. How would I dump an eMMC-flashable image to SD card to be able to produce clones?

Depending on "cat /etc/dogtag" there's any easy answer. :wink:

Regards,

Hi - revisiting this after a hiatus…

My /etc/dogtag gives:

rcn-ee.net console Debian Image 2015-05-08

I want to preserve this image as a “known good” before I start screwing with the newer kernels and device tree again…

Thanks,

Mike

Hi mike,

Any reason why you do not wish to use an sd card ? For “screwing around” with ? It makes things really easy to change, and backup. Plus it is not really that much slower than the eMMC. At least, I’ve not been able to tell much of a difference.

I have made many mods to my eMMC image, and wish to preserve it as my “gold master”, so that it may be flashed onto my other BBBs.

Is there a documented procedure to dump my eMMC image onto an SD card?

Thanks,

Mike

Hi,

I’m doing a backup via rsync over SSH to a directory on my Linux PC…

10.0.12.100 - beagle
/disk2/beagleBackup - dir on PC

To dir on PC:

sudo rsync -aAXv /disk2/beagleBackup --exclude={/dev/,/proc/,/sys/,/tmp/,/run/,/mnt/,/media/*,/lost+found}

Back to beagle …booted from SD card, flash mounted to /tmp/rootfs

sudo rsync -aAXv /disk2/beagleBackup/* root@10.0.12.100:/tmp/rootfs

Here is my modified version of beaglebone-black-copy-microSD-to-eMMC.sh ( format flash, copy uboot and mount flash to /tmp/rootfs)

#!/bin/bash

Hi Arsi, that was my backup plan, but that’s a little bit less efficient than a direct write to the SD card on the BBB.

I found Robert’s 2 year old eMMC-to-SD script on GitHub; wonder if that’s still up-to-date. Guess I’ll try!

Mike

Hi,

I have about 10 versions of images, so this is for me the best solution… and micro SD card is easier to lose than NB :wink:
A change in my java application, are automatically transmitted in the directories… So there is always the latest version.
I have not measured it, but at least the transfer to the PC is in my opinion faster…
Arsi

It is, but it’s a little risky on old rootfs, specially prior to Sep 2014… As we made major changes to the location of the boot loader and kernel location on disk, that summer. (Since that major change we haven’t broken it.)

I’d recommend, NFS/rsync backup the boot/root… Install the 2015-07-28 image, double check the new kernel works for you. (3.8.13 based in that image). Then rsync back just the ‘root’… Double check it still works with your changes… Then you can use the built in emmc to SD backup across.

Regards,

Or even rsync to sdcard . . .

You’re right - the script looks like it was set up for the old /boot/uboot structure. 2 questions:

a) where can I find the 2015-7-28 image?
b) are we SPI-safe on any of the 4.x images?

Thanks,

Mike

After slapping myself a few times, that’s what I ended up doing. dd’ing would be faster, but I was not comfortable that I’d get the options right.

Next experiment…

You pretty much have 5 options. dd, cp, rsync, tar, and cpio. But if you want a really good discussion about whats best, you can google stuff like “unix exchange rsync” and just read everything. I was actually reading a post last night about rsync versus cp I think.

Anyway, it honestly does not get any easier than rsync -a . . . But I like dd too for variou occations, as well as tar. I’ve never realy used cpio but have read about it, and cp . . . well it’s not up to snuff if you ask me.

I’ve found if there are block devices involved, nothing beats dd in terms of speed, if you’re within the domain that contains both devices (i.e. BBB has both the eMMC and SD card. Once a network is involved, and in my case, a wireless one, it’s network bandwidth that determines the speed.

rsync is great when we’re doing incremental updates, but not so much when you just need a block copy.

cpio I haven’t touched since the 80’s :wink:

any idea of the location of the images?

I’ve found if there are block devices involved, nothing beats dd in terms of speed, if you’re within the domain that contains both devices (i.e. BBB has both the eMMC and SD card. Once a network is involved, and in my case, a wireless one, it’s network bandwidth that determines the speed.

bmaptools is faster then dd. :wink:

rsync is great when we’re doing incremental updates, but not so much when you just need a block copy.

cpio I haven’t touched since the 80’s :wink:

any idea of the location of the images?

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#2015-07-28

Regards,

rsync is great when we’re doing incremental updates, but not so much when you just need a block copy.

true enough, but do you honestly need to do more than backup the rootfs most of the time ? Also, for backing up the “MBR”, copying the first Meg of the raw block device is all that is needed. Actually more than what is needed but . . .

bmaptools is faster then dd. :wink:

heh, honestly man, do you sleep at all ? I tried reading up on bmaptools back when you first mentioned it, and I guess started using it. And . . . I do not know. I love to play with new stuff, but sometimes I guess I just give up, and stick to what I know :frowning: