Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Building Networks and Servers using Beaglebone
Building Networks and Servers using Beaglebone

Building Networks and Servers using Beaglebone: Set up and configure a local area network and file server by building your own home-based multimedia server

$21.99 $14.99
Book May 2015 110 pages 1st Edition
eBook
$21.99 $14.99
Print
$26.99
Subscription
$15.99 Monthly
eBook
$21.99 $14.99
Print
$26.99
Subscription
$15.99 Monthly

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : May 28, 2015
Length 110 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781784390204
Category :
Table of content icon View table of contents Preview book icon Preview Book

Building Networks and Servers using Beaglebone

Chapter 1. Installing Debian onto Your BeagleBone Black

In this chapter, you will learn how to install Debian onto your BeagleBone. There are two ways to boot the BeagleBone and run the OS: the first way is to run off the microSD card, and the second is to run off the internal eMMC (flash). BeagleBone has 4 GB of onboard flash, which is not expandable. It is recommended that the microSD be used so that there is ample room left for you to install other programs that will be needed later in the book, and this is what will be shown in this chapter. In order to install the OS, you require a microSD card (an 8 GB card will be fine), an SD card reader (which most laptops have built-in), and the Windows program Win32 DiskImager. This program will write the actual OS image to the SD card, which the BeagleBone will boot from. An archival program, such as WinRAR or 7-Zip, is also needed to extract the OS image from the downloaded archive.

Setting up to install Debian


At this point, you should install Win32 DiskImager and the archival program. This will be used to write the Debian image on the SD card. The archive for the disk image is located at http://beagleboard.org/latest-images and http://debian.beagleboard.org/images/bone-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb.img.xz.

In order to start the installation, perform the following steps:

  1. Extract the files from this archive and run Win32 Disk Imager. If you are using Windows 7 or higher, you will have to run the program as an administrator in order to write the Debian image to the SD card.

  2. Select the extracted image file using the blue-colored folder icon, and make sure that the device selected to be written to (F:\ in the following picture) is your SD card.

  3. Click on write and the image will be written to the SD card, as shown in the following screenshot:

  4. Once the image is written to the SD card, remove the card from the PC and insert it into the SD card slot on the BeagleBone.

The following image shows the BeagleBone board with HDMI, Ethernet, and USB installed and an SD card inserted:

At this point, the board is ready to be powered up and to run Debian. The USB cable may not have enough capacity to power the BeagleBone board, so it is strongly suggested that the board be powered by a 5-volt DC power cube with a current output of 2 amps. This will provide sufficient power to the board. Turn on the power to the board. If the board does not power up, press S3 to enable the power. S3 is located directly above the Ethernet connection. After about a minute, your screen should display a login prompt. If this does not happen, power off the board and hold down the boot button (located near the top-right corner of the board, close to the SD card); then apply power to the board and don't release the boot button until the user LEDs begin to flicker.

The following screenshot shows the display that you will get after you log in for the first time:

In order to login, the username is debian and the password is temppwd. The next thing that needs to be done is to get all the updates that are available, and then the image should be resized in order to use the entire 8 GB of the SD card. In order to update, the following commands should be run:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

All of these three commands can be run at the same time by inserting && between each command. After the update is completed, reboot the board (sudo reboot) and relogin. At this point, the image will be resized to use the entire size of the SD card.

Before the resizing operation, run the following command to show how much of the SD is being used:

df –h

The following screenshot shows the output of the df –h command:

Using the SD card before the resizing operation

First, list the volumes that are available on the SD card by running the following command:

ls –l /dev/mmcblk*

The output will show all the volumes, as shown in the following screenshot. The volume that will be modified is the first volume in the list, /dev/mmcblk0. This is because mmcblk0 refers to the SD card.

A list of all the available volumes is shown in this screenshot.

At this point, the superuser should be logged in to complete the disk resizing, by executing the following command:

sudo su

Again, the password is temppwd. Once the superuser is active, run fdisk on the first volume with the following command (also shown in the preceding screenshot):

fdisk /dev/mmcblk0

Once fdisk is running, enter p as the first command. This will display the partition information of the SD. The resizing operation will delete the empty partitions and expand the primary partition to use the entire SD.

