Howto install artixlinux aarch64: Difference between revisions
Mandulete1 (talk | contribs) (Created page with "= download image = download raspios image: wget wget https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2023-12-06/2023-12-05-raspios-bookworm-arm64.img.xz download image: wget https://armtixlinux.org/images/armtix-openrc-20240730.tar.xz decompress raspios image: xz -d 2023-12-05-raspios-bookworm-arm64.img.xz change raspios image name: mv 2023-12-05-raspios-bookworm-arm64.img $(date +%F)-artixlinux-aarch64.img = chroot with qemu = use qemu-user-stat...") |
Mandulete1 (talk | contribs) |
||
Line 38: | Line 38: | ||
enter chroot using arch-chroot: | enter chroot using arch-chroot: | ||
chroot /mnt/temp | chroot /mnt/temp | ||
= configure image = | |||
update /etc/fstab for the different sd block device: | |||
sed -i 's/mmcblk0/mmcblk1/g' /etc/fstab | |||
initialize pacman: | |||
pacman-key --init | |||
pacman-key --populate archlinuxarm | |||
remove /etc/resolv.conf file: | |||
rm /etc/resolv.conf | |||
configure dns: | |||
cat > /etc/resolv.conf << EOF | |||
nameserver 4.2.2.1 | |||
nameserver 4.2.2.2 | |||
EOF | |||
update all system: | |||
pacman -Syuu --noconfirm | |||
install the following packages: | |||
pacman -Sy base-devel libnewt git wget rsync networkmanager parted multipath-tools lsof git sudo fakeroot screen inetutils --noconfirm | |||
install expand-sd: | |||
curl -ko /usr/local/bin/expand-sd https://raw.githubusercontent.com/vidalinux/raspi/main/expand-sd | |||
chmod +x /usr/local/bin/expand-sd | |||
set password to alarm user: | |||
passwd alarm | |||
echo "alarm ALL=(ALL:ALL) ALL" > /etc/sudoers.d/alarm | |||
change root password: | |||
passwd root | |||
replace current kernel with aarch64: | |||
pacman -Sy linux-rpi | |||
make sure you have rpi5 support: | |||
pacman -Ql linux-rpi | grep rpi-5 | |||
disable the following services: | |||
systemctl disable systemd-networkd | |||
systemctl disable systemd-networkd.socket | |||
systemctl disable systemd-resolved | |||
disable suspend, hibernate or sleep: | |||
systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target | |||
start and enable networkmanager: | |||
systemctl enable NetworkManager |
Revision as of 13:24, 31 July 2024
download image
download raspios image:
wget wget https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2023-12-06/2023-12-05-raspios-bookworm-arm64.img.xz
download image:
wget https://armtixlinux.org/images/armtix-openrc-20240730.tar.xz
decompress raspios image:
xz -d 2023-12-05-raspios-bookworm-arm64.img.xz
change raspios image name:
mv 2023-12-05-raspios-bookworm-arm64.img $(date +%F)-artixlinux-aarch64.img
chroot with qemu
use qemu-user-static to interpret the arm instructions in the chroot:
pacman -Sy qemu-user-static --noconfirm
install multipath-tools in archlinux:
pacman -S multipath-tools --noconfirm
if you use debian you can install this packages:
apt install kpartx qemu-user-static
script to mount and umount raspberrypi image:
curl -ko ./raspimg https://raw.githubusercontent.com/vidalinux/raspi/main/raspimg chmod +x ./raspimg
mount image to /mnt/temp without binding directories:
./raspimg mount $(date +%F)-artixlinux-aarch64.img do you want to bind /dev /proc /sys /pkg directories now : no
remove image contents from:
rm -rf /mnt/temp/*
decompress archlinux arm file to /mnt/temp:
tar xvf armtix-openrc-20240730.tar.xz -C /mnt/temp
copy the qemu-aarch64-static binary to the chroot:
cp /usr/bin/qemu-aarch64-static /mnt/temp/usr/bin/
register the qemu-aarch64-static as an arm interpreter in the kernel:
curl -ko /usr/local/bin/binfmt_manager https://raw.githubusercontent.com/mikkeloscar/binfmt-manager/master/binfmt_manager chmod +x /usr/local/bin/binfmt_manager binfmt_manager register aarch64
umount image:
./raspimg umount $(date +%F)-artixlinux-aarch64.img
mount it again binding /dev /proc /sys and pkg directories:
./raspimg mount $(date +%F)-artixlinux-aarch64.img do you want to bind /dev /proc /sys /pkg directories now : yes
enter chroot using arch-chroot:
chroot /mnt/temp
configure image
update /etc/fstab for the different sd block device:
sed -i 's/mmcblk0/mmcblk1/g' /etc/fstab
initialize pacman:
pacman-key --init pacman-key --populate archlinuxarm
remove /etc/resolv.conf file:
rm /etc/resolv.conf
configure dns:
cat > /etc/resolv.conf << EOF nameserver 4.2.2.1 nameserver 4.2.2.2 EOF
update all system:
pacman -Syuu --noconfirm
install the following packages:
pacman -Sy base-devel libnewt git wget rsync networkmanager parted multipath-tools lsof git sudo fakeroot screen inetutils --noconfirm
install expand-sd:
curl -ko /usr/local/bin/expand-sd https://raw.githubusercontent.com/vidalinux/raspi/main/expand-sd chmod +x /usr/local/bin/expand-sd
set password to alarm user:
passwd alarm echo "alarm ALL=(ALL:ALL) ALL" > /etc/sudoers.d/alarm
change root password:
passwd root
replace current kernel with aarch64:
pacman -Sy linux-rpi
make sure you have rpi5 support:
pacman -Ql linux-rpi | grep rpi-5
disable the following services:
systemctl disable systemd-networkd systemctl disable systemd-networkd.socket systemctl disable systemd-resolved
disable suspend, hibernate or sleep:
systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
start and enable networkmanager:
systemctl enable NetworkManager