Installing Ubuntu on the BeagleBone Black

May 18, 2013, 7:16 p.m.

In order to install Ubuntu on the BeagleBone Black, essentially two steps need to be taken. The first step is imaging an SD card with Ubuntu because in order to flash the eMMC memory with Ubuntu, you CANNOT be booted to the eMMC, you need to be booted off of an external source (i.e. an SD card).

Install Ubuntu to the SD Card

On your computer (not on the Beaglebone Black) you need to image an SD card with the Ubuntu image. Luckily a man named Robert Nelson has created an amazing shell script that images SD cards for you and makes them bootable. Note: you must use this method to create the Ubuntu image, I tried using Win32DiskImager and flashnul to image my SD card and both did not work.

On your Linux computer (if you do not have Linux, try Cygwin):

First download the image from RCN-EE:

$ wget [Edit: get an image from the link above, they remove old images.]

Then, unpack the TAR file and change directory into the directory automatically created:

$ tar xJf ubuntu-13.04-console-armhf-2013-04-26.tar.xz

$ cd ubuntu-13.04-console-armhf-2013-04-26

Now probe your computer to find where the SD card is located (assuming you have plugged in the SD card already) and then run the command to start the setup_sdcard.sh script on the selected SD card (in my case /dev/sdc):

$ sudo ./setup_sdcard.sh --probe-mmc

$ sudo ./setup_sdcard.sh --mmc /dev/sdc --uboot bone_dtb

Once the SD card is successfully imaged, you now have a bootable Ubuntu SD card for the Beaglebone Black. Take out the SD card, plug it into the Beaglebone Black's SD card reader and boot the device while holding down the USER/BOOT button (located right next to the SD card reader) to boot to the Beaglebone Black from the SD card.

Installing Ubuntu on the BeagleBone Black's internal eMMC (optional)

Once you have Ubuntu on the SD card, you do not need to image the BeagleBone Black's internal eMMC with the same image, you can just simply use the SD card. I recommend using the eMMC portion because it is much faster than using an SD card.

On the BeagleBone Black:

While booted into the BeagleBone Black on an SD card (NOT on the eMMC!) download the Ubuntu image again:

$ wget http://rcn-ee.net/deb/rootfs/raring/ubuntu-13.04-console-armhf-2013-04-26.tar.xz

Then, unpack the TAR file and change directory into the directory automatically created:

$ tar xJf ubuntu-13.04-console-armhf-2013-04-26.tar.xz

$ cd ubuntu-13.04-console-armhf-2013-04-26

Now probe your BeagleBone Black to verify that the eMMC is located in /dev/mmcblk1 and then run the command to start the setup_sdcard.sh script on the eMMC portion (if you receive a probe readout after running the setup_sdcard.sh file that means you need to edit the shell file like I had to, see below):

$ sudo -s ./setup_sdcard.sh --probe-mmc

$ sudo -s ./setup_sdcard.sh --mmc /dev/mmcblk1 --uboot bone_dtb

Now when I was running the shell file on the mmcblk1 portion, I was unable to get it to work, it kept giving me a probe readout saying it was unable to find mmcblk1. In order to fix this, I had to edit the shell file. Remove this portion of code from the setup_sdcard.sh file in the check_mmc() function:

else
    echo ""
    echo "Are you sure? I Don't see [${MMC}], here is what I do see..."
    echo ""
    echo "$FDISK_EXEC -l:"
    LC_ALL=C $FDISK_EXEC -l 2>/dev/null | grep "Disk /dev/" --color=never
    echo ""
    echo "mount:"
    mount | grep -v none | grep "/dev/" --color=never
    echo ""
    exit

Now rerun the same command as before, and now instead of giving you a probe readout, it should begin formatting the eMMC memory. Once that is done, shutdown the BeagleBone Black, unplug the SD card (NOTE: you CANNOT leave an SD card in the BeagleBone Black that contains an .img file, as it will prioritize boot to the SD card!), and boot the device up as normal.

Once the device boots up without the SD card, you should be running Ubuntu now and not Angstrom.

Update: some users have reported some dependencies are needed to complete the install process. Check the comments for more information.