Tag Archive: raspberry pi


So, let’s continue configuring that Raspberry Pi, right? First, I would like to observe some weird behaviour. Please note I have attached a monitor, keyboard and screen to the Raspberry Pi, so I am not using a serial console, as I did when I configured my BeagleBoard.

The Raspberry Pi supports my monitors resolution 1280×1024, while the BeagleBoard does not (at a refresh rate high enough to be accepted by the monitor…. details) Another difference is that it works “out-of-the-box” on the Raspberry Pi. Just plug the monitor in and power it on. It will find out what resolution to use by itself, while the BeagleBoard required it as a kernel parameter.

The BeagleBoard is advertised as a developer board, while the Raspberry Pi aims at being a teaching tool. Another difference between those boards is that the BeagleBoard has a mounted RS-232 connector, while the Raspberry Pi only has the UART to pins on the expansion header, which is 3.3 Volt level. Therefore some level converters are required to be able to use this thing. I have ordererd this one on DX.com. The name says TTL, but in the specs it says “VCC: 3V / 5V”, therefore I think this one will do the trick. But I guess I will have to verify the voltage, as the Raspberry is *not* 5V tolerant.

DX.com, the chinese webshop, selling all kinds of stuff. I have ordered stuff there before. Free shipping, it may take a while to get it, but it’s for free. Not all my orders there have been without problems, but their customer services are good. If there are any problems, they offer replacement of refund. No difficult questions asked.

Anyways, why did I even start talking about the monitor being connected stuff, well, it’s because I am unable to log in (as root, I haven’t created users yet) on tty2, tty5 and tty6. But it works on tty1, tty3 and tty4. Looking at /var/log/auth.log

Nov 17 10:15:54 rpi-server login: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
Nov 17 10:15:54 rpi-server systemd-logind[98]: New session c1 of user root.
Nov 17 10:15:54 rpi-server login: ROOT LOGIN ON tty1
Nov 17 10:16:04 rpi-server login: pam_securetty(login:auth): access denied: tty ‘tty2’ is not secure !
Nov 17 10:16:12 rpi-server login: FAILED LOGIN 1 FROM tty2 FOR root, Authentication failure

So, we see a successful login and an unsuccessful one. They’re similar for the other tty’s mentioned. Asking this question go Google gives me securetty. /etc/securetty is a text file which lists the tty’s where root is allowed to login. The content of this file agrees with the observed behaviour.

Still the question remains, why was it preconfigured with this content in the /etc/securetty file? One can assume it has been made for testing purposed, forgot about it, and ended in the image. Or is there a Raspberry Pi specific reason for doing this? Anyhow. I was planning to use this Raspberry Pi headless, so it doesn’t matter at this moment. However I am thinking about using a second Pi as desktop machine.

Well… the mystery has been solved. Let’s continue configuring this thing. Setting it up as NFS server… I am not sure if I have described this before when I’ve set this up on my BeagleBoard. However, due the conversion of ArchLinux to systemd, it would be outdated anyways.

Anyhow, since I’ve typed quite a lot already, the NFS configuration will go to yet another post. I have written two posts and the only thing I’ve done yet is booted it up, set root password and hostname.

PS: I’ve found an interesting link:Small Linux PCs overview

So… time to install ArchLinuxARM on my Raspberry Pi.

I will be using the ArchLinux image for the Pi released on 18 September 2012. I believe this is the first release using the new ARMv6 repo. This is an full image of a 2 GB SD card, so just a simple # dd bs=1M if=archlinux-hf-2012-09-18.img of=/dev/mmcblk0 will do the trick, given you enter this command as root, on the right machine, as stupid me entered this command on the BeagleBoard in stead of the laptop.

Since I am using a 16 GB SD Card, I will have to resize the partition to use the full card. However, I am planning to do this as final step, so I can create an 2 GB image of the configured system.

Given above steps went correctly, just insert the SD card into the Raspberry Pi and power it on. ArchLinux boots up. At this point, the /boot partition still contains the old-style bootloader. The new bootloader is however in the repository. As a first step I am planning to do an upgrade anyways. The default login is username/password root, which of course has to be changed. Anyhow… about upgrading the system, on ArchLinux:

