BBB New Debian Image

From Klaus' wiki
Revision as of 15:39, 3 May 2015 by Klaus (Talk | contribs)

Jump to: navigation, search

Installing a new official Debian image on a SD card

Download from the site or elsewhere a fresh image suitable for the BBB.

You will typically get a file named like this


Date and version number may vary.

In your download directory execute this command

]$ xz -dk bone-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb.img.xz

this will unpack the image into a file like this


Locate your SD card

Have a 4GB SD ready and inserted into your computer. Execute

]$ ll /dev/sd*


]$ ll /dev/mmcblk*

the way your computer interface to the SD card will either see it as a disk drive and name it /dev/sdN, where N is the next free letter - e.g. you have one disk already installed in your computer it is most likely sda[09], the next disk the system recognises will be sdb.

On my laptop when I use the SD slot directly in the laptop the system sees the SD card as a new mmc block device, hence the mmcblk name.

Another way to determine the name of the freshly inserted SD card is to execute

]$ ls -lart /dev

this will list the content of /dev in reverse order with the newest at the end of the list, i.e. at the bottom of your console.

Removing the SD card and rerunning the command will give you the final evidence to what the name is, since it is now missing in the list.

If the SD card i preformatted, which most are, you will see two - or more - devices like this

]$ ll /dev/mmcblk*
brw-rw----. 1 root disk 179, 0 May  1 13:15 /dev/mmcblk0
brw-rw----. 1 root disk 179, 1 May  1 13:15 /dev/mmcblk0p1

The mmcblk0 is the main block device and the mmcblk0p1 is the first partition on the disk.

Be careful to locate your SD card, since transferring data could accidentally ruin you permanent hard disk if you write to that instead of the SD card.

Transferring the image to the SD card

In order to transfer the disk image to the SD card first ensure that it is not mounted, e.g. by removing the card and re-insert it into the reader slot or by running a umount command (RTFM umount).

Next issue this command

]$ sudo dd if=bone-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb.img of=/dev/mmcblk0 bs=1M

The dd command is a versatile utility that takes an input file (if) and an output file (of) and copies the input file to the output file (/dev/mmcblk0) in 1 mega bytes blocks (BS=1M). Expect 10 to 20 minutes before the command returns depending on the speed of your card reader and the SD card. Note here, that we use the main block interface file mmcblk0 not the mmcblk0p1 or the sdb not the sdb1.

When finished you will get a report like this

3700+0 records in
3700+0 records out
3879731200 bytes (3.9 GB) copied, 557.971 s, 7.0 MB/s

and your SD is ready to run in the BBB.

Starting the new image on BBB

Remove the SD card from your computer and insert it into the BBB.

Find the user button located just above the SD card slot.

Press and hold the button while applying power to the device. When the device starts to boot (blinking leds) release the user button.

If you have previously connected your BBB using the

]$ ssh root@

you will probably get a message like this

]$ ssh root@
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
Please contact your system administrator.
Add correct host key in /home/klaus/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/klaus/.ssh/known_hosts:49
ECDSA host key for has changed and you have requested strict checking.
Host key verification failed.

which tells us that in the ~/.ssh/known_hosts file we keep a fingerprint of hosts that we have previously accepted to be legal computers to connect to. You have to edit the ~/.ssh/known_hosts file and remode the line(s) beginning with and then try to connect once again.

First time you connect to your new image you will be prompted to verify the fingerprint of the connecion. Do that by typing yes.

Determine the version of your new image by issuing this command

root@beaglebone:~# uname -a
Linux beaglebone 3.8.13-bone70 #1 SMP Fri Jan 23 02:15:42 UTC 2015 armv7l GNU/Linux

This is at the time of wirting the latest official supported image, but not necessarily the newest - you may find newer images floating around the Internet. The following device driver development will take outspring in the version.