First, press d for delete and then press 2 for partition 2. Next, press n for new, p for primary, and 2 for partition 2. Specify the start and end sectors for the new partition—just select the default values by pressing Enter. In fact, outside the first n, they are all default choices and pressing Enter alone to confirm the choice is all that is needed. Select w to commit the changes to the SD card. Notice that the partition table in this example was "busy," so a reboot is needed for the changes to be reflected. Reboot by entering sudo reboot from the terminal command line, and re-login to update the changes for the next step of resizing the filesystem.

As we can see in the following image, the resized partition is ready to have the file system resized onto it.

Now the file system is ready to be resized. This will take only one command, as follows:

resize2fs /dev/mmcblk0p2

After this command, the SD card will have all its space available to the OS. Running another df –h command will confirm that the new disk size is now much more than 2 GB.

The following screenshot shows the new file system on the SD card, which resulted from running the resize2fs command:

Installing Tightvnc


In order to remotely access the BeagleBone, the Tightvnc server needs to be installed with the following command:

sudo apt-get install tightvncserver

Once the server is installed, it needs to be set up as follows:

tightvncserver :1

This will then ask for a password to access the desktop. Enter a password and verify it. This will be the password used to login to the BeagleBone with the VNC remote viewing client. If a remote connection is needed, to view what is happening on the BeagleBone, a separate password can be entered.

After the server is set up, reboot and re-login. Open a terminal and enter the following command to get the IP address of the BeagleBone:

ifconfig

This will be needed on the remote PC to access the system.

Run the VNC server in order to allow the BeagleBone to start accepting remote connections with the tightvncserver :1 command.

On the remote computer, a VNC viewer should be installed. There are many options to choose from, which will work. In the remote address, enter the BeagleBone's IP address and add the :1 at the end and connect to the BeagleBone.

When you run the VNC viewer, you will see a ''connection'' screen similar to the one shown in the following screenshot:

The default encryption method is to let VNC choose, so just go with the default. The next window that pops up will be the login window, where you have to enter the password that you were prompted for when you installed the VNC Server, as shown in the following screenshot:

Tip

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Running the Cloud9 IDE


Fortunately for us, the good folks who maintain the Debian image files have included the Cloud9 IDE in the standard image. For those of you who don't know what an IDE is, the letters stand for Integrated Development Environment. Cloud9 allows you to write and debug various types of source code. In order to access Cloud9, you have to simply enter the IP address of the BeagleBone in your favorite web browser followed by :3000, because Cloud9 uses port 3000.

Summary


In this chapter, the BeagleBone was set up to run Debian on a resized SD card. The image was also updated to get the latest upgrades available. Then, the LXDE desktop environment was installed. Finally, the Cloud9 IDE was set up and run. Now, the BeagleBone is ready to build the applications needed to control the devices discussed in the later chapters. In the next chapter, we will talk about the software that will be used to store streamed video, and serve up both audio and video files to any device on the network.

Left arrow icon Right arrow icon

Key benefits

What you will learn

Install and configure the latest Debian image onto your BeagleBone Set up simple file services and multimedia sharing services Monitor your network traffic to ensure highspeed streaming Build and utilize a RAID storage system Stream live video action from your BeagleBone Make your multimedia server wireless by setting up a DHCP WiFi Server

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : May 28, 2015
Length 110 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781784390204
Category :

Table of Contents

13 Chapters
Building Networks and Servers Using BeagleBone Chevron down icon Chevron up icon
Credits Chevron down icon Chevron up icon
About the Authors Chevron down icon Chevron up icon
About the Reviewers Chevron down icon Chevron up icon
www.PacktPub.com Chevron down icon Chevron up icon
Preface Chevron down icon Chevron up icon
Installing Debian onto Your BeagleBone Black Chevron down icon Chevron up icon
Installing and Configuring Multimedia Server Software Chevron down icon Chevron up icon
Installing and Configuring Network Monitoring Software Chevron down icon Chevron up icon
Installing and Setting Up a BeagleBone RAID System Chevron down icon Chevron up icon
Streaming Videos Chevron down icon Chevron up icon
Setting Up a Wireless Access Point Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.