Starting with Arch Linux

Pretty much everything I have done with my Raspberry Pi boards so far has either used the Raspbian Linux operating system, or my own “bare metal” code. From time to time I have been a bit frustrated with some of the choices in Raspbian, such as the difficulty in building device drivers. I have also been noticing quite a few projects recently which have been based on Arch Linux instead.

Arch Linux has been available on the Raspberry Pi foundation downloads page for as long as I can remember, but I have never got around to giving it a try. Looks like today is the day!

The starting point is to download the OS image. In this case the 2013-02-11 version of Arch Linux. Next step is to burn it on to an SD card. I opened one of my new cards (in this case an 8GB Kingston Class 10) and used Win32DiskImager to write the image. My plan was to use it over ssh from my laptop, so I edited the file cmdline.txt to add an extra section ip= Following my own advice, I also added a contents.txt file describing the OS version and when I created the card, and labelled the back with a little sticky number 7

After connecting a network cable, I plugged in the power and watched the lights flicker. The web site claims that Arch boots in 10 seconds, so I gave it 20, then tried to “ping” the Pi from the laptop. No luck, even well over a minute later.

It was a lot of fiddling, but eventually I got the Pi plugged in to an HDMI TV, and powered it up. I was very disappointed to see that, despite all the flashing lights, it only got as far as the second startup log item before just hanging. The message indicated that no suitable device could be found for “RARP”. A bit of googling indicated that RARP is something to do with DHCP, so presumably my addition to the command line had not had the desired effect.

I removed the command line extra, found a network with DHCP to connect to, and tried again. This time it did boot in about 10 seconds, but got its address from the DHCP server, so I had to open that to find how to connect to the freshly-booted Arch system.

It seems that Arch Linux takes the idea of minimalism quite seriously. The only user provided with the system is “root”, with an obvious password of “root”, so the first thing I set out to do was to add a normal user so that I could experiment with stuff without all the risk of doing it as root. The steps were as follows:

useradd pi
passwd pi # then enter the new password twice
mkdir /home/pi
grep pi /etc/passwd # this showed that the new user has uid 1000 and gid 1000
chown 1000:1000 /home/pi

Once all that was done, I tested it with ssh pi@localhost, which worked and gave me a shell as the new user. Now I just make sure that the system is no longer using the default (wide-open) root password:

passwd # enter the new password twice

I could then disconnect the root ssh session and connect directly as the new user from the laptop using ssh pi@

With Debian-based Linux distributions it is common to log in as a “normal” user, and use “sudo” to temporarily execute commands with root privileges if required. I tried this but it seems that the Arch minimalism extends to not providing “sudo” either. For now the Pi is not connected directly to the internet, so I can’t go installing new packages willy-nilly, so I must see what I do have to play with and what I can accomplish with just the bare system.

I think that’s enough for today.


Leave a Reply

Your email address will not be published. Required fields are marked *