-
Notifications
You must be signed in to change notification settings - Fork 0
ArchLinux ARM Raspi0 W Wireless Set up Guide
-
Original instructions from the Arch Linux ARM wiki:
-
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.
-
Run the following command to locate your SD card and show all block devices
lsblk
-
Start fdisk to partition the SD card:
fdisk /dev/sdX
-
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
-
Create and mount the FAT filesystem:
sudo mkfs.vfat /dev/sdX1
mkdir /mnt/boot/
sudo mount /dev/sdX1 /mnt/boot/
-
Create and mount the ext4 filesystem:
sudo mkfs.ext4 /dev/sdX2
mkdir /mnt/root/
sudo mount /dev/sdX2 /mnt/root/
-
Download and install bsdtar if not currently installed:
sudo apt-get update
sudo apt-get install bsdtar
-
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
-
Move boot files to the first partition:
mv /mnt/root/boot* /mnt/boot
sync
-
Unmount the two partitions:
umount /mnt/boot/
umount /mnt/root/
-
Insert the SD card into the Raspberry Pi and plug into power source.
-
Login as the default user alarm with the password alarm
- The default root password is root
-
Move into root:
su
-
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 &
-
-
Obtain a DHCP address:
dhcpcd wlan0
From here you can verify your connection with a ping:
ping google.com
ctrl+c
to exit pingcd
to navigate back to root directory -
Initialize the pacman keyring and populate the Arch Linux ARM package signing keys:
pacman-key --init
pacman-key --populate archlinuxarm
-
Upgrade Arch:
pacman -Syu
-
Set system clock:
timedatectl set-ntp true
-
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/
-
Localization:
nano /etc/locale.gen
Uncomment
en_US.UTF-8 UTF-8
Write out with
ctrl+o
Generate locales:
locale-gen
-
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 detailsEnable
netctl-auto
service:systemctl enable [email protected]
-
Change root password with
passwd
-
Reboot by running
reboot