How do I properly chroot from a amd64 artix VM into a mounted aarch64 armtix OS image?
0
votes
0
answers
189
views
I want to chroot into an armtix (aarch64) OS image inside an artix VM.
I copied qemu-aarch64-static into the mounted /usr/bin
and then tried to chroot into the mounted image.
It works, however, most programs don't.
Below is my attempt:
$ artix-chroot /var/tmp/eqstalxr-bastij/root qemu-aarch64-static /bin/bash
bash: /usr/bin/dircolors: cannot execute binary file: Exec format error
[bastille-installer /]# ls
bash: /usr/bin/ls: cannot execute binary file: Exec format error
[bastille-installer /]# cat
bash: /usr/bin/cat: cannot execute binary file: Exec format error
[bastille-installer /]# dir
bash: /usr/bin/dir: cannot execute binary file: Exec format error
[bastille-installer /]# cd .
[bastille-installer /]# cd bin
[bastille-installer bin]# cd ..
[bastille-installer /]# exit
Is this how far I can go with it or are there ways to make other
programs work as well.
I need pacman, tee, sed, cp and other installation commands to work on it,
as I want to later move the customized image to my sd card.
[edit]
$ file /var/tmp/eqstalxr-bastij/root/bin/bash
/var/tmp/eqstalxr-bastij/root/bin/bash: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=134f0d233c131cc03b87ed000859f62805ead4ca, for GNU/Linux 3.7.0, stripped
ls works via this command, however pacman-key doesn't.
$ artix-chroot /var/tmp/eqstalxr-bastij/root qemu-aarch64-static /bin/ls
bin boot dev etc home lib mnt opt proc root run sbin srv sys tmp usr var
$ artix-chroot /var/tmp/eqstalxr-bastij/root qemu-aarch64-static /bin/pacman-key
Error while loading /usr/bin/pacman-key: Exec format error
$ file /var/tmp/eqstalxr-bastij/root/bin/pacman-key
/var/tmp/eqstalxr-bastij/root/bin/pacman-key: a /usr/sbin/bash script, ASCII text executable
Asked by Folaht
(1156 rep)
May 18, 2024, 05:22 PM
Last activity: May 19, 2024, 09:26 AM
Last activity: May 19, 2024, 09:26 AM