I am on a x86_64 system and want to boot into the aarch64 image using `systemd-nspawn` with `systemd-binfmt.service` and `qemu-user-static-bin` to prepare an image for RPi4 (building & installing packages).
I use the following shell script to create the image:
$this->bbcode_second_pass_code('', '
set -e
GB_COUNT=10
ALARM_ARCHIVE=ArchLinuxARM-rpi-aarch64-latest.tar.gz
wget http://os.archlinuxarm.org/os/$ALARM_ARCHIVE
HOSTNAME=tb0
IMG=archlinuxarm-root.img
dd if=/dev/zero of=$IMG bs=1G count=$GB_COUNT status=progress
sudo mkfs.ext4 $IMG
mkdir -p root
sudo mount $IMG root
sudo bsdtar -xpf $ALARM_ARCHIVE -C root
# sudo umount root
')
Then I try to boot into the system using:
$this->bbcode_second_pass_code('', '
sudo systemd-nspawn -D root -b
')
During boot I get the following error
$this->bbcode_second_pass_code('', '
systemd-sysusers.service: Failed to set up credentials: Invalid argument
systemd-sysusers.service: Main process exited, code=exited, status=243/CREDENTIALS
')
Boot process continues but I cannot login using the default password for root:
$this->bbcode_second_pass_code('', '
alarm login: root
Password:
Login incorrect
')
Probably `qemu` causes this problem (https://github.com/systemd/systemd/issues/21511), but I am not sure. Can someone verify this or have a fix/workaround?