# pacman -Syu

However, this gives an error less then 1024 bytes per second transferred the last 10 seconds. The default repository is set to a GeoIP/load balancer. It appears this sends me to the Chinese mirror. When pinging it I have a ping of ~450 ms. So, editing the /etc/pacman.d/mirrorlist. commenting the “load balancer” out, and removing the # from the Dutch mirror solves the problem, and the upgrades, including a new bootloader in the /boot partition, have been installed.

So… some basic tasks that need to be executed now, such as setting up root password, hostname etc. On ArchLinux, this used to go to /etc/rc.conf by setting HOSTNAME=, however, this method of setting up the hostname is deprecated. ArchLinux has switched to systemd recently. I have mentioned before, on my other machines, this switch required some changes. Merely the init= boot parameter, as there is some backwards compatibility with old configuration. However, it means I have to look at the new way of configuring stuff. (Yeah… I have been lazy for my old installations, not changing the configuration files to new style.) Please note that I can recommend setting the hostname first, before installing anything else, since some daemons may use it, and otherwise they’ll use the default.

# hostnamectl set-hostname rpi

However this gives an error: Failed to issue method call: org.freedesktop.PolicyKit1 was not provided my any .services files Apparently, for this to work, you need to install polkit and reboot first.

So, the Raspberry Pi is a British computer. It is ARM-based. Since we’re using UK hardware, let’s use some UK software as well. I am thinking about the operating system RISCOS.

RISC OS is a computer operating system designed in Cambridge, England by Acorn. First released in 1987, its origins can be traced back to the original team that developed the ARM microprocessor.

So, one could say, this is *the* OS that *should* run on ARM-based machines, like the Raspberry Pi. And since both are from the UK… do I need to say more?
Installing…. well… just download and extract the image and write it to the SD card. It’s a quite trivial task, right? Well…. I did something stupid there, well, with the ArchLinux image. I wrote it to the wrong SD card….. the SD card in my BeagleBoard in stead of my laptops SD card. Oops.

However, that’s out of scope regarding to this post. RISCOS, so, just writing the image, put it in the Pi and turn it on. On first boot, the font cache is being built, which may take a while. Also note a little configuration is required. The screen for example, the right resolution has to be chosen. On first boot, it looked like “letterboxed” and a rather low res. The screen type was set to “auto”, which apparently doesn’t have the desired effect. The dropdown boxes for choosing resolution etc. are grayed out. One has to select the monitor mpdel (I am using Generic) then the colours (I love to see UK spelling for that word in software) (“16 million), and then resolution and frame rate (refresh rate) can be chosen.

Another thing to note is the fact the network is disabled per default. One got to enable it before one can use the internet. After clicking to enable the internet, the system got to reboot. I must say the browser shipped with it, NetSurf, cannot handle some websites. It appears to be lacking JavaScript support, and for some reason I am unable to log in to this blog using that browser.

In the software repository, available through the package manager “Packman”, I have found a firefox port. However, it’s rather outdated (Bon Echo) and it is very slow. I must say, except for that firefox port, the system feels pretty responsive. But that firefox port is so slow it’s unusable.

I still need to play around with it some more, get to know the operating system, as it is different from what I am used to. This OS is around since 1987, one of the surviving operating systems from those days… less known… not running on x86 hardware. Interesting part here… it’s source has been released under a “shared source” license. “shared source”, as in, not an approved open source license. This is due a rather remarkable condition, the OS is only allowed to run on ARM hardware. It may not be ported to other architectures.

Well… I guess I will report some more about it later, but for now, I should get ready for class. Also, the Raspberry Pi, I should get ArchLinux running on there, and configured. This Raspberry Pi was going to replace my BeagleBoard anyways… and since I accidently overwrote the BeagleBoards SD card… I need to get the Raspberry Pi running… (especially since the BeagleBoard is unstable… and will not be able to reboot since I overwrote its SD card)

Just a fun fact, from wikipedia: RISCOS line endings are LF+CR (as compared to DOS/Windows CR+LF) Also… I am still looking for a way to get screenshots out of there… I don’t know what software can handle it’s file format for storing images. At least there is an NFS server for RISCOS.