Restoring MLO and uboot to eMMC and microSD

Given that the eMMC and microSD has different drive geometries[1], what is the correct way of backing up and restoring the MLO and u-boot from one medium to another? eg from eMMC to microSD or from microSD to eMMC.

–Luther

[1] https://groups.google.com/d/msg/beagleboard/4HTJt7J2M8w/3qdig-7hBQAJ

That's incorrect, the drive geometries doesn't affect MLO/u-boot.img
which are always in the same location on either eMMC/microSD.

you can use 'dd' to extract them or just grab the "backup" versions
found under: /opt/backup/uboot/

Regards,

From https://groups.google.com/d/msg/beagleboard/4HTJt7J2M8w/3qdig-7hBQAJ

Next question. If I flash the eMMC using the microSD card debian flasher
script, and then dd out 1MB from the eMMC and microSD, do I expect both to
have the same shasum? I expect yes, since they came from the same debian
image, but unless I made a mistake or there are some false assumptions on my
part, I seemed to be getting different checksums

No… different drive geometries…

Just to clarify, does the above still hold true? If yes, does it mean that different drive geometries means that the 1MB of each storage medium contains other drive specific stuff, together with the MLO and u-boot, and therefore results in differences in the 1MB content for each drive?

–Luther

I have a BBB which has the eMMC flashed from the microSD card using the flasher script. Therefore, the MLO and the u-boot should be idenitical.

Referencing the eewiki page[1]I backed up the MLO from the eMMC and the microSD:

sudo dd if=/dev/mmcblk0 of=./mmcblk0_MLO count=1 seek=1 bs=128k
sudo dd if=/dev/mmcblk1 of=./mmcblk1_MLO count=1 seek=1 bs=128k

The shasums are however different:

debian@beaglebone:~$ sha256sum mmcblk0_MLO
493f8723705c73c3383898658ce2b1855bbca219825198d2a23b115ce30a4ada mmcblk0_MLO
debian@beaglebone:~$ sha256sum mmcblk1_MLO
51d7b68ec8eac56f6d04371c77885332e9eedc7c5434350750ba58f51e86fd56 mmcblk1_MLO

Am I backing up the MLO correctly?

[1] https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSDcard

Bump