[arch-general] How to cross-pacstrap for other architecture
Uwe Sauter
uwe.sauter.de at gmail.com
Sun Apr 25 09:13:00 UTC 2021
Stefan, Erich,
thank you for your suggestions.
Am 24.04.21 um 18:54 schrieb Erich Eckner via arch-general:
> On Sat, 24 Apr 2021, Stefan Göbel via arch-general wrote:
>
>> On 24.04.21 17:41, Uwe Sauter via arch-general wrote:
>>> I've tried running 'pacstrap -C pacman.aarch64.conf /mnt base' where
>>> pacman.aarch64.conf is extracted from the Arch Linux Arm installation
>>> archive but after the packages are extracted, pacman tries to run
>>> something inside the installation environment which fails due to the
>>> mismatch in architectures.
>
>> You can setup QEMU to allow running foreign arch stuff, see [1].
>
>> I'm not sure if that will allow you to pacstrap an AArch64 root
>> directly from the host. If it fails, you can grab the Arch Linux ARM
>> AArch64 image and run pacstrap from within the extracted root dir,
>> e.g. `arch-chroot </path/to/aarch64/root> pacstrap …`.
>
>> [1] <https://wiki.archlinux.org/index.php/QEMU#Chrooting_into_arm/arm64_environment_from_x86_64>
>
>
> This method is good for recovering an unbootable raspi (that's, what I do in this case). IIRC, pacstrap from the host
> even works, too (mkinitcpio obviously fails in autodetect hooks and such stuff).
>
> However, I did not yet get all the files necessary for boot into the right place (bootloader, device tree, etc.) to
> actually pacstrap onto a previously empty microsd card.
>
> In case, that you are successful pacstrapping into an empty partition and makeing it bootable on a raspi, I would be
> really interested in the additional steps necessary. However, I think, this is rather a topic for the arch-ports mailing
> list, because it is too detached from x86_64 arch linux :-)
I decided to try out running an Aarch64 Qemu VM in which I can run pacstrap for the same architecture as my target and
was able to get the Raspi to boot.
@Erich: you may contact me off-list if you'd like to discuss further.
Regards,
Uwe
>
> regards,
> Erich
>
More information about the arch-general
mailing list