eMMC to bootable SD

I have a Beaglebone Black. Used a flasher image for the first time and then made all the developments on the eMMC itself. But I want to create a bootable SD card which is a clone of the modified Beaglebone.
I have tried using /opt/scripts/tools/eMMC/beaglebone-black-make-microSD-flasher-from-eMMC.sh but this creates flasher image and when used rewrites the eMMC, hence is not a bootable one.

So my question is how do we create a bootable SD from existing Beaglebone running on eMMC.

Okay so I have found the solution, maybe someone looking for the same can use the following.
After running opt/scripts/tools/eMMC/beaglebone-black-make-microSD-flasher-from-eMMC.sh. this sd card can be plugged into any pc running Linux and then navigate to /boot/uEnv.txt and comment the line cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh.

Now when the Beaglebone Black is powered in with this sd card , the device boots from SD.

Yeap, that’s the correct way… (you can also mount the microSD after running the flasher on the device and edit the file too…)


This is how I did it, glad to hear that it is correct…
one issue: /opt/scripts/tools/eMMC/beaglebone-black-make-microSD-flasher-from-eMMC.sh creates a one partition image the size of the physical device… I spent some (not a lot) of time in functions.sh trying to change this behavior…

is there a way that to create (ideally) a 4GB partition representing the eMMC and leave the remainder of the sd card available?

I found that the Balena Etcher app would not create a 32GB card (out of space) from a 32GB image created by using ‘dd if=/dev/sd? of=diskfile bs=??’.

it was necessary for me to find a smaller physical disk (8GB) to write to, then Etcher would create an 8GB partition when creating a clone. An acceptable work around.

is there an easier way?

I’ve tried to keep the eMMC flasher as simple as possible…

Feel free to extend it, here’s the current version:

and the partition generation:

You can see how i started thinking about making it customizable:


It sounds like you want this command:

sudo conf_rootfs_partition_size=7462912 /opt/scripts/tools/eMMC/beaglebone-black-make-microSD-flasher-from-eMMC.sh

This will do the same thing as before, but your image won’t be the size of the whole microSD card, but rather the size in sectors that you specify. 7462912 is 4GB, which should be flashable to your eMMC.

The conf_rootfs_partition_size parameter was added in this pull request: added conf_rootfs_partition_size by jallwine · Pull Request #124 · RobertCNelson/boot-scripts · GitHub

1 Like

Brilliant! will try.

thank you