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

Free Trial per month
Book May 2015 110 pages 1st Edition
eBook
S$29.99 S$20.98
Print
S$36.99
Subscription
Free Trial
eBook
S$29.99 S$20.98
Print
S$36.99
Subscription
Free Trial

What do you get with a Packt Subscription?

Free for first 7 days. $15.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

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 a Packt Subscription?

Free for first 7 days. $15.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

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

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.