View previous topic :: View next topic |
Author |
Message |
twork Apprentice
Joined: 28 Jul 2006 Posts: 190
|
Posted: Tue Apr 16, 2024 11:48 pm Post subject: SOLVED: arm64 on a QEMU VM? |
|
|
I've got the latest 'install-arm64-minimal-[...].iso'.
Next to that, I've made a file, named 'sal10-gentoo.img', which is a disk image for a RaspberryPi that I've made from scratch, according to https://wiki.gentoo.org/wiki/Raspberry_Pi_Install_Guide; that's mostly in place, but there are some final steps to do, so I want to boot it on a VM.
When I run:
Code: | $ sudo qemu-system-aarch64 -nographic \
-machine virt,gic-version=max \
-m 512M \
-cpu max \
-smp 4 \
-bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd \
-netdev user,id=vnet,hostfwd=:127.0.0.1:5555-:22,net=192.168.122.0/24,host=192.168.122.145 \
-device virtio-net-pci,netdev=vnet \
-drive file=install-arm64-minimal-20240414T234900Z.iso,if=none,id=hd0,format=raw \
-drive file=sal10-gentoo.img,if=none,id=hd1,format=raw \
-device virtio-blk-devi |
...it looks like something is missing, here's where things start to go wrong:
Code: | [...]
[ 31.811904] evm: HMAC attrs: 0x1
[ 31.825991] clk: Disabling unused clocks
[ 31.948366] Freeing unused kernel memory: 8192K
[ 32.359662] Checked W+X mappings: passed, no W+X pages found
[ 32.361076] Run /init as init process
mount: mounting none on /run failed: No such file or directory
busybox: 'busybox' is not an absolute path
/init: line 1160: sed: not found
/init: line 1163: ts: not found
/init: line 497: can't create /proc/sys/kernel/printk: nonexistent directory
/init: line 1160: sed: not found
/init: line 1163: ts: not found
>> Genkernel 4.3.10 (2024-04-15 01:32:59 UTC). Linux kernel 6.6.21-gentoo-arm64
/init: line 1449: sed: not found
/init: line 1449: sed: not found
[...] |
...which ends up at: Code: | /init: line 899: date: not found
sh: 5: unknown operand
/init: line 1160: sed: not found
/init: line 1163: ts: not found
!! Block device is not a valid root device ...
/init: line 1163: ts: not found
/init: line 1160: sed: not found
!! Could not find the root block device in .
/init: line 1160: sed: not found
/init: line 1163: ts: not found
!! Please specify another value or:
/init: line 1160: sed: not found
/init: line 1163: ts: not found
!! - press Enter for the same
/init: line 1163: ts: not found
/init: line 1160: sed: not found
!! - type "shell" for a shell
/init: line 1160: sed: not found
/init: line 1163: ts: not found
!! - type "q" to skip ...
root block device() :: qemu-system-aarch64: terminating on signal 15 from pid 74085 (bash)
|
My guess: there's a missing file that should be referred on the qeum-system-aarch64 command line, maybe? What have I missed/skipped?
Thanks.
Last edited by twork on Thu Apr 18, 2024 4:09 am; edited 1 time in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54572 Location: 56N 3W
|
Posted: Wed Apr 17, 2024 6:19 pm Post subject: |
|
|
twork,
Code: | !! Could not find the root block device in . |
Just before the period at the end of that line is a list of all the block devices that the kernel can see.
There are none listed.
That suggests that the kernel that has been started either needs an initrd or is missing support for -device virtio-blk-devi(e)
The Pi5 kernel contains
Code: | Pi5-LVM /usr/src/linux # grep VIRTIO .config
CONFIG_VIRTIO_VSOCKETS_COMMON=m
# CONFIG_VIRTIO_CONSOLE is not set
# CONFIG_I2C_VIRTIO is not set
# CONFIG_DRM_VIRTIO_GPU is not set
CONFIG_VIRTIO_MENU=y
# CONFIG_VIRTIO_PCI is not set
# CONFIG_VIRTIO_MMIO is not set
# CONFIG_RPMSG_VIRTIO is not set
# CONFIG_VIRTIO_FS is not set | so it needs to have virtio added to boot in your VM.
The CDROM image should work though. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
twork Apprentice
Joined: 28 Jul 2006 Posts: 190
|
Posted: Wed Apr 17, 2024 9:22 pm Post subject: |
|
|
Quote: | The Pi5 kernel contains |
Oops, I meant to include: this is a Pi4 system; I thought that wouldn't be a problem but maybe...? I looked through:
https://wiki.gentoo.org/wiki/Raspberry_Pi4_64_Bit_Install
...and there's plenty o' stuff here that differs from what I'm doing as I follow through the "vanilla(?)" page. But it's encouraging to read:
Quote: | The CDROM image should work though. |
For whatever it's worth, I did try this with only the CDROM, no fresh setup at all. No difference. That's what made me think I must be overlooking something fundamental.
Much thanks. (As always.) |
|
Back to top |
|
|
twork Apprentice
Joined: 28 Jul 2006 Posts: 190
|
Posted: Thu Apr 18, 2024 4:02 am Post subject: |
|
|
As NeddySeagoon pointed out, there's no ramdisk being accessed. That got me looking at the sequence again; further up, I see: Code: | [...]
[ 2.610052] NET: Registered PF_INET6 protocol family
[ 30.009853] Initramfs unpacking failed: write error
[ 30.149033] Freeing initrd memory: 70956K
[...] |
Oho! But, "write error"? I'd expect this stage to be writing only in memory, if only because we booted from a CD.
Red herring? Or bug? Or I'm still doing something wrong in my setup? |
|
Back to top |
|
|
twork Apprentice
Joined: 28 Jul 2006 Posts: 190
|
Posted: Thu Apr 18, 2024 4:09 am Post subject: |
|
|
...or, I just didn't have enough RAM. On the qemu-system-aarch64 line, changed "-m 512" to "-m 1024" and the problem went away. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|