Introduction: BeagleBone : Ubuntu OS & LXDE GUI

Hey all! The last major instructable I posted was the rc glider drone. Major process underway, testing the system in a powered model airplane now. In the meantime, I would like to post the progress I have made with the beaglebone. 

I think this project is very cool and has nearly countless applications!! We are going to be setting up our own single board, fanless computer using the beaglebone. We will setup a mini SD card so that we can boot Ubuntu onto the beaglebone, we will setup a a lightweight GUI (graphical user interface - a desktop environment vs terminal) and just for kicks we will install the arduino programming environment.

Even though this board is heavy on linux, I included this in the microcontroller section in the hopes of more arduino fans giving this board a whirl..,
I chose ubuntu because there is already an existing image to format your sd card. Also, I have been running ubuntu on my laptop to program arduino, so it seems natural that you would try and match the os from your board and your computer.
I do not know if this instructable is really tailored to any one specific project. However, it should really get you going. I do not know much about javascript or web hosting, but this feels like the perfect time to learn. Maybe later I will set up some kind of VPN connection so that I can control and monitor any project from anywhere with internet access...

I would recommend joining the group "beagleboard" on google groups. The beagleboard is much more complicated than an 8bit microcontroller.!forum/beagleboard

This instructable is basically an editorialized repost from the linux website:

If you have any knowledge or interest with linux, or beagleboard, please sign up and contribute to the beaglebone group on instructables. There is a lot to do here folks!!

At the end I have included how to set up a lightweight GUI so that you can SSH in from your laptop and set up a "virtual desktop." I also show how to install and run the arduino IDE so that you can use the beaglebone to program any arduino NOTE: I HAVE NOT CONFIGURED A DEDICATED SCREEN OR A KEYBOARD TO THE BEAGLEBONE. I JUST WANT TO ILLUSTRATE THAT THE PROCESSING POWER OF THIS BOARD IS MUCH CLOSER TO A COMPUTER THAN TO AN ARDUINO.
A good next step would be to figure out the HDMI cape so that you can run the LXDE desktop on any hdmi monitor. 

Step 1: Download the Disk Image

I am going to strongly suggest running some form of linux on your computer. Since the BeagleBone is a linux based development platform (it comes preloaded with Angstrom - linux- and most of the other precompiled images are also linux). It makes sense to run linux on your computer. If you are still anxious about making the switch, you can dual boot a linux OS from a disc or thumbdrive. However, I think it will be most convenient to use  "wubi" to dual boot Ubuntu from your laptop.

If you are already running ubuntu on your computer, these next steps ~should~ be very easy. Get ready to copy and paste!
Make sure you are uploading the most recent release

From your computer terminal:
$ wget
$ wget

This will download the disc image for your SD card straight to your computer. If you are running something other than Ubuntu, the links following the wget command will dowload the image to your computer also.

To verify that the images have downloaded correctly:
$ md5sum ubuntu-12.04-r5-minimal-armhf-2012-07-29.tar.xz

This should return:
5446d6e47a5d286f94ae3fa30db2a56b ubuntu-12.04-r5-minimal-armhf-2012-07-29.tar.xz

Step 2: Unpack the Image

The image file is essentially "zipped." You must unpack the image:

$ tar xJf ubuntu-12.04-r5-minimal-armhf-2012-07-29.tar.xz

Once the image has unpacked (this will take a while), open the directory containing the image file:

$ cd ubuntu-12.04-r5-minimal-armhf-2012-07-29

Step 3: Prepare Your SD Card

Connect your mini SD to your computer. The beaglebone should include a mini SD to SD adapter. in this tutorial I am using an 8Gig SD with a USB to Mini SD adapter. I would recommend removing all peripheral USB devices so taht you don't accidentally reformat them. Use the command:

$ sudo ./ --probe -mmc
It will return something like:
Are you sure? I Don't see [/dev/idontknow], here is what I do see...

fdisk -l:
Disk /dev/sda: 500.1 GB, 500107862016 bytes <- This is your hard drive!
Disk /dev/mmcblk0: 3957 MB, 3957325824 bytes <- This is likely your SD card. Note that it is not the full size of your available memory

/dev/sda1 on / type ext4 (rw,errors=remount-ro,commit=0) <- This should point to the device you are using to connect to your SD. This will change depending on what you are using to connect.

Remember the location of this drive!!!

Step 4: Install the Disk Image!

Remove all other USB devices! Once you are sure that you have found the correct port for your SD card run this command from the unpack image directory:

$ sudo ./ --mmc /dev/sdX --uboot bone

//where sdX is the location of your drive. Mine was sdb, on the linux site it shows as sda.

It will ask you if you are 100% sure you have selected the drive. Type (y)es to continue!

Step 5: Login -Serially-

Plug your sd card into your board and login, serially :

$ screen /dev/ttyUSB1 115200
You may be running off of a different USB port

Another option is to run your board using minicom. I recently set this up and it works just fine. To get minicom on your computer:

$ sudo apt-get install minicom

Once you have installed minicom configure your serial settings:

$ sudo minicom -s
This will launch minicom. You have to sudo if you want to save your setting changes. Enter the correct location of you beaglebone (if usb its : /dev/ttyUSBX) Make sure your baudrate is at 115200. Turn off all flow control.
Once you are done configuring, save your setup as "bbone" Now you only have to:

$ minicom bbone
to establish your serial connection

First login as root with password "root" and then change your root login password!:

$sudo passwd

Setup a non-root user "username":

$ sudo adduser username
If you want to run chromium web browser from your beaglebone you will need a non root user.
Ubuntu will take you through a user setup. To setup/change the password:

