Howto install archlinux arm: Difference between revisions

From Vidalinux Wiki
Jump to navigation Jump to search
Line 74: Line 74:
  expand-sd
  expand-sd


= permanent network configuration =
= networkmanager =
install networkmanager:
install networkmanager:
  pacman -S networkmanager
  pacman -S networkmanager
Line 86: Line 86:
configure lan using nmcli:
configure lan using nmcli:
  nmcli con add con-name eth0 ifname eth0 ipv4.method manual ipv4.address 192.168.75.112/24 ipv4.gateway 192.168.75.1 ipv4.dns 4.2.2.1,4.2.2.2 type ethernet autoconnect yes
  nmcli con add con-name eth0 ifname eth0 ipv4.method manual ipv4.address 192.168.75.112/24 ipv4.gateway 192.168.75.1 ipv4.dns 4.2.2.1,4.2.2.2 type ethernet autoconnect yes
= install desktop =
= install desktop =
install xfce:
install xfce:

Revision as of 23:13, 20 January 2022

download image

download raspbian lite image:

wget https://downloads.raspberrypi.org/raspios_full_armhf/images/raspios_full_armhf-2021-11-08/2021-10-30-raspios-bullseye-armhf-full.zip

download archlinuxarm image for raspberrypi 4:

wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-aarch64-latest.tar.gz

umcompress rasbian lite image:

unzip 2021-10-30-raspios-bullseye-armhf-full.zip

rename rasbian lite image:

mv 2021-10-30-raspios-bullseye-armhf-full.img $(date +%F)-archlinuxarm.img

install multipath-tools:

pacman -S multipath-tools

mount the image with kpart:

kpartx -va $(date +%F)-archlinuxarm.img

mount partitions:

mkdir /mnt/archarm
mount /dev/mapper/loop0p2 /mnt/archarm
mount /dev/mapper/loop0p1 /mnt/archarm/boot

remove all content:

rm -rf /mnt/archarm/*

copy archlinuxarm image content to mountpoint:

tar xvf ArchLinuxARM-rpi-aarch64-latest.tar.gz -C /mnt/archarm/
sync

update /etc/fstab for the different sd block device compared to the raspberrypi 3:

sed -i 's/mmcblk0/mmcblk1/g' /mnt/archarm/etc/fstab

umount partitions:

umount /mnt/archarm/boot
umount /mnt/archarm
kpartx -d /dev/loop0
losetup -d /dev/loop0

connect sd card to your computer and detect drive letter:

dmesg 
fdisk -l /dev/sde

write image to sd card:

dd if=$(date +%F)-archlinuxarm.img of=/dev/sde

user information:

user: root
pass: root

user: alarm
pass: alarm

configure network

configure wifi:

wpa_passphrase ssid-name password > /etc/wpa_supplicant/wpa_supplicant.conf
wpa_supplicant -D wext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

configure lan:

ip addr add 192.168.75.55/24 dev eth0
ip route add defualt via 192.168.75.1
echo 'nameserver 4.2.2.1' > /etc/resolv.conf
echo 'nameserver 4.2.2.2' >> /etc/resolv.conf

enable ssh

start and enable ssh:

systemctl enable sshd
systemctl start sshd

connect from external machine to raspberrypi:

ssh alarm@ip-address-of-raspberry

update system and install packages

set timezone:

timedatectl set-timezone America/Puerto_Rico

set clock month day hour year:

date 012003312022

initialize the pacman keyring and populate signing keys:

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

update system:

pacman -Syuuu

install base-devel package:

pacman -S base-devel libnewt git

add alarm user to sudoers:

echo 'alarm ALL=(ALL) ALL' >> /etc/sudoers

expand sd card:

curl -o /usr/local/bin/expand-sd https://img.vidalinux.com/files/expand-sd
chmod +x /usr/local/bin/expand-sd
expand-sd

networkmanager

install networkmanager:

pacman -S networkmanager

start and enable networkmanager:

systemctl start NetworkManager
systemctl enable NetworkManager

configure wireless using nmcli:

nmcli device wifi rescan
nmcli device wifi list
nmcli device wifi connect ssid-name --ask

configure lan using nmcli:

nmcli con add con-name eth0 ifname eth0 ipv4.method manual ipv4.address 192.168.75.112/24 ipv4.gateway 192.168.75.1 ipv4.dns 4.2.2.1,4.2.2.2 type ethernet autoconnect yes

install desktop

install xfce:

pacman -S xfce4 lightdm

enable and start lightdm

systemctl enable lightdm
systemctl start lightdm

references