Arch Linux Raspberry Pi Setup Guide
If you are reading this install guide, I will assume you have the following:
- A Raspberry Pi
- Access to the interwebs
- A spare Linux computer.
If you don’t have a spare Linux computer:
- For the SD Card setup: Skip steps 2-8 and go HERE for Windows and OSX instructions
- Also skip steps 9 and 10. Follow THESE directions only for resizing the Arch partition.
- An SD memory card >= 4GB
New User Arch Linux Arm Install Guide
- First thing you need to do is get yourself an Arch linux Image, I am assuming that it is downloaded to your home directory.
- After you have that you need to get the image on your SD card. Hopefully your spare Linux computer has an SD card slot. We will need a terminal window for this.
ALL TERMINAL COMMANDS ARE FORMATTED LIKE THIS.
- Unzip it. unzip ~/archlinuxarm-13-06-2012.zip
- find out what your drives are called df -h
- Insert your SD card and df -h again.
- Unmount it, leaving it inserted. Replace (card) with your drive name from the last step. umount /dev/(card)
- Be certain of your drive assignments. This next piece of code will ruin your life if your drive assignments are wrong.
sudo dd bs=1M if=~/archlinuxarm-13-06-2012/archlinuxarm-13-06-2012.img of=/dev/(card)
This will take a long time. 20-60 minutes depending on a lot. It will not give any output till you are done, that’s normal.
- Make sure the operation is complete sudo sync
- Re-insert your SD card and open Gparted
- Resize the root partion (the bigger one) to take the whole disk.
- Add a config.txt file to your first partiton, this partition should be mounted already. This file controls a lot of things on your RasPi, I suggest you read mine first. There is plenty of more information about this file here.
- Finally you are ready to boot your RasPi! Put the SD card in and plug in the power
- To log in the USERNAME is root and the PASSWORD is root
- Since thats a real unsecure password lets change it with passwd
- Now lets customize for it where you live.
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/Africa
This gives me “Africa/Johannesburg”
- You need to put this information in your /etc/rc.conf. Do this with
nano /etc/rc.conf
- In the LOCALIZATION section, change TIMEZONE=”Europe/London” to where you live.
While you are here, decide on new host name. Now scroll down to the networking section and change alarmpi to whatever you want.
Finally, go to the MODULES section. inside the () brackets type snd_bcm2835 Save and exit.
- Now we need to edit the /etc/hosts file to reflect the hostname.nano /etc/hosts
- Here modify the file to read “127.0.0.1 localhost.localdomain localhost yourhostname” Save and Exit.
- Reboot the RasPi for changes to take effect reboot
- Install tmux, this will allow youto use multiple terminal windows which is needed for the next step. Usage instructions are HERE
To install it pacman -S tmuxtmux to activate it, you will see difference in your terminal window.
- Now we need to update the system, but first we need a key
pacman-key —init - Now, in order to create random entropy on your system you need to switch to a second terminal.
- Enter ls -R /** && ls -R /** && ls -R /** && ls -R /** and leave it to run
This will cause thousands of lines of text to appear. You may have to run this command multiple times in order for pacman to make a random security you need computer noise in the terminal background.
- Occasionally switch back to the first console to see if the key is ready (this takes a long time)
- Once the key is generated you can update pacman with pacman -S pacman
- Once pacman is updated you can update our whole system with
pacman -SyyufIf it asks, just say “yes”.
- For all future updates run pacman -Syu instead. you can always get more info on commands like pacman with man command
- Lets get a utility that will help us with a new user.
pacman -S util-linux openssh
- Since its a bad idea to always be the root user, which has all knowing all doing powers, lets make a new user.
adduser
Follow the prompts; use whatever username you’d like to log in. The next available UID is fine. Use the default users as the initial group.
For additional groups, add the following: audio,lp,optical,storage,video,wheel,games,power,uucp
- Give the new user a password
passwd username
- Sometimes the regular user will need super powers, to do this lets give them “sudo” powers. Sudo means Super User DO
pacman -S sudoThis is the standard sytax to install software
- To give your regular user permission to use sudo, you need to edit the configuration file using visudo
EDITOR=nano visudo
- Find
##
## User privilege specification
##
- Here you need to uncomment the following line %wheel ALL=(ALL) ALL save and exit.
- Now logout and log back in as your user. From now on this is where we will do all of our work.
- Your user needs some folders in their home directory to store things
mkdir ~/{Media,Files,Build,Scripts,Downloads}
- Now we need an X server
sudo pacman -S xorg-server xorg-xinit xorg-server-utils xorg-twm xorg-xclock xterm
Say “yes” or hit enter to select all for everything.
- Now we need Software and lots of it.
sudo pacman -S openbox menumaker obmenu obconf ttf-dejavu ttf-baekmuk netsurf terminator python2 feh tint2 conky compmgr pcmanfm base-devel wget parcellite geany leafpad slim transset-df slim-themes archlinux-themes-slim
Hit enter to select all then select Yes to install. Openbox is our GUI
- MenuMaker will make easy menus for us
- Obmenu is a gui tool for editing the menu
- Obconf is a gui configuration tool for Openbox
- TTF-Devaju is just some nice fonts for X
- TTF-Baekmuk is only for Korean Hangul Text optional
- Netsurf is a browser
- Terminator is a terminal that is nicer than xterm
- Python2 programming is the reason you bought a PI, and SAB,CPS,SB
- Feh is what will set your wallpaper, Nitrogen is not working for me.
- Tint2 will give us a panel at the bottom of the screen
- Conky is a desktop system monitoring tool.
- compmgr Will give us transparency
- PCmanfm is a graphical file manager
- base-devel lets you build stuff from source
- wget lets you download files from the command line
- Parcellite is a cut and paste tool
- Geany is a very powerful text editor/code development editor. It has helpful auto completions and highlighting
- Leafpad is a plain and simple text editor
- Slim is a login manager
- transset-df is optional, it is a tool to add transparency to windows (EG. partially see through terminal)
- slim-themes and archlinux-themes-slim are themes for the login manager
- We can’t use Openbox yet, we need to give it some configuration files
mkdir -p ~/.config/openboxcp /etc/xdg/openbox/* ~/.config/openbox
~ is shortcut for your users home folder
* is a wild card, it means “All the things!”
- Now to make Openbox startx-able
nano ~/.xinitrc.
In this empty file type exec openbox-session. Save and exit.
- Since we are using SLiM to log in, lets add it to the DAEMONS section of the rc.conf
sudo nano /etc/rc.confand at the very bottom type slim and right after it dbus somewhere in the middle of the list.
- Now lets customize the configuration file for SLiM,
sudo nano /etc/slim.conf - HERE is my slim configuration file. Pay attention to the themes and the session parts. Make sure you add openbox-session to the session part and change the theme to whatever you want. Themse can be found at /usr/share/slim/themes
- Now add programs to your autostart.sh file. This file is found at ~/.config/openbox/autostart.sh From the console
wget https://dl.dropbox.com/u/31213713/RasPi/autostart.txtmv autostart.txt autostart.shnano ~/.config/openbox/auto.sh(if you wish to make any changes)
- Now, since conky is autostarted we need a config file. the file is saved at ~/.conkyrc
- HERE is what mine looks like. Do the same thing you just did with this file.
wget https://dl.dropbox.com/u/31213713/RasPi/conkyrc.txtmv conckyrc.txt conckyrcnano ~/.conkyrc(if you wish to make any changes)
- The last thing you need to do before you open up and run with Openbox is make a menu. do this
mmaker -vf openbox3 - Anytime you install a new application, just run this same command again, to add it to your menu.
- Finally! You can start Openbox!
- Reboot and SLiM should pop up and let you log in.
Thanks to MyBiteofPi for the original guide used to make this updated version.
4 notes
Posted on Saturday September 1st
-
aliukani likes this
-
trashcanpatrol likes this
-
turnoutfine likes this
-
gonzotech reblogged this from remelehane
-
remelehane posted this