$ sudo passwd username

Step 6: SSH In!

I find that the best way to work on the bone is through your home network with a secure shell (SSH). This will allow your board internet access for easy downloads, and an ethernet connection is much faster than a serial one!! Plug your board into your router and power (a little box for your board would be a good idea if your router is collecting dust).

Before logging into your board, you may want to loosen your computers networking standards. 
cd into .ssh and make a or edit the file "config" to the following:
# Disable host checking for any "local" machines
    Host 192.168.*.*
      StrictHostKeyChecking no
This will help while you are still developing your board.

To find out what IP the dhcp has assigned run the following:

$ for ip in $(seq 1 254); do ssh$ip -o ConnectTimeout=5; [ $? -eq 0 ] && echo "$ip UP" || : ; done

Change the X's with the first three numbers of your network ip address (probably: 192.168.1)
Login with your root password

Step 7: Configure Your Board

This is a good time to install any tool packages you will need. For example, if you plan on running your board wirelessly, you will need the wireless tools package. Check out the website for the most recent update here

Or just :
$ wget

Step 8: Install & Run LXDE Desktop

Get ready for the big download!
LXDE takes up 215 Mb of space, I am using a 8Gig SD card so this is not much of a problem.
$ sudo apt-get install lxde

This will take a long time to download and upack. But once your done you should be able to run a virtual desktop from your laptop.
It took me like 25 minutes to load and setup. Once you have finished the download


when you ssh in this time:

$ ssh root@ -X
$  startlxde

you may have to try:
$ xhost -X
$ exec startlxde
to get it working :\

When I run this, a taskbar appears at the bottom of my desktop. I can navigate the bbone from there

In order for me to run chromium from the beagle I need to ssh in as a user other than root.

Step 9: Install Arduino IDE?

If you want to install and run the arduino ide off your beaglebone, you can easily do that. 

$ sudo apt-get install arduino

once you have installed, simply 
$ arduino
in your omap terminal to run the IDE.

You've done it! We've gone from programming a microcontroller to programming a microcomputer capable of programming and troubleshooting all those great arduino projects you have lying around (or still in your head). Regardless, its a lot easier than it should have been- thanks for all the support from element14, google groups beagleboard, and seemingly endless linux forums.

i ordered the 4inch lcd touch screen cape, but I will not get it until September. Maybe it would be possible to set up some kind of diagnostics side kick with the beagle bone? Regardless, I will let you know how the screen works :)

Step 10: Reformat Your SD

If you want to reboot an OS onto your SD card, you'll need to wipe the card. There are a few ways to do this but this is the one that worked for me:

$ sudo shred -vfz -n 100 /dev/sdX

I do not know how many passes this will take


amandaghassaei (author)2012-08-29

cool! I've never heard of beaglebone, how does it compare to raspberry pi?


Just got a beaglebone black., but you need a special mini hdmi to hdmi to let it act as a desktop so to speak. Use mostly CL and web anyway so that is no big deal. I will probably put Debian instead of Ubuntu on mine; Have the Rpi and love it. Actually I have been running linux on arm since the NSLU2. Arduino has analog input. You can make your own arduino for under ten dollars, the TI msp430 launchpad board Is also another little board to look at.Under $5 when I bought mine. Uses the same ide as the arduino. Also has analog input. Analog input can be added to the beaglebone and the RPi with few simple parts. Both the RPi and the beaglebone can emulate pwm in diy software.

nerd7473 (author)Computothought2013-11-05

what is the TI msp430 launchpad board?

Computothought (author)nerd74732013-11-07

It's another microcontroller board. that is soft of code compatible with the arduino. They were selling it for $.4.30 fro a while last I looked it was about $10, Maybe more now. Like the original arduino, the cpu is not soldered in, so it is easy to make your own breadboards.

waymond91 (author)amandaghassaei2012-08-29

I have never used the raspberry pi. I was going back and forth for a while trying to decide which one to go with. A couple of factors for me:
1)Beaglebone is smaller (fits into an altoid tin)
2)Beaglebone's processor is better
3) There are a lot of promising externals for the beaglebone - primarily the touch screen.
4)Beaglebone has an arduino style IO panel

1)Beaglebone is more expensive -costs $80-90, raspi is about $30
2) Raspi already has an hdmi output - I bought a hdmi cape for the bone but still have not got it working - although normal beagleboard has the hdmi output and more usb hubs

Computothought (author)waymond912013-11-07

Beaglebone black ois only $45.

nerd7473 (author)waymond912013-11-05

I have a raspberry pi and I love using it I just recently installed gnash a flash player substitute for Midori Browser

YoungOne64 (author)2012-11-17

Hi, I tried sshing to the beaglebone and it asks for the password for root@my_ip_address. But then when i try to typei n the password i set when i connected via minicom, it says its wrong. the bottom when i've tried incorrectly three times, it says Permission Denied(publickey,password). Do you have any idea about what the problem could be? Thanks

waymond91 (author)YoungOne642012-11-17

what ubuntu distro are you running?

waymond91 (author)waymond912012-11-17

are you using ubuntu on your laptop and the beaglebone?
run ssh again, only this time
$ sudo ssh -v root@your_ip_address
and post the results here
I suspect that you have not copied the private key into your .ssh/authorized_keys file on your laptop (assuming its running ubuntu)

About This Instructable




Bio: Mechatronic Engineering
More by waymond91:Bare Mbed MCU With Full DebugPropeller AutopilotBeagleBone : Ubuntu OS & LXDE GUI
Add instructable to: