This guide will explain how to install Arch Linux using the NOOBS (New Out Of Box Software) zip file provided by the Raspberry Pi Foundation on their download’s page. I will also explain how to install a window manager and graphical login manager as well as a few other applications to get you started. This guide will only explain how to install Arch as the ONLY OS on the SD card !!
NOTE : I have an updated Arch Linux install guide which can be found here. However if you want to install enlightenment rather than LXDE (which i used in the new guide) then please continue to use this guide.
You will need an SD card formatted to FAT32 and either the NOOBS.zip file or the NOOBS Lite.zip file from the Raspberry Pi downloads page. The process is amazingly simple, once downloaded all you have to do is extract the .zip file onto the SD card using the program of your choice (Linux = 7zip/PeaZip/Ark/etc Windows = WinZip/7-Zip/PeaZip/etc).
Once this is done plug the SD card into the Pi and turn it on, it will start re-sizing partitions and creating new ones, when it is finished you will be left with 3 partitions on your SD card, the normal 2 and an additional recovery partition. You will be greeted by a selection of operating systems to choose from, select Arch Linux and click the “Install” button. You will see a warning appear about over-writing all existing data, click “Yes”, it will start installing Arch on your system for you, sit back and grab a drink, when it’s done you will see a pop-up notifying you that the OS has been successfully installed, click “OK”.
The Pi will reboot and you will be greeted by a command line interface, log in using the username root and the password root. The first thing we will do is change the password :
Change it to something memorable and secure. Arch uses a few files to control the startup scripts. These files are located in /etc. We need to do 2 things, change the timezone if necessary and give your pi a name.
The default timezone is “Europe/London”. If you live somewhere else, you can find the possible settings in the /usr/share/timezone/ directory. Find the subdirectory that describes where you live best, then find the file that corresponds to the location closest to you within your timezone :
# ls /usr/share/zoneinfo
# ls /usr/share/zoneinfo/America
These 2 commands would locate the timezone to America/New York, we now need to remove the old timezone link and create a new one :
# rm /etc/localtime
We now need to create a symlink to the timezone information :
# ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
We need to edit /etc/timezone so we will open it up using nano – a simple command line text editor and replace “Europe/London” with “America/New_York” :
# nano /etc/timezone
Press CTRL+X to exit, pressing Y to save and hitting ENTER when it asks for the name. Now we will change the name of the Pi :
# nano /etc/hostname
Change “alarmpi” to whatever name you would like to give your Pi, again hitting CTRL+X to exit and then pressing Y and ENTER to save. Because we changed the name of the Pi we need to edit the /etc/hosts file to reflect the name you have just chosen :
# nano /etc/hosts
You need to change the line that reads :
127.0.0.1 localhost.localdomain localhost yourhostname
Change “yourhostname” to whatever name you picked in the step previous to this one, once again exiting and saving. Now we will update the system using pacman. We need to create a pacman key first for this to work :
# pacman-key –init
NOTE – 2 dashes in front of init !!! So it should read <pacman-key><space><dash><dash><init> Thanks Julian Owens.
We need to create random entropy to help this process along, open a new terminal window with ALT+F2 and enter the following :
#ls -R / && ls -R / && ls -R /
You might have to do this a few times, keep switching back to the first console with ALT+F1 to check if it has generated a key yet, when it has we can update using this command :
# pacman -Syu
This will make pacman update your repositories and prompt you to update and software which may be out of date, once it is done you can reboot your pi using :
That is the initial installation finished, these next steps are highly recommended if you haven’t used Arch Linux before. Log back into root using the username root and the password you specified earlier. Now we are going to install sudo :
# pacman -S sudo
To give your regular user permission to use sudo, you need to edit the configuration file using visudo:
# EDITOR=nano visudo
Locate the section marked as:
## User privilege specification
and uncomment the line below to say :
%wheel ALL=(ALL) ALL
Save and exit in the normal way.
Now we need to tell sudo that pi is allowed to use it. We will do this by adding the pi user to the sudo group :
# EDITOR=nano visudo
Locate the lines that are currently commented out as follows :
## Uncomment to allow members of group sudo to execute any command
# %sudo ALL=(ALL) NOPASSWD: ALL
Uncomment the second of the above lines, so that it reads as follows :
## Uncomment to allow members of group sudo to execute any command
%sudo ALL=(ALL) NOPASSWD: ALL
Save and Exit.
We will now create the regular user account but first we need to install adduser :
# pacman -S adduser
Now we will create the new user :
Follow the on screen prompts; pick your username, using the next available UID is fine. Use the default users as the initial group. For additional groups, add the following :
The default home directory and shell are both fine. Unless you want one, don’t bother putting an expiration date in. The script will then ask you to confirm the entry as you’ve entered it. If all is satisfactory, continue to make the account, give the user a password, and add any other information it asks for as desired. Save and exit, then logout and back in :
(Note the change in prompt from # to $. This will help you know if you’re logged in as root or not.) From now on, you should use your regular user for everything. When root needs to do something on your system, use sudo. (The first time you use it, the display will show some general good behavior rules for its use.)
Now add a new group named sudo to the system and add the pi user to it:
# groupadd sudo
# usermod -a -G sudo your_username
And we can check if it stuck, with the following command:
# groups your_username
If all went well, you should see the full list of groups we set up when we created the pi user, and the new sudo group as well:
lp games video audio optical storage scanner power sudo users
When the pi user next logs in, or starts a new shell, then it will be allowed to use the sudo command.
To keep boot messages on the display follow this guide :
In Arch we use pacman to install packages. You can search for program names using :
$ pacman -Ss keyword
Install software with:
$ pacman -S program-name
If your keyboard is not set to the UK keymap please follow the first part of this guide :
$ sudo pacman -S enlightenment17 xf86-video-fbdev xf86-input-synaptics xorg-server xorg-server-utils xorg-xinit mesa xf86-input-keyboard xf86-input-mouse xterm
A ttf font is needed and should give you options to pick one during install. This is just in case you see that it did not.
To find all the ttf fonts available :
$ pacman -Ss ttf
or for simplicity :
$ sudo pacman -S ttf-dejavu
Now we will install the SLiM login manager and make it start automatically at boot :
$ sudo pacman -S slim
Now we have to enable the SLiM daemon by running this command :
$ sudo systemctl enable slim.service
From here you need to tell SLiM which environment it should be loading. You do this by editing your .xinitrc file :
$ sudo nano ~/.xinitrc
Add or uncomment the following, making sure there is only one exec for an environment uncommented :
Now just reboot :
From here you can further configure both SLiM and Enlightenment to your exact visual needs.
Login using the details you provided when you created your user, you should be at a graphical login. It will ask you for your keyboard layout and language on first login as well as these other options; window sizing,window focus,compositing,updates and if you want a taskbar. With Enlightenment the preferred network manager is connman. You do not need to use this, but for a GUI tool to configure your network you will need to install one of the following. Then configure them. I will just show what is preferred with Enlightenment :
$ sudo pacman -S connman
$ sudo systemctl enable connman
Alternative Network Managers :
$ sudo pacman -S wicd
$ sudo pacman -S networkmanager network-manager-applet
If you prefer to use a different terminal you can install it now, e.g :
$ sudo pacman -S lxterminal
A good lightweight browser is netsurf, install it with :
$ sudo pacman -S netsurf
Your system should now look something like this :
Have a look through for some ideas, the only thing i would suggest is try not to install anything too resource heavy unless you plan on overclocking your Pi. You could always try installing DOOM using my guide if you fancy a bit of fun :
One last thing and this is IMPORTANT; you will need this command to shutdown your Pi :
$ sudo shutdown -h now
Now go out and have fun exploring the world’s of Arch and the Raspberry Pi.