Skip to content

Instantly share code, notes, and snippets.

@Myralllka
Last active December 15, 2019 21:47
Show Gist options
  • Save Myralllka/beea0ffb8329966a0818fc48973b8ef6 to your computer and use it in GitHub Desktop.
Save Myralllka/beea0ffb8329966a0818fc48973b8ef6 to your computer and use it in GitHub Desktop.

Short instruction for Arch on Arm (Raspberry Pi 3)

Instalation (source)

firstly check, where is your sd card:

sudo fdisk -l

then run the util and create the table with partitions

sudo fdisk /dev/sdx

clear partitions on the drive (o, enter)
create first partition (n, enter, p, enter, 1, enter, enter, +100M, enter, t, enter, c, enter)
create second partition (n, enter, p, enter, 2, enter, enter), then write and exit (w)
then format partitions

sudo mkfs.vfat /dev/sdx1
sudo mkfs.ext4 /dev/sdx2

make folder to mount partitions

mkdir /mnt/boot
mkdir /mnt/root

sudo mount /dev/sdx1 /mnt/boot
sudo mount /dev/sdx2 /mnt/root

download and install arch (recomendly for rbi-2)

wget  http://archlinuxarm.org/os/ArchLinuxARM-rpi-2-latest.tar.gz
sudo -i
tar zxvf /location/of/file/ArchLinuxARM-rpi-2-latest.tar.gz -C /mnt/root
mv /mnt/root/boot/* /mnt/boot
sync

Init

On the RPI: login / password can be either root/root or alarm/alarm for the user

setting up wifi with wpa_supplicant (source)

Let systemd manage create a new file

vi /etc/systemd/network/wlan0.network

and put there

[Match]
Name=wlan0

[Network]
Description=On-board wireless NIC
DHCP=yes

and run the command

systemctl restart systemd-networkd

Set up wpa_supplicant to handle wireless connections

create the file

vi /etc/wpa_supplicant/wpa_supplicant-wlan0.conf

and put there

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
network={
     ssid="sshowfosho"
     scan_ssid=1
     key_mgmt=WPA-PSK
     psk="yoforeal"
}

now start the service:

systemctl start wpa_supplicant@wlan0.service
dhcpcd wlan0

to enable autostart of connection to this network just run

systemctl enable wpa_supplicant@wlan0.service

Now, please, restart the rpi with reboot

Now we are ready with the internet, let`s move forward

pacman-key --init
pacman-key --populate archlinuxarm
pacman -Syu
vi /etc/pacman.conf

and uncomment the following line:

wheel ALL=NOPASSWD: ALL

now you have to install yay, but before install some important programms:

sudo pacman -S base-devel git wget fakeroot 

git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si

and now you have to switch the user and install few more apps for comfortable usage rpi:

su alarm
yay -S gotop, tmux, nvim, zsh, ruby-colorls

install oh-my-zsh and configure nvim, tmux.

TODO: add scripy for autoinstalling all programs and autoconfiguring

Can be helpfull

https://gist.github.com/gea0/4fc2be0cb7a74d0e7cc4322aed710d38

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