Now that we know about our hardware, let's install OS. BeagleBone Black and BeagleBone Green come preinstalled with Debian Linux on emmc storage. BeagleBone also supports booting from OS on an SD card. We can use a Linux setup on emmc for exercises in this book. But it is always better to install OS on SD card and boot from it. In case of wrong configuration or unexpected problems, we can install Debian image and start hacking again. Also, it is easier to copy-paste files on an SD card to and from a PC.
The BeagleBone wiki page has a list of OS known to be working on BeagleBone: http://elinux.org/BeagleBone_Operating_Systems. It includes Android, Ubuntu, Angstrom, Minix, WinCE, and so on. Officially Linux distribution Debian is supported. All exercises in this book are tested on a wheezy 7.9 Debian image provided by beagleboard.org
. Still there should be no problem running these exercises on other Debian versions. Debian is a popular Linux distribution in the embedded world. It is one of the oldest and largest Linux distributions. There are more than 100 Linux distributions derived from Debian. Debian's stable branch is known to be one of the best-tested and most bug-free distribution. There are many cases of machines that run for over a year without rebooting. This is important for unattended embedded systems. Debian has thousands of installable packages. It uses APT (Advanced Package Tool) using deb packages. You can get more information about Debian on http://debian.org.
When you connect the BeagleBone to PC using a USB-to-MiniUSB cable (Micro USB for BeagleBone Green), it gets detected as flash drive providing you with a local copy of the documentation and drivers. When it autoruns, you see the browser opened with the page Getting Started. If it does not run automatically, you can manually open the file START.htm
or the README.htm
file inside the BeagleBone flash drive. This HTML page has a link to "update to latest software" on the left. It provides you with a step-by-step procedure with screenshots to install the latest prebuilt Debian image on the SD card. An online version of this webpage is available at: http://beagleboard.org/getting-started#update.
Here are the important steps to install the latest Debian image on the BeagleBone:
7zip
available at http://www.7-zip.org/download.html.You will get an .img
file. This is an actual image file..img
file on a SD card using the following command. You need to find the name of the SD card file. You can get that in dmesg
command output after you connect the SD card. Put that in place of sdx
in command.sudo dd if=<image_file_path> of=/dev/sdx bs=1M ; sync
On a Windows system, you can use image writer software like win32diskimager, available at: http://sourceforge.net/projects/win32diskimager/files/latest/download. Select .img
file and correct the SD card drive and click the write button to dump an image on the SD card.
/etc/issue
and /etc/issue.net
on the SD card to print that it is booted from the SD card. The next the shell access login will show that message.3.137.184.90