Skip to content

Instantly share code, notes, and snippets.

@fundon
Forked from Couto/raspberrypi_archlinux.md
Created March 12, 2013 14:56
Show Gist options
  • Save fundon/5143570 to your computer and use it in GitHub Desktop.
Save fundon/5143570 to your computer and use it in GitHub Desktop.

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

SSH into your raspberry pi and run

fdisk /dev/mmcblk0
  • Delete the second partition
Press:
d [Enter]
2 [Enter]
  • Create a new partition and use the default sizes prompted
n [Enter]
p [Enter]
2 [Enter]
[Enter]
[Enter]
  • Save & Exit
w [Enter]
shutdown -r now
  • After reboot
resize2fs /dev/mmcblk0p2
pacman -Syu
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
touch /etc/hostname && echo "new-hostname" > /etc/hostname
nano /etc/hosts
127.0.0.1      new-hostname.domain.org   localhost.localdomain      localhost    new-hostname
::1            new-hostname.domain.org   localhost.localdomain      localhost    new-hostname
  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment