User Tools

Site Tools


os:archlinux:aarch64

Archlinux on Silicon Procs

Doc to set it up on UTM

Alpine Linux

UTM setup

Create a New VM Type: Other add the CD/DVD boot ise file (Alpine ISO) Edit the display settings for “ramfb”

Boot on Alpine

Basic setup

 setup-alpine

Mostly [Enter] even for disk…

Let's go

apk update
apk add curl tar gptfdisk btrfs-progs
gdisk /dev/vda
GPT fdisk (gdisk) version 1.0.10

Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries in memory.

Command (? for help): o
This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): Y

Command (? for help): n
Partition number (1-128, default 1): 
First sector (34-134217694, default = 2048) or {+-}size{KMGTP}: 
Last sector (2048-134217694, default = 134215679) or {+-}size{KMGTP}: +2G
Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300): ef00
Changed type of partition to 'EFI system partition'

Command (? for help): n
Partition number (2-128, default 2): 
First sector (34-134217694, default = 4196352) or {+-}size{KMGTP}: 
Last sector (4196352-134217694, default = 134215679) or {+-}size{KMGTP}: 
Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300): 
Changed type of partition to 'Linux filesystem'

Command (? for help): p
Disk /dev/vda: 134217728 sectors, 64.0 GiB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): CC9275CB-EC7E-42E7-8567-967F8A3BCCBD
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 134217694
Partitions will be aligned on 2048-sector boundaries
Total free space is 4029 sectors (2.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         4196351   2.0 GiB     EF00  EFI system partition
   2         4196352       134215679   62.0 GiB    8300  Linux filesystem

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/vda.
The operation has completed successfully.

Format

mkfs.vfat -F32 /dev/vda1          # Format EFI partition
mkfs.btrfs -L ROOT /dev/vda2      # Format root partition

Mount

rm -rf /mnt/*
modprobe btrfs
mount /dev/vda2 /mnt
mkdir -p /mnt/boot/efi
 
modprobe vfat
mount /dev/vda1 /mnt/boot/efi

DL Arch

curl -L https://archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz -o /archlinuxarm.tar.gz
tar -xpf /archlinuxarm.tar.gz -C /mnt
 
sync

CHROOT

mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
 cp /etc/resolv.conf /mnt/etc/resolv.conf
chroot /mnt /bin/bash

Config

Pacman

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

If it fails… edit mirrorlist to uncomment the closest alive:

vi /etc/pacman.d/mirrorlist

⇒ Server = http://de3.mirror.archlinuxarm.org/

Linux & Grub

 pacman -S linux linux-firmware grub

FSTAB

pacman -S arch-install-scripts
genfstab -U / >> /etc/fstab

Hostname

echo "alarm" > /etc/hostname

Network

systemctl enable dhcpcd

User

useradd -m -G wheel -s /bin/bash yourusername
passwd yourusername
echo "%wheel ALL=(ALL) ALL" >> /etc/sudoers

Final touch

pacman -S grub sudo
grub-install --target=arm64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
 
exit
poweroff

Important INFO

  • /dev/vda1 (efi partition) MUST be mounted on /boot/efi

remove Alpine ISO
Light a candle… boot
If stuck:

fs0:
cd EFI\ArchARM
grubaa64.efi

SSH

crap in /etc/ssh/sshd_config.d/* is preventing ssh-copy-id to work (good job!)

Hyprland

pacman -Syu
pacman -S base-devel git
pacman -S wayland wlroots xorg-server xorg-xwayland mesa seatd pipewire pipewire-pulse wireplumber vulkan-virtio spice-vdagent qemu-guest-agent kitty mesa glxinfo
 
systemctl enable --now seatd
 
export LIBSEAT_BACKEND=seatd

as normal user…

git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
 
sudo pacman -S lightdm lightdm-gtk-greeter
sudo systemctl enable lightdm

Vérifier que l'“input” Display dans UTM est “virtio-gpu-gl-pci”

Reboot… To be continued car la conf de base utilise tous les raccourcis MacOS/UTM…. et kitty se lance pas

os/archlinux/aarch64.txt · Last modified: by warnaud