Updating the OS software image on a BeagleBone Black

A total newbie guide for making it actually work

I consider myself reasonably technically savvy. I’ve worked in technical fields for over twenty five years, and even do some hobbyist level programming. Heck, even my parents use me as their technical support hotline.

So why is it that I was unsuccessful at following supposedly simple instructions to update the OS software image on my BeagleBone Black? I followed all the instructions on the beagleboard.org website, as well as a variety of other websites that share similar information. For some reason, the new image just wasn’t getting updated locally on the device.

After many iterations of repeating the same steps over and over, trying different things found on support websites, I finally got it to work — and discovered I’m much more of a newbie at this than I thought. So, in the interest of helping others who might have the same issues, here’s my painfully step-by-guide for updating the software image on a BeagleBone Black.


BeagleBone Black: quick overview

The BeagleBone Black is an embedded computer for developers and hobbyists — think Arduino or Raspberry Pi, but with a lot more I/Os, faster, and built in the USA. Under the hood it has a 1GHz ARM® Cortex-A8 processor, boots in seconds, and uses lots of standard development IDEs such as Python, Node.js, and more. It’s a pretty awesome rig for only $50.

(image from the BeagleBoard.org support website)

I found it weirdly difficult to discern which of the three pushbuttons was the boot button, needed for updating the OS. Duh, there it is right on the lower right corner of the board!

Finally updating the OS on the BeagleBone

My BeagleBone Black (heretofore known as BBB) sat in a box for a year before I actually used it. So naturally I followed the steps on the Getting Started with BeagleBone guide, using my windows PC. My goal was to use the BBB to work out the motion control mechanics of the Zageo Z1 Laser System.

I followed all the steps but got hung up on the very last step, which just didn’t seem to work:

“ …to write the image to your on-board eMMC, you’ll need to follow the instructions at elinux.org. When the flashing is complete, all 4 USRx LEDs will be steady on or off. The latest Debian flasher images automatically power down the board upon completion.”

Symptoms were that the old OS would still boot when I removed the SD card. Looking back, my newbie Linux level combined with a slightly unclear instructions were the cause.

Hence, here’s my step-by-guide for updating the software image on a BeagleBone Black with a Windows PC. It seems lengthy but it goes quite fast, so don’t worry. This guide is written to be so straightforward that even your Mom can do it!


STEP 1: Plug in your BBB

Check your BBB to make sure that a micro-SD card is not installed in the slot on the backside of the BBB. Plug in the USB cable (male USB connector at one end and a male USB-mini connector at the other end) that came with your BBB; don’t confuse the micro-USB port with the micro HDMI port on the BBB, refer to the image above. Upon connecting the cable between your PC and BBB, lovely blue LEDs will flash for about 30 seconds while Linux boots on the board.

The LEDs near the USB connector will flash in a “heartbeat” pattern when everything is up and running:

oooh… pretty blue lights

STEP 2: Install BBB Drivers on your PC

Your PC needs to know how to recognize your BBB, and needs some drivers. 
 → Download/install this file for 64-bit windows PCs
 → Download/install this file for 32-bit windows PCs

You might get some security warnings; if so, go ahead and click the ignore, install, or run button when prompted. Don’t worry, what’s the worst that could happen?


STEP 3: Browse your BBB via your PC

You will now get to see your BB connected to your PC! Feels like progress, eh?

Unplug the USB cable (to the BBB) from your PC, then plug it back in again to reboot the BBB. Just like in step 1 (above) it will take about 30 seconds for the BBB to boot up as blinky blue LEDs frolic on your BBB. Eventually a Windows folder opens up, since the BBB appears like a storage device to your PC. The Readme and Start HTM files are worth a peek using your web browser:

windows folder will look something like this!

Using either Chrome or Firefox (Internet Explorer will NOT work), browse to the web server running on your board by manually typing 192.168.7.2 into your web browser bar. Viola! This is the IP address of the BBB connected to your PC. It will load a presentation full of propaganda about the BBB:

this is what you will see in your browser when connected to your BBB

STEP 4: Get a microSD card ready

Now for the important stuff. When I did this the first time, I jumped to the file downloading bit first then discovered I didn't have a microSD card to install them with (duh). So, make sure you have one of these handy — you should only need 4GB version, but 8GB are cheap too so why not splurge.

don't forget to check if you need something like this too

Also, make sure you have a way to read/write to the microSD card! Most PCs these days don’t have an SD slot, so check to be sure. If not, get a USB memory card reader that works with microSD cards (most microSD cards come with an SD-sized adapter FYI). Surely the place you got your microSD card from will have USB memory card readers right alongside for less than $10.

For the sake of instant gratification - if you can’t wait for these to be delivered (online ordering), don’t forget that these are sold at most office supply stores, drug stores, Target, Wal-Mart, etc.


