As mentioned previously, we will use the BeagleBone Black embedded board for our experiments. It is assumed that you will have completed the following:
bone-debian-7.5-2014-05-14-2gb
, which is related to a 2 GB SD card (as shown in the next screenshot). Nevertheless, it's strongly advised that you use cards with a larger size and we'll soon see why.192.168.0.15
, which you will need to adapt according to your local network. Most of the rooters provide a web interface for this purpose.debian
as the username and temppwd
as the password.BeagleBone Black has the advantage of booting either from an SD card or on-board flash (eMMC). The pros and cons of each of these is beyond the scope of this chapter. Generally, for this book, you should rely on the SD card support for the following reasons:
The SD card induces small additional latencies that you won't even notice, so it is better to use it as a sandbox. So feel free to explore and try crazy things so that you can learn without limitations and worry.
If you update or install anything right away after a boot, you will encounter problems related to disk space.
Indeed, if you use PuTTY (www.putty.org) or any other SSH software to connect yourself to the board (such as, 192.168.0.15
) and look at the rootfs
space information, you can guess that the available size will be quickly saturated.
So, as the server administrator, it is up to you to resolve the size constraints.
The next topic will describe how you can achieve this task easily.
The default free space is really small; for example, you can fill it completely with just one upgrade. As a result, the very first thing to do at boot is to resize the /root
partition.
Resizing a partition is not recommended for first timers. The good news is that you won't have to enter many commands; you can make your life easy by relying on a dedicated script provided with the board, which will do all that for you.
Enter the following two commands:
debian@beaglebone:~$ cd /opt/scripts/tools/ debian@beaglebone:/opt/scripts/tools/$ git pull
In this directory, we have downloaded the last code from the official repository, so we can start the script thereafter:
debian@beaglebone:/opt/scripts/tools/$ sudo ./grow_partition.sh
While running, this script will display a lot of details, which, thanks to the author, you don't have to care about.
You can now go on to reboot your board (don't forget to press the user's button), as follows:
debian@beaglebone:/opt/scripts/tools/$ sudo reboot
Now, if you check, you'll see that the free space has been resized to the SD card's capabilities.
Now, you can continue with the update and upgrade…
The local /root
partition from the SD card is fast to implement and easy to use. Nevertheless, thinking about how you will organize your server is a good habit. Linux can handle multiple remote filesystems that you can write to. For instance, for all your media contents, you can use an NFS partition from a distant drive or a device that supports uPnP.