HOWTO: Perform initial setup of RaspberryPi

  1. Prepare Raspberry Pi SD card

a) Check for mounted SD cards

df -h   OR   fdisk -l

b) Copy ArchLinux image to SD card

sudo dd bs=4M if=~/Quellkoden/archlinux/archlinux-arm-2014.03-rpi.img of=/dev/mmcblk0

c) Syncronise and unmount safely

sudo sync; sudo eject /dev/mmcblk0
  1. Resize Linux partition to take entire space available on SD card

a) Enter fdisk for partition resizing

fdisk /dev/mmcblk0

b) Delete Linux and Extended partitions

d, 5, d, 2

c) Re-create new Extended and Linux partitions starting from the same sector ending at the farthest available sector.

n, e, n, l

d) Write partitions to disk

w

e) Reboot

shutdown -r now  OR  reboot

f) Resize filesystem

resize2fs /dev/mmcblk0p5

g) Check root partition has increased size

df -h
  1. Change root password

a) passwd

  1. Add normal user

a) useradd -m -g users -s /bin/bash archie usermod -aG wheel archie

OR

useradd -m -G wheel -s /bin/bash archie
  1. Set password for new normal user

a) passwd archie

  1. Upgrade Arch Linux distribution

a) pacman -Syu

  1. Install specific packages by name given

a) pacman -S

  1. Find out IP address of RPi on LAN

a) sudo nmap -sP 10.29.231.0/24

  1. Setup sudo

a) Edit /etc/sudoers

EDITOR=vim visudo -f /etc/sudoers

b) Uncomment

wheel ALL=(ALL) ALL

c) Set timezone

timedatectl list-timezones
timedatectl set-timezone Europe/Paris
date

d) Set date and time

sudo timedatectl set-time "2014-03-21 10:39:00"
  1. View logs

    journalctl

http://elinux.org/RPi_Easy_SD_Card_Setup http://elinux.org/RPi_Resize_Flash_Partitions https://wiki.archlinux.org/index.php/Beginners'_guide https://wiki.archlinux.org/index.php/Users_and_groups http://www.pi-point.co.uk/documentation/ http://obihoernchen.net/wordpress/770/plug_computer_arch_linux/