Fail to boot amd64 MINIMAL under QEMU

Very good - I can replicate this. Had to goole myself out of the pacman but I was able to upgrade qemu to 9.2, issue is still there. I'll have a deeper look later today, I wanted to share this.
I was able to replicate this with and without accel option, this is not about kernel version then. This is most likely about how qemu was compiled on archlinux though right now I'm not sure.
 
Important note from the ata(4):
Code:
     Some of above chips can be configured for AHCI mode.  In such case they
     are supported by ahci(4) driver instead.

When you check qemu-system-x86_64 -M help you'll see what is qemu using as its default. By default it uses pc-i440fx-9.2 (i440FX + PIIX, 1996) which seems to be working just fine with the config I suggested.

However .. it's very common nowdays to specify -M q35 which is using ICH9 chipset. Not a problem, both are covered by ata(4). But this chipset is using AHCI mode, something that is missing from MINIMAL. I was using this option without thinking about it. I know you didn't specify it on command line, maybe it's an alias or something similar. There's one more monitor command we could check on your setup: info qtree.

You can test this easily on your current VM. Interrupt boot and load the module:
Code:
OK unload all
OK load /boot/kernel/kernel
/boot/kernel/kernel text=0xb49c0 text=0x4c3d68 text=0xc3868 data=0x140+0xec0 data=0xb82a0+0x347d60 0x8+0xc47d0+0x8+0xe3b63/
OK load /boot/kernel/ahci.ko
/boot/kernel/ahci.ko size 0x18488 at 0x11a9000
OK boot

And the VM log:
Code:
ahci0: <Intel ICH9 AHCI SATA controller> port 0x6040-0x605f mem 0x81040000-0x81040fff irq 16 at device 31.2 on pci0
ahci0: Failed to allocate MSI/MSI-x, falling back to INTx
ahci0: AHCI v1.00 with 6 1.5Gbps ports, Port Multiplier not supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich2: <AHCI channel> at channel 2 on ahci0
ahcich3: <AHCI channel> at channel 3 on ahci0
ahcich4: <AHCI channel> at channel 4 on ahci0
ahcich5: <AHCI channel> at channel 5 on ahci0
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0

To cover this you need to add ahci to the config. This is the final config diff then:
Code:
# diff -w sys/amd64/conf/MINIMAL sys/amd64/conf/MARTIN
31c31
< ident        MINIMAL
---
> ident        MARTIN3
147a148,153
>
> device scbus
> device ata
> device ada
> device ahci
> options     FFS

Note I still recommend using virito, there's really no reason why not to.
 
Back
Top