STEP 5: Get/install 7-Zip for Windows

If you don’t have it already (which you probably already do, since your are a savvy tech-literate person), get/install the free compression/decompression utility 7-Zip. This is what you will use to unzip/decompress the OS software for the BBB in a later step.

→ Download/install this file for 64-bit windows PCs
→ Download/install this file for 32-bit windows PCs


STEP 6: Get/install Image Writer for Windows

If you don’t have it already, get/install the free utility Image Writer for Windows, from SourceForge. This is what you will use to burn the OS software for the BBB onto the microSD card in a later step.

→ Download/install this file for both 32-bit and 64-bit windows PCs


STEP 7: Retrieve the latest OS software for the BBB

In your web browser, navigate to the BeagleBoard firmware site and download the latest firmware image. As of the writing of this article, it is Debian 8.5 (dated 2016–05–13):

→ https://debian.beagleboard.org/images/bone-debian-8.4-lxqt-4gb-armhf-2016-05-13-4gb.img.xz


STEP 8: Unzip the BBB OS files and burn them to the microSD card

Once you have 7-Zip installed, right-click on the file you downloaded in STEP 7 (bone-debian-8.4-lxqt-4gb-armhf-2016–05–13–4gb.img.xz), select “7-Zip > extract here”, then let the file decompress. It is a big file, so you may have some time to personally decompress while you wait.

Next, connect your microSD card to your PC. Windows will to recognize it as a memory storage device and ask you if you want to format it; this is not necessary so just hit cancel on the pop-up window.

Just hit Cancel when you see this

Windows’ advanced AI algorithm just can’t understand why you didn’t want to format your microSD card, so it will probably tell so so as follows:

Don’t worry about this message, just hit OK

As if to reinforce its disbelief, you may find Windows asking you YET AGAIN if you want to format the disk. Just hit Cancel.

IMPORTANT: Note the drive letter assigned to the microSD card — mine is G:\ in the window above. If you write your files to the wrong drive, you may erase everything on that drive!

Open Image Writer for Windows (installed in STEP 6, above). Weirdly, the actual executable file isn’t called “Image Writer for Windows”, so if you use the Windows search bar you will actually need to type in “Win32DiskImager” to find it, or just scroll to that file under the Windows”All Apps” thingy:

Of course it is called Win32DiskImager, not Image Writer for Windows

If you get an error, or it doesn’t work, try right clicking on it and select “run as administrator”. Anyhoo, once you open Image Writer for Windows (Win32DiskImager), do the following:

  • Select the BBB OS file you downloaded in STEP 7 (and unzipped per STEP 8)
  • Select the drive letter assigned to the microSD card (see the IMPORTANT note above — choosing the wrong drive, may cause you to erase everything on another drive unintentionally!)
  • Click the MD5 Hash checkbox, wait for a code to be generated (not sure if this is absolutely necessary)
  • Hit the “Write Button”, double check the drive letter assignment again:
  • Wait for ~5 minutes for data to be written to the microSD card:
progress window will look like this
  • When it’s done, a completion/confirmation box will appear somewhere; mine was buried under a bunch of other windows. Find this, hit OK, then hit Exit on Image Writer for Windows (Win32DiskImager):

STEP 9: Get ready to communicate with your BBB

Yaay, the boring part is done — now for the part that actually get to talk to your BeagleBone Black.

To do so, you need establish a Secure Shell (aka SSH) through which you will communicate. Easiest way to do this is to use yet another free utility called PuTTY.

Thankfully, this is just an .exe file so you don’t need to go through the process of installing it — just download it and run it directly. Be sure to keep it somewhere handy so you can find it when you need it:

→ Download this file for both 32-bit and 64-bit windows PCs

Next, install the microSD card (the one with the BBB OS image installed during STEP 8, above) into your BBB. Make sure the card is fully seated:

be sure that the microSD card is seated fully in the connector slot; it has a “push-push” action to remove

STEP 10: Boot up your BBB from the microSD card

OK, this is the beginning of the part that kind-of didn’t work for me originally, and inspired this newbie guide. Specifically, the BeagleBorard.org software update page says to boot the BBB from the microSD card and flash cable, then flash the eMMC. I needed more detail on these instructions, and perhaps you do too — hence use the following steps below. Follow these next steps precisely!

  • Press/hold the USER/BOOT button as shown below; keep the button pushed until instructed otherwise!
  • With the button pushed/held, plug in the USB cable (just like in STEP 1, above); however, unlike STEP 1 , the blue LEDs above the USB connector the board will remain unlit/dark for about 10 seconds; then light up in a column pattern for a second. After this happens, you can release the USER/BOOT button while the LEDs flash in a random-ish pattern as Linux gets up and running. This process ensures that the BBB is booting from the microSD card instead of the onboard memory.

