====== 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 flashed on the SD card. Flashing will be performed using your computer or laptop, normally a Microsoft Windows, Mac OS X or Linux computer equipped with a SD card reader. Afterwards the SD card will be plugged into the BeagleBone Black and Linux will be booted from the SD card. ===== Getting the Debian Image ===== First, download an image to your computer. In this class we will use the Debian Buster IoT((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. )) Image (bone-debian-10.3-iot-armhf-2020-04-06-4gb.img). This image contains: * Distribution Debian 10.3 (Buster) * Linux Kernel Version 4.19.94-ti revision r42 Download the image [[https://debian.beagleboard.org/images/bone-debian-10.3-iot-armhf-2020-04-06-4gb.img.xz|bone-debian-10.3-iot-armhf-2020-04-06-4gb.img.xz]] from the [[http://beagleboard.org|beagleboard.org]] website. If you like newer or other images, you can find them [[https://beagleboard.org/latest-images|here]]. 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. bone-debian-10.3-iot-armhf-2020-04-06-4gb.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 you had to decompress the image with an appropriate compression tool, next the SD card needed some portions with appropriate parameters. These partitions had to be formatted. And then the image could be flashed. The tools for this process are dependent on the used operation system. Today the process is done by a single tool, called balenaEtcher. First, download belenaEtcher from [[https://www.balena.io/etcher/|https://www.balena.io/etcher/]], install and open ist. belenaEtcher is available for Microsoft Windows, Linux and Mac OS X. After starting balenaEtcher for following window opens up, similar like this: {{:network_protocol_programming_lab:BalenaEtcher_main_window.jpeg?500%}} 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: {{:network_protocol_programming_lab:balenaEtcher_select_image.jpeg?500%}} At my computer the image file is located at the download folder. Note, that the image file is in compressed xz Format. The image will be decompressed by balenaEtcher. Now, select the image file and press the open button. In the next step, 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. {{:network_protocol_programming_lab:balenaEtcher_select_target.jpeg?500%}} 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. {{:network_protocol_programming_lab:balenaEtcher_flash.jpeg?500%}} At this point, we have built an SD card with the Linux operating system and can now start booting the BeagleBone Black. If you are an experienced linux user you can also manually decompress the image and use a tool like ''dd'' to flash the image in 2 commands. ===== Boot the BeagleBone Black ===== To test, if everything is working correctly you must insert the SD card into the card slot of the BeagleBone Black and boot. During boot, press the "//User Boot//" button (see ). The BeagleBone Black will boot automatically as soon as power is applied. **IMPORTANT: First press "//User Boot//" button and then connect the power supply. And NOT the other way round.** Otherwise the BeagleBone Black will not boot from your SD card, but from the internal eMMC. To verify that your Linux image booted successfully, connect to your BeagleBone using one of the described methods in the next wiki page [[network_protocol_programming_lab:2_2_access_general|Accessing the BeagleBone Black]]. {{:network_protocol_programming_lab:beaglebone-user-boot.png}}