This is an old revision of the document!


Debian Installation on SD Card for BeagleBone Black

In order to install Linux on the BeagleBone Black an image of the operating system and a SD Card is needed. The operating system image will be burned on the SD card. Burning will performed at your computer or Laptop, normally a Microsoft Windows, Mac OS X or Linux computer equipped with a SC card reader device.

Afterwards the SD card will be plugged in at the BeagleBone Black and Linux will be booted from the SD card. After booting is finished, it is a good advice to update the BeagleBone Black with the news software releases.

Getting Debian Image

First, download an image to your computer. I am using the Debian Image Jessie IOT1) (bone-debian-8.7-iot-armhf-2017-03-19-4gb.img).

This image contains:

  • Distribution Debian 8.7 (Jessi)
  • Linux Kernel Version 4.4.54-ti- revision r93

Due to the fact, that the provided images are changing frequently in time and sometimes older images are no more available, this image bone-debian-8.7-iot-armhf-2017-03-19-4gb.img.xz is also available at the TKN Web Server.

If you like newer or other images, you can find them at beaglebord.org. In most cases, the image-file is compressed in an archive, indicated by the .xz suffix at the end of the file name (e.g. debian-wheezy-7.2-armhf-3.8.13-bone30.img.xz).

Decompressing and Burning the Debian Image

In the past the process of decompressing an burning the image was a very complex task. First have to decompress the image with an appropriate compression tool, next the SD card needs some portions with appropriate parameters. These portions need to be formatted. And than the image can be flashed. The tools for this process are depend from the operation system.

Today the process ist done by a single tool, called balenaEtcher. First, download belenaEtcher from https://www.balena.io/etcher/, install and open ist. belenaEtcher is available for Microsoft Windows, Linux and Mac OS X.

After starting galenaEtcher for following window opens up, similar like this:

ASCII���ScreenshotFig. 1: balenaEtcher Main Window

Here you can see the illustration of the process, starting with selecting the image file followed by selecting the target. The target is the device, where you have inserted the SD card. At the end the image file will be Flashed to the SD card.

Starting by selecting the image file press the “Select Image” button. A window opens and prompts you selecting the image file:

ASCII���ScreenshotFig. 2: balenaEtcher Select Image

At my computer the image file is located at the download folder. Note, that the image file is in compresses xz Format. The image will be decompressed by balenaEtcher. Now, select the image file and press the open button.

In the nextstep, press the button “Select Target”. Now, another windows opens. In this window, you get a selection of devices. Choose the device, where your SD card is plugged in. In my case (see Fit. 3), this is /dev/disk6 the “Apple SDXC Reader Media” device. Now press the “Continue” button.

ASCII���ScreenshotFig. 3: balenaEtcher Select Target

Finally, select the “Flash!! button. The main windows changes. Now, the progress of the flashing is shown (see Fit. 4). After flashing is completed, a verification of the content of the image file is compared with the contents of the SD card. If everything is successful, you cat remove the SD card and quit the program.

ASCII���ScreenshotFig. 4: balenaEtcher Flash!

At this point, we have built an SD card with the Linux operating system and can now start booting the BeagleBone Black.

Linux

After inserting the SD card into your computer open terminal window (e.g. Terminal, Konsole or Xterm) depending on the distribution and your personal choice.

To determine the device id of the SD card type

fdisk -l

at the command prompt. This gives you a list of all devices attached tom the computer.

Device     Boot   Start       End   Sectors   Size Id Type
/dev/sda1  *       2048    999423    997376   487M 83 Linux
/dev/sda2       1001470 976771071 975769602 465,3G  5 Extended
/dev/sda5       1001472 976771071 975769600 465,3G 8e Linux LVM
 
Disk /dev/mapper/ubuntu--vg-root: 461,7 GiB, 495741566976 bytes, 968245248 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
 
 
Disk /dev/mapper/ubuntu--vg-swap_1: 3,6 GiB, 3850371072 bytes, 7520256 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
 
 
Disk /dev/mmcblk0: 7,4 GiB, 7969177600 bytes, 15564800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
 
Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk0p1       8192 15564799 15556608  7,4G  7 HPFS/NTFS/exFAT

At the end of the list above, the device id of the SD card is shown. In my case it is the device /dev/mmcblk0p1.

If the SD card has been mounted by your operating system, the cards must be unmounted, in my case

umount /dev/mmcblk0p1

Use the device of the SD card to flush the image by executing the command

 sudo dd bs=1M if=./debian-wheezy-7.2-armhf-3.8.13-bone30.img of=/dev/mmcblk0

Boot the BeagleBone Black

To test, if everything is correct you must insert the SD card into the card slot of the BeagleBone Black and boot. During boot, press the ”User Boot“ button (see figure 5). Otherwise the BeagleBone Black will not boot from your SD card, but from the eMMC. Also be sure, that the BeagleBone Black is connected via the Ethernet interface and has access to a DHCP server (a DHCP server is installed at TKN or at home on your DSL router).

If the boot process is finished, you can establish a ssh connection to the BeagleBone Black. The needed ssh client is already installed at Linux or Mac OS. If you are using MS Windows you have to install a client by yourself. A popular client is Putty, that can be obtain from http://www.putty.org.

Using Linux or Mac OS, open a terminal application and enter the following command:

ssh debian@beaglebone

In the above example a ssh connection to the host beaglebone with the userid debian will be established. The ssh client will ask you for the password of the user debian that is also debian.

For MS Windows users, please follow the instructions of Putty.

Fig. 5: User Boot

1)
Bigger software components like the X-Window system are missing in images with the suffix IOT, resulting in a small thin image compared to images containing nearly the whole Debian distribution.
network_protocol_programming_lab/2_installdebiansd.1584688587.txt.gz · Last modified: 2020/03/20 08:16 by rathke
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0