Flashing Ubuntu 13.04 or Debian Wheezy to the BeagleBone Black eMMC

By Andreas Wilhelm May 31, 2013

Yesterday my new Beaglebone Black arrived. Since I had plenty of time to play around with my old, now somewhat shabby looking, Beaglebone (White), I have so many great ideas what to do with it. It was really really hard to wait for it. The new distinctly more powerful setup with a AM335x 1GHz ARM© Cortex-A8 processor, 512MB DDR3 ram and the 2GB on-board eMMC storage, opens up new areas of application. So I instantly started to setup the new Board so I could replace my old one.

I decided to flash the new Debian Wheezy (7.0) instead of Ubuntu Raring Ringtail (13.04), because I thought about why I should take the caffeine pill instead of drinking a coffee, since Ubuntu is based on Debian. I tried to flash an image of Robert Nelson following his instructions at the elinux.org wiki. I was able to flash an image to an micro SD-card, but I was not able to figure out how to flash one of the eMMC images to the internal eMMC storage.

However the instruction below are based on Robert’s instructions and show you how to flash the image using a system running on a micro SD-card. They work for both the Debian and the Ubuntu image. So to get started decide which OS you would like to use and download the latest image provided by Robert Nelson’s homepage at http://rcn-ee.net/deb/rootfs/:

wget http://rcn-ee.net/deb/rootfs/wheezy/debian-7.0.0-console-armhf-2013-05-29.tar.xz

After the download has been completed, verify the MD5 hash of the image to be sure it has not been manipulated or broken:

md5sum debian-7.0.0-console-armhf-2013-05-29.tar.xz
8b355f33e2c97685c7bdbdbfd166729f  debian-7.0.0-console-armhf-2013-05-29.tar.xz

The next thing you have to do is to unpack the downloaded image and switch into the unpacked directory:

tar xJf debian-7.0.0-console-armhf-2013-05-29.tar.xz
cd debian-7.0.0-console-armhf-2013-05-29

You are now able to flash the image to your micro SD-card by executing the the setup_sdcard script provided with the image:

sudo ./setup_sdcard.sh --mmc /dev/sdX --uboot bone_dtb

If you do not know where your micro SD-card, you want to flash, is mounted, you could use the parameter –probe-mmc with the setup script to figure out the mount point of your SD card (in my case /dev/sdc):

sudo ./setup_sdcard.sh --probe-mmc

The flashing process will take some minutes. When the image has been flashed to the micro SD-card, insert it into the board. Hold down the “Boot” button, which is located directly over the micro SD-card and labeled as S2, and power the board by either connecting it to the PC using an USB cable or by connecting a 5V power adapter. Continue to hold down the “Boot” button until all LEDs flash up. This ensures that it really boots from the micro SD-card and not from the internal eMMC rom, which holds a Angstrom Linux by default. After about two or three minutes the boot process should have been finished, so you could try your Debian or Ubuntu OS. Therefore I recommend to point your browser (Chrome or Firefox, Internet Explorer does not work) to http://192.168.7.2. After a few seconds you should see a script which you could execute in order to open a terminal within your browser on your Beaglebone.

You now have a working Debian or Ubuntu Linux running on your Beaglebone booted from a micro SD-card. But that’s not what you actually wanted. I talked about flashing this image to the internal 2GB eMMC rom of your Beaglebone. And that’s what we will do now! Therefore switch to the temporary files directory and download the latest image from http://www.armhf.com.

cd /tmp
wget http://s3.armhf.com/debian/wheezy/bone/debian-wheezy-7.0.0-armhf-minfs-3.8.12-bone17.img.xz

This image is based on a Linux OS like Debian or Ubuntu, was extended with some packages and is combined with Robert Nelson’s armhf 3.8 kernel. If you would like to build your own one, just take a look at the Armhf website, they provided a nice tutorial. The really cool thing about this image is that it can be directly flashed to the internal eMMC rom while booted from an SD card. And that’s what you will do buy executing the following command:

xzcat debian-wheezy-7.0.0-armhf-minfs-3.8.12-bone17.img.xz | dd of=/dev/mmcblk1 bs=1M

The here used xzcat should be available on most Linux systems. It uncompresses the given image, which is then passed to the dd command. dd then writes the image to the given device, in this case /dev/mmcblk1, which is the Beaglebone’s eMMC rom. That means that the parameter of of dd refers to the output file or partition, while the bs parameter defines the block size. If this command does not work for you try the following:

xz -cd debian-wheezy-7.0.0-armhf-minfs-3.8.12-bone17.img.xz > /dev/mmcblk1

When the image has been flashed to the eMMC rom, power of the board (resetting does not work) and remove the micro SD-card. Then just power the Beaglebone without holding down the “Boot” button. The Beaglebone will then boot into the freshly flashed OS. You are now done and could start with setting up your system as I explained in my post Running Ubuntu 13.04 on the Beaglebone.

Last but not least a small hint: If you have problems booting the Beaglebone or connecting to it, this way be caused by under powering the board. So you should try it again with the board powered by an 5V power adapter.

So I hope you enjoyed this short howto. In my next post I will show a really cool application of this tiny board. Stay tuned and until next time – happy tinkering.


is a Computer Science MSc. interested in hardware hacking, embedded Linux, compilers, etc.