Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Raspberry Pi with ArchLinux

ArchLinux on a Raspberry Pi

Install the system to the SD card

Connect the SD card to your computer and open the terminal.

  • Find the disk id
df -h
  • Unmount the disk
sudo diskutil unmount /dev/disk2s2
  • Replace /dev/disk2s2/ with /dev/rdisk2 (it might not be disk2s2, verify first!)
sudo dd bs=1m if=~/Downloads/archlinuxarm-13-06-2012\ 2/archlinuxarm-13-06-2012.img of=/dev/rdisk2

Enable IPV6

Before booting the SD in the Raspberry Pi, let's check if ipv6 is enabled, this was a source of troubles for me, specially when dealing with ufw, so cd into the SD's root:

nano /boot/cmdline.txt

make sure you have: ipv6.disable=0

Expand the SD partition

Foundation's changed the basic geometry to support the NOOBS install. For instructions on how to expand the partition please visit this tutorial

If you worry of your's SD life, you should consider read this answer on stackexchange, to know more about extending the life of your SD card.

Update the system & Install Packages

pacman -Syu
pacman -S linux-raspberrypi-latest
pacman -Sy base-devel
pacman -Sy core/dnsutils
pacman -Sy extra/python2
pacman -Sy extra/python2-pip
pacman -Sy extra/python2-lxml
pacman -Sy sudo vim zsh

sudo pip2 install mitmproxy

Update the hostname

hostnamectl set-hostname myhostname

Add user

  • Assuming the username is couto and it has sudo privileges wheel and uses the /bin/zsh shell instead of /bin/bash
useradd -m -g users -G wheel -s /bin/zsh couto
chfn couto
passwd couto
  • to allow the wheel group to have sudo privileges:
visudo
## Uncomment to allow members of group wheel to execute any command
%wheel ALL=(ALL) ALL

Install Nodejs from source

ln -s /usr/bin/python2 /usr/bin/python
git clone git://github.com/joyent/node.git && cd node && git checkout v0.8.8
./configure --shared-openssl --without-snapshot
make
sudo make install

Security

Depending on the use you might want to consider some advice

Other Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.