berry pie cooked with rasp: init

Thu 12 June 2014

[caption id="" align="alignleft" width="100"]English: Rasp manufractured by Baiter Deutsch:... Rasp (Photo credit: Wikipedia)[/caption]

[caption id="" align="alignright" width="100"]Delicious berry pie. berry pie. (Photo credit: Wikipedia)[/caption]

I just bought the second cheapest computer in the world in 2014 (the cheapest being the raspberry pi model A). Here is my little experience with it. Many documentation is available, the reference being in the raspberry website.

unboxing

I've no photos nor videos, as I unboxed it in the bus while returning home. Moreover, I think this useless. The default packaging include only the motherboard. This is normal, it is to reduce costs (reminder: this cost less than 40$). To have a fully functioning computer, you need:

  • a power supply supporting up to 1200mA (take the one from your former mobile phone, the motherboard  of a computer or an USB hub usually cannot deliver such power without irreversible damages)
  • an SD card with enough space to store an OS like debian (take the one from your former camera)
  • an efficient way to control your raspberry pi
    • either a connection to your home LAN (wifi dongle in my case, may also be a ethernet connection in which case you must find a RJ45 cable)
    • or a regular USB keyboard and HDMI screen

The rest is not compulsory. Nevertheless I bought a case (the transparent one) to protect the pi (objects fall are not excluded) and to stabilize it. This case's box is a white carton box the size of a raspberry, with only a raspberry printed on it (the raspberry's logo) . This not a useful piece of information. No screw, only fit all the pieces (the pi and the 2 pieces of the box) together. Quite fast. One more superlative for the pi: the fastest computer to built in 2014.

installation

As I want to test many configurations easily and rapidly, I use images for the SD card. To move from one image to the other, I just remove the SD card from the pi, put it in my computer, use dd to backup the image, and copy another one store on my computer into the SD card (thanks to dd).

requirements

The tricky step without keyboard/screen is the OS installation. Given my configuration, the minimum requirements are:

  • auto-connect to my home LAN
  • autostart remote control capabilities (SSH, telnet, ...)

Translated into technical stuff taking into account my configuration, it looks like:

  • the minimum requirement to run the OS
  • kernel modules to deal with the wifi dongle
  • wpa_supplicant with the appropriate wpa_supplicant.conf
  • any dhcp client
  • any ssh server implementation

And that's enough.

image preparation

The recommended OS is based on debian (raspbian). It is no more than a regular debian for the appropriate architecture (ARMhf) with the adapted set of debian packages. So I try it. I also wanted to try the debian netinstall, but after few tenth of minutes fighting with qemu to try to emulate the pi, I gave up.

kernel modules for wifi present by default
network configuration dhpc client and wpa_supplicant present
ssh server ready to run

It should also be possible to use automatic installation software (chapter 4.4 of the debian installation manual). I prefer to prepare and test my images on a VM so that I can test several images without any physical manipulation of my pi (which is located at least at 1 meter of my laptop at this moment). I wanted to use qemu to prepare my images. Any other VM with the correct architecture is OK. For the raspbian installation, it should be:

qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" -hda 2014-01-07-wheezy-raspbian.img

Indeed, it is easier to directly boot an appropriate kernel. The raspberry pi  forum give some hints.

To prepare my SD card, I follow the following steps:

  1. put the card in the ad hoc slot of my computer
  2. download and unzip the lastest raspbian (2014-01-07-wheezy-raspbian.zip in my case)
  3. dd if="2014-01-07-wheezy-raspbian.img" of=/dev/sdb
  4. mount the futur root partition to edit few config files: mount /dev/sdb2 /mnt
  5. edit network related file /mnt/etc/network/interfaces and /mnt/etc/wpa_supplicant/wpa_supplicant.conf
  6. put the card into the pi and turn it on (the pi, not the card)

first experiences

It boots! and after less than 2 minutes, it is connected to my network (take some time to boot). the default login is pi and the default password raspberry.

Now, it needs some updates, a descent text editor (vim) and screen. This is all debian operations. Quite standard operation.

As suggesting by the welcoming message, I ran raspi-config. In this menu, I only expand filesystem and enable ssh (advanced config item).

Then I create a new user, test the ssh connection with keys, disable the possibility to use password for ssh connection (/etc/ssh/sshd_config)

use

The first use I tried is music player.

This machine does not come with many mass memory (I don't want to have an SD card more expensive thant the raspberry pi). So I installed sshfs to have some network file system. This way, it can read music from my computer.

Then, I tried to make some sound. Unfortunatly, it did not work immediatly and I was too tired to continue, so I have not enough experience to write it down right now.

Many people tried other uses.

misc

Still too many things to experiment with this tiny computer. hop, new category added.

EDIT

I can see there are clones of this stuff like the banana pi. I hope there will be one powered by solar panel.

(Non-)Related articles

Category: hardware Tagged: Debian Linux Raspberry Pi raspberry pi tools


Page 1 of 1