Skip to content

Instantly share code, notes, and snippets.

@Couto
Last active August 27, 2017 17:06
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save Couto/3694301 to your computer and use it in GitHub Desktop.
Save Couto/3694301 to your computer and use it in GitHub Desktop.
Raspberry Pi with ArchLinux

ArchLinux on a Raspberry Pi

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

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.

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
hostnamectl set-hostname myhostname
  • 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