Difference between revisions of "PB:Download a suitable Image"

From Klaus' wiki
Jump to: navigation, search
Line 39: Line 39:
<source lang=bash>
<source lang=bash>
] $ ls -lart /dev/sd*
] $ ls -lart /dev/sd*
] $  ls -lart /dev/sd*
brw-rw----. 1 root disk 8,  0 Feb 21 16:24 /dev/sda
brw-rw----. 1 root disk 8,  0 Feb 21 16:24 /dev/sda
brw-rw----. 1 root disk 8,  2 Feb 21 16:24 /dev/sda2
brw-rw----. 1 root disk 8,  2 Feb 21 16:24 /dev/sda2

Revision as of 08:56, 26 February 2018

The PcoketBeagle (PB) does not come with a built-in flash memory, so in order to make it run a suitable image must be downloaded and burnt onto a SD-card.

Jump over to BeagleBoard's download section and get one of the headless images. A headless image is a complete Linux operating system without any graphics support - and therefore also a fair bit smaller than the images with graphics support. At time of writing the "Debian 9.3 2018-01-28 4GB SD IoT" is the most current. It contains a 4.9.78 kernel - a fairly new kernel.

All work here is described using the Centos development host running as a virtual computer. If you prefer to work in Windows there is a description over at [1].

Once the image has downloaded to you development host find you 4++ GB SD card and a USB device that the card can be inserted into. The reason for using a USB MultiMediaCard (MMC) reader is that it can be very hard to route the built-in MMC card reader, that many laptops are fitted with, from the host operating system to the guest, i.e. to the Centos.

Attach the USB card reader with the SD card inserted to your laptop.

In your virtual machine menu find something like this picture:

Screenshot 20180221 155309.png

Navigate to the point where you downloaded the image, typically in ~/Downloads

] $ cd Downloads
] $ ll
total 6.1G
drwxr-xr-x.  2 klaus klaus 4.0K Feb 21 16:02 .
drwx------. 44 klaus klaus 4.0K Feb 21 11:14 ..
-rwxrwx---.  1 klaus klaus 3.4G Feb 20 14:56 bone-debian-9.3-iot-armhf-2018-01-28-4gb.img.xz

Next thing is to unpack the image as it comes hard compressed.

] $ unxz bone-debian-9.3-iot-armhf-2018-01-28-4gb.img.xz

after a few minutes, depending on you computers speed you'll end up with a .img file around 3.4 GB.

The .img file contains a fulle disk layout with a boot partition and a root (/) partition with all the Linux utilities.

Transfering the image to the SD card is a matter of locating the correct device. Try

] $ ls -lart /dev/sd*
brw-rw----. 1 root disk 8,  0 Feb 21 16:24 /dev/sda
brw-rw----. 1 root disk 8,  2 Feb 21 16:24 /dev/sda2
brw-rw----. 1 root disk 8,  1 Feb 21 16:24 /dev/sda1
brw-rw----. 1 root disk 8, 16 Feb 21 16:24 /dev/sdb
brw-rw----. 1 root disk 8, 17 Feb 21 16:24 /dev/sdb1

The -lart sorts the output in reverse order so the newest device will be presented in the bottom of the list. If you just inserted the USB-reader the newest device is typical sdb or sdc.

NOTE: NEVER try to use the sda devices. It is your harddisk for the Centos operating system.

Now in order to transfer the image to the SD disk issue

] $ sudo dd if=./bone-debian-9.3-iot-armhf-2018-01-28-4gb.img of=/dev/sdb BS=1M

and wait. Wait even longer. It takes several minutes if not several ten minutes. Keep an eye on your USB writer - many has a LED built-in and while it blinks everything is working as expected.

After waiting for many minutes you'll eventually get somethine similar to this.

] $  sudo dd if=./bone-debian-9.3-iot-armhf-2018-01-28-4gb.img of=/dev/sdb bs=1M
3400+0 records in
3400+0 records out
3565158400 bytes (3.6 GB) copied, 9276.85 s, 384 kB/s