Issue logging in on generic AArch64 image

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

Issue logging in on generic AArch64 image

Postby panther5482 » Fri Dec 04, 2020 9:21 am

Hi,

I downloaded the generic AArch64 rootfs image (https://archlinuxarm.org/platforms/armv8/generic) on the Arch Linux ARM website, intending to use it in QEMU using qemu-system-aarch64 (As described in http://osmanov-dev-notes.blogspot.com/2016/03/arch-linux-armv8-vm-on-gentoo-amd64.html). I extracted it onto a partition on a blank disk image and upon boot up I am unable to log into any account using the passwords provided. On the serial console these are the errors I get:
$this->bbcode_second_pass_quote('', '
')alarm login: [ 42.705748] audit: type=1130 audit(1607072502.520:77): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=sshd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 42.709263] audit: type=1131 audit(1607072502.530:78): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=sshd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 42.782777] audit: type=1130 audit(1607072502.600:79): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=sshd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 43.067414] audit: type=1131 audit(1607072502.880:80): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=sshd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
[ 43.426594] audit: type=1130 audit(1607072503.240:81): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=sshd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
root
Password:
[ 68.883732] kauditd_printk_skb: 1 callbacks suppressed
[ 68.883755] audit: type=1100 audit(1607072528.700:83): pid=350 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:authentication grantors=pam_securetty,pam_tally2,pam_shells,pam_unix,pam_permit acct="root" exe="/usr/bin/login" hostname=alarm addr=? terminal=ttyAMA0 res=success'
[ 68.906560] audit: type=1101 audit(1607072528.720:84): pid=350 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=? acct="root" exe="/usr/bin/login" hostname=alarm addr=? terminal=ttyAMA0 res=failed'

Authentication failure
[ 72.005649] audit: type=1131 audit(1607072531.820:85): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=serial-getty@ttyAMA0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 72.312632] audit: type=1130 audit(1607072532.130:86): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=serial-getty@ttyAMA0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 72.316858] audit: type=1131 audit(1607072532.130:87): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=serial-getty@ttyAMA0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 72.349769] audit: type=1130 audit(1607072532.170:88): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=serial-getty@ttyAMA0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

Arch Linux 5.8.0-1-ARCH (ttyAMA0)

I initially suspected this was due to ttyAMA0 not being added to securetty, but it seems as though adding /dev/ttyAMA0 to securetty had no effect and that the issue still occurs on tty1 (Using QEMU's standard display output). I have also tried changing the getty service and adding autologin for root, and while this does automatically try to log in as root, it for some reason still prompts me for a password which it will reject regardless of what I give it (The errors if the passwords are correct or not differ though, I believe it tells me "Authentication failure" when it's correct and "Incorrect password" when it isn't).

Is this possibly a bug in the latest generic image (QEMU specific maybe?) or have I missed a step outside of just extracting the rootfs using bsdtar? I imagine this is obvious but seeing as I can't log in and I can only make adjustments via mounting the image as a loop device, I have not been able to update the system, or change it outside of the things I mentioned I tried earlier.

For reference, the command that I use to start qemu is basically what's in the guide I linked, but here it is:
$this->bbcode_second_pass_code('', '
qemu-system-aarch64 -m 2048 -cpu cortex-a57 \
-smp 1 -M virt -bios /usr/share/AAVMF/AAVMF_CODE.fd -serial stdio \
-drive if=none,file=$filename,id=hd0 \
-device virtio-blk-device,drive=hd0 \
-kernel mnt/boot/Image -initrd mnt/boot/initramfs-linux-fallback.img \
-append "root=/dev/vda1"
')
(this is without USB and display hooked up)
panther5482
 
Posts: 1
Joined: Fri Dec 04, 2020 9:08 am

Re: Issue logging in on generic AArch64 image

Postby neilsimp1 » Sat Jan 02, 2021 6:16 pm

Were you ever able to resolve this?

I am running into the exact same issue now.
I've noticed that in addition to not being able to log in as root or alarm, Network Time Synchronization and User Login Management fail to start. For sure, this is why I cannot log in.

Here is the full log from trying to boot this VM: https://pastebin.com/s7PTuFGi

From /boot inside the Arch ARM image, I am using (extracted from the .tar.gz):
Kernel: Image
Initrd: initramfs-linux.img
Kernel args: root=/dev/vda1


Update
This is working for me by adding "rw" as a kernel arg:
Kernel: Image
Initrd: initramfs-linux.img
Kernel args: rw root=/dev/vda1
neilsimp1
 
Posts: 2
Joined: Sat Jan 02, 2021 5:27 pm


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 21 guests