STEP 11: Connect to your BBB (booted from the microSD card)

Now that your BBB is booted from the microSD card, connect to it using the PuTTY program:

  • Find the PuTTY program that you downloaded in STEP 9, double click it to run it. If you get a weird error, or it doesn’t work, try right clicking on it and select “run as administrator”:
reminder — it is a standalone executable… it’s NOT in the Apps menu, unless you specifically put it there!
  • Enter 192.168.7.2 as the host name in the window that pops up; make sure other settings are selected as shown below. Click Open when ready:
  • Ignore the diabolical potential security breach warning; just hit yes to continue…
  • An old-school DOS-style (or CP/M if you’re old like me) window will pop up. Type “root” at the login prompt. Voila, you’re officially a Linux user now!
  • Bonus task: check that you booted from the microSD card: type in “hostnamectl” at the green prompt. This will spew forth info about your OS, kernel, etc.:

If it doesn’t look like this (i.e. older version of OS or kernel), you might not have booted from the microSD card; you want to go back to STEP 10 again.


STEP 12: Use a Linux text editor in to modify the BBB boot-up options

Almost done. Hang in there.

The full extent to my Linux newbie-ism became apparent at this stage. So, a quick primer on Linux commands we are about to use:

  • ls”: lists directory contents (just like “dir” did in DOS). Note that is a lowercase “L”, not the number “1”.
  • ls -l”: lists directory contents in a column; easier to interpret.
  • cd”: changes directory (just like DOS)
  • nano”: opens a file in a text editor called nano
  • exit”: logs you out of the SSH window
  • Linux/SSH nuance #1: make sure you actually have the Linux SSH window selected when you type. Otherwise your typing will end up in another window (surprising easy to do)
  • Linux/SSH nuance #2: you can cut/paste from windows/files outside of the Linux/SSH window. Select the text you want to cut, hit Ctrl-C (or right-click to copy), select the Linux/SSH window again, then right-click your mouse to paste.
  • Linux/SSH nuance #3: spacing, capital/lowercase letter need to be followed EXACTLY.

That’s pretty much all you need. Check out this newbie guide to Linux commands if you want to experiment. Back to the tutorial…

  • First, enter “cd /boot” at the command prompt in the Linux/SSH window. note that your command prompt will now display root@beaglebone:/boot#
  • Next, check to make sure that the uEnv.txt file is in the directory by typing “ls”. You should see it in the blurb of text that pops up.
  • Your progress window, with everything you entered so far, is shown below (highlighted in yellow boxes). The file you are looking to verify is highlighted in a green box:
  • Now, let’s edit the uEnv.txt file. At the prompt, enter “nano uEnv.txt”, be sure to use exact spacing and follow the lowercase and capital letters exactly (per Linux/SSH nuance #3 above):

Voila, a nano text editor will appear with the uEnv.txt file open:

  • Use the down-arrow cursor on your keyboard to scroll down to the end of your file. position your cursor right after the “#” on the last line of the text file as shown below, then hit backspace to delete the “#”:
position your cursor as shown here; delete the “#” on the last line of text
  • Once that darn # is deleted (this “un-comments” the line of code, allowing the microSD OS to be flashed directly to the BBB onboard memory [eMMC]). Now hit “Ctrl-X” (that’s the control button BTW),then “Y” and enter (to save the file — your window look like the one below as you do this:
  • Whew! You’re pretty much done. Just type “exit” at the prompt to exit Linux and close the PuTTY window…
just about done! just one more step after this…

STEP 13: Re-Boot your BBB from the microSD card

Now that you have the boot file updated on your microSD card, you need to reboot your BBB to transfer (flash) the image from the microSD card directly to the BBB onboard memory (eMMC). Do this next:

  • Unplug your BBB from your PC.
  • Repeat STEP 10 above; specifically: press/hold the USER/BOOT button as shown below; keep the button pushed/held, while plugging in the USB cable:
look familiar? repeating STEP 10, above…
  • Unlike STEP 10, the LEDs should start blinking in a Knight Industries 2000 night-rider like pattern. Here’s a video of what that LED flashing pattern will look like:
LED flashing, KITT-style
  • After about 10 minutes, the flashing will stop, and the BBB will power down.
  • Unplug your BBB, take out the microSD card.
  • Plug the USB cable into your PC again. If everything went as planned, the BBB should boot up as before. You can follow STEP 11 again (specifically use the “hostnamectl” command via the PuTTY SSH program).

If the screen looks like this, and the microSD card is NOT installed, then you have successfully updating the OS software image on your BeagleBone Black.

Congratulations and good luck on using your BBB!