[arch-general] How to cross-pacstrap for other architecture
Erich Eckner
arch at eckner.net
Sat Apr 24 16:54:52 UTC 2021
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
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 :-)
regards,
Erich
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEE3p92iMrPBP64GmxZCu7JB1Xae1oFAmCETV8ACgkQCu7JB1Xa
e1r2Ug//XiEa1kyUksJtw66bY2HdyR9Jk0KvK4n+txi2kFunxdhZsefeSUKvUkuN
eX2dfp5Ur8mvCqHdnPnaOoFpOYeEnxKdgPFm6aEjXCafGIuOWmRYzpW//ihFPUHA
z6u3/mNbRA273ItFCj3Z3mMq8KqTJRUSrmB0bEwccBAHR9lRdiA0C9G+/weZKf+I
DEKmbrQNeP/t7QwnmTkOtedP5w4E5vtfi436+ySOrRmDP2fJJvmg7Fec2enelcB2
cVJ+79ZpRK+jMKbUU4EW7hMEN4pdww4JpqqYOfR/4/WkBRZkZUCtrZgToOhA+dCm
qEUZE/dpnrupV/wzgdImVoXJP1WqFkjjNrNFjkACoNnumOgOitqn4in5uqjN45UY
5B1ny6B8EPndvRGNN5gS+hUjR+MSkl999/8isr4R+7oBIU4Fg42uUU1ZxvspTwa0
+3Mq87nwTS0cP9/yof/DRyCRErNxiwTyRcF7TlCKWSsqBVCInqu+UkFntomKwVPq
B4HQGFsX2HanycFPe0c/RC5zMvwgLqifehnwHyZuB0qGXWvU2u/Tg2csVPhlNWGx
veXwvTZ9oPQB6z1JU5p7fc2NPJ/hHyxjtpwPqggUpJtJ3qM3KdIeU2TXQDcLScrn
2CgGT5BxLrMN0YTP/TqFuvQbGs6ieOCK6JuZ2CUVxBN+w7y/vLw=
=oKmG
-----END PGP SIGNATURE-----
More information about the arch-general
mailing list