# Emmc flasher

**URL:** <https://hub.mender.io/t/emmc-flasher/4020>\
**Category:** Debian family\
**Tags:** beaglebone-black\
**Created:** [August 19, 2021, 12:52pm UTC](https://hub.mender.io/t/emmc-flasher/4020 "2021-08-19T12:52:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![aslansutu](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/aslansutu/32/1301_2.png) [@aslansutu](https://hub.mender.io/u/aslansutu)\
**Post date:** [August 19, 2021, 12:52pm UTC](https://hub.mender.io/t/emmc-flasher/4020/1 "2021-08-19T12:52:06Z")

</div>

Hey all, I just realized something. The stock Debian image for the BeagleBone Black comes with a flasher. And that has been very useful to quickly get a new board set up. I tried to modify that to work with our Mender image. However I was unsuccessful. Does anyone have any ideas as to how I can write the image on the SD card to the onboard emmc at boot time?

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [August 19, 2021, 1:38pm UTC](https://hub.mender.io/t/emmc-flasher/4020/2 "2021-08-19T13:38:05Z")

</div>

Dont know much about BBB, but if it uses uboot bootloader then there’s normally an option (by dropping into uboot shell) to put your emmc into USB mass storage mode which can be mounted as a block storage device on your laptop/pc.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [August 19, 2021, 3:03pm UTC](https://hub.mender.io/t/emmc-flasher/4020/3 "2021-08-19T15:03:35Z")

</div>

Yes, U-Boot has the ums command which will do that.

---

<div class="post-metadata">

**Author:** ![aslansutu](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/aslansutu/32/1301_2.png) [@aslansutu](https://hub.mender.io/u/aslansutu)\
**Post date:** [August 20, 2021, 6:08am UTC](https://hub.mender.io/t/emmc-flasher/4020/4 "2021-08-20T06:08:51Z")

</div>

Bootloaders aren’t really my area of expertise 😅

I was looking for more of an autonomous way to do it; where I just insert the SD card, boot, and just wait. The only other thing I can think of is to write a script that runs at startup which will just dd the image file that I have included.

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [August 20, 2021, 7:45am UTC](https://hub.mender.io/t/emmc-flasher/4020/5 "2021-08-20T07:45:39Z")

</div>

As you said you will need to add a startup script that will image the file from your sdcard to emmc either if the image exists or when the user button gpio is held high (or low depending on the electronics. The BBB boot scripts appear to be on github for inspiration

---

<div class="post-metadata">

**Author:** ![azarubkin](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@azarubkin](https://hub.mender.io/u/azarubkin)\
**Post date:** [October 7, 2021, 11:43pm UTC](https://hub.mender.io/t/emmc-flasher/4020/6 "2021-10-07T23:43:35Z")

</div>

@aslansutu Could you please share what solution have you come up with in the end?
