Chrooting into ARM card

https://archlinuxarm.org/forum/viewtopic.php?f=30&t=9294

I was just to lazy to plug the card back into odroid and into computer replugging keyboard and Display… so i was going to chroot into the card and get EOS installed on top of archarm image…

yay -S proot qemu-user-static
mkdir mnt
mount /dev/sdx2 mnt
mount /dev/sdx1 mnt/boot
cd mnt
cp /usr/bin/qemu-arm-static usr/bin
proot -R . -q qemu-arm-static
uname -m 
# will help you determine if you entered chroot environment successfully

Is the plan.
But is this still working?

Grab https://aur.archlinux.org/packages/armutils-git/

Among other tools, it includes arm-nspawn which easily allows you to chroot directly into an ARM chroot directory (including an image on a mounted USB device).

Very handy. :wink:

1 Like

Ha Ha after 58 minutes of compiling qemu-user-static you say me that :wink:

1 Like

Don’t worry, you’ll still need qemu-user-static. :grin:

i see… does it work with the bin version?

I haven’t tried it, but it should work; qemu-user-static-bin provides qemu-user-static.

I could upload qemu-user-static but I’m not sure there’s any point given the -bin version exists…

qemu-user-static 5.2.0-1

qemu-user-static-bin 5.2-2

could be a difference…but is the same version… only that the debian packages may not have the 0 in naming :wink:

So I uploaded it. :grin:

[root@arch]# arm-nspawn /mnt
==> ERROR: '/mnt' does not appear to be an Arch ARM chroot.

it says but i do mount the card there with a fresh copy of archarm…

Hmm.

It works for my local ALARM chroot directory (which I used for building packages):

$ sudo arm-nspawn /var/lib/aurbuild/aarch64/root pacman -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 alarm is up to date
 aur is up to date
:: Starting full system upgrade...
...

but it doesn’t work for an Armbian SD card. However, I can instead use chroot or arch-chroot as normal:

$ sudo arch-chroot /run/media/jonathon/da15d5e1-46c0-407a-9b31-e03c78672583
/usr/bin/groups: cannot find name for group ID 19
root@strix:/# apt-get update
Hit:1 http://ports.ubuntu.com focal InRelease                      
Get:2 http://ports.ubuntu.com focal-security InRelease [109 kB]    
Get:3 http://ports.ubuntu.com focal-updates InRelease [114 kB]
Get:4 http://ports.ubuntu.com focal-backports InRelease [101 kB]
...

i will try again i was on live-ISO may better do this on a real system…

1 Like

i can use arch-chroot here…

1 Like

Might be the “binfmt” files that are installed by qemu-user-static need a reboot to be noticed by systemd-binfmt.service? Not easy within a live environment… :sweat_smile:

:yum: :vulcan_salute:
yes i do try and error sometimes…

You could join Eos-ARM development :wink:

I may do at some point - but I’m way too busy with stuff at the moment. :grin:

I’d rather get jgmdev over here and he can do it for me… :rofl:

yes time needs to be compressed in a better way … I am also already exploding in my brain on everything, but i do start to include community more into development, plus working on a way to open installer to play more with it, so that it will be possible to add configs/setup of WM`s on demand without the need to integrate this into the ISO via git repos.

1 Like