Skip to content

ArchLinux ARM Raspi0 W Wireless Set up Guide

David J. Kordsmeier edited this page Dec 30, 2020 · 5 revisions

Preparing the SD Card for Installation

  • Original instructions from the Arch Linux ARM wiki:

    https://archlinuxarm.org/platforms/armv6/raspberry-pi

  • This guide assumes the use of a Linux OS for writing the Arch OS image to your SD card.

  • In the following instructions replace sdX with the device name for your SD card.

  1. Run the following command to locate your SD card and show all block devices

    lsblk

  2. Start fdisk to partition the SD card:

    fdisk /dev/sdX

  3. Inside fdisk, delete any old partitions and create two new ones:

    • Type o to clear out existing partitions
    • Type p to list existing partitions and make sure there are none left
    • Type n for new partition
      • then type p for primary
      • type 1 for the first partition
      • press ENTER to accept the default first sector
      • then type +200M for the last sector
      • type t, then c to set the first partition to type W95 FAT32 (LBA)
    • Type n for new partition
      • type p for primary
      • type 2 for the second partition
      • press ENTER twice to accept the default first and last sector
    • Type w to write the partition table and exit
  4. Create and mount the FAT filesystem:

    sudo mkfs.vfat /dev/sdX1
    mkdir /mnt/boot/
    sudo mount /dev/sdX1 /mnt/boot/

  5. Create and mount the ext4 filesystem:

    sudo mkfs.ext4 /dev/sdX2
    mkdir /mnt/root/
    sudo mount /dev/sdX2 /mnt/root/

  6. Download and install bsdtar if not currently installed:

    sudo apt-get update
    sudo apt-get install bsdtar

  7. Move into root and download and extract Arch:

    sudo su
    wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-latest.tar.gz
    bsdtar -xpf ArchLinuxARM-rpi-latest.tar.gz -C /mnt/root
    sync

  8. Move boot files to the first partition:

    mv /mnt/root/boot* /mnt/boot
    sync

  9. Unmount the two partitions:

    umount /mnt/boot/
    umount /mnt/root/

Wifi Configuration and ArchLinux ARM Install on Raspberry Pi

  1. Insert the SD card into the Raspberry Pi and plug into power source.

  2. Login as the default user alarm with the password alarm

    • The default root password is root
  3. Move into root:

    su

  4. Configure wpa supplicant for wifi connection:

    • Navigate to the wpa supplicant directory

      cd /etc/wpa_supplicant

    • Create a file for your network

      nano home_network

    • METHOD A: Add wpa network information to the file in the following format with your network details:

      network={
        ssid=”networkname”
        psk=”password” 
        }
    • Better Method B: wpa_passphrase myssid "my password" | tee home_network

    • Run the wpa supplicant daemon:

      wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/home_network &

  5. Obtain a DHCP address:

    dhcpcd wlan0

    From here you can verify your connection with a ping:

    ping google.com

    ctrl+c to exit ping

    cd to navigate back to root directory

  6. Initialize the pacman keyring and populate the Arch Linux ARM package signing keys:

    pacman-key --init
    pacman-key --populate archlinuxarm

  7. Upgrade Arch:

    pacman -Syu

  8. Set system clock:

    timedatectl set-ntp true

  9. Set time zone to your region and city:

    ln -sf /usr/share/zoneinfo/Region/City /etc/localtime

    To get a list of regions and cities, run:

    ls /usr/share/zoneinfo/

    ls /usr/share/zoneinfo/Region/

  10. Localization:

    nano /etc/locale.gen

    Uncomment en_US.UTF-8 UTF-8

    Write out with ctrl+o

    Generate locales:

    locale-gen

  11. Configure netctl to connect automatically to your network on bootup:

    netctl should already be installed with Arch

    There are example config files at /etc/netctl/examples/

    Copy an example for your new config file:

    cp /etc/netctl/examples/wireless-wpa /etc/netctl/SomeDescriptiveName

    Edit your new config file at /etc/netctl/SomeDescriptiveName with your details

    Enable netctl-auto service:

    systemctl enable [email protected]

  12. Change root password with passwd

  13. Reboot by running reboot