header image
[ # ] ArchLinuxARM Package Downgrading
March 18th, 2020 under Linux

I’m running ArchLinuxARM on my Odroid C2. After a system upgrade it wouldn’t boot anymore. So after going through some forums I figured out that systemd was the culprit. I had to downgrade to the previous version. However how do I achieve this when I have just x64 system laying around.

My goal was to take the MMC which stores the system of my Odroid C2 and mount it on my x64 so that a have access to the filesystem of the ArchLinuxARM installation. This is pretty straightforward with a memorycard adapter. Now comes the tricky part.

You need to be able to run arm executables (im my case aarch64). So the first step is to get qemu-user-static unto my x64 system. AUR has a package for this. After having built and installed this package copy the executable for your architecture to the mounted mmc. I mounted it to /mnt

1
cp /usr/bin/qemu-aarch64-static /mnt/usr/bin/
cp /usr/bin/qemu-aarch64-static /mnt/usr/bin/

Next you need the arch-install-scripts to get the arch-chroot command. This is a modified chroot command which sets up all ArchLinux specific configurations.

Now we execute pacman to downgrade the package on the mounted mmc.

1
arch-chroot /mnt qemu-aarch64-static /bin/pacman -U /var/cache/pacman/pkg/systemd-244.3-1-aarch64.pkg.tar.xz
arch-chroot /mnt qemu-aarch64-static /bin/pacman -U /var/cache/pacman/pkg/systemd-244.3-1-aarch64.pkg.tar.xz