Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
solved - Gentoo does not boot on KVM guest
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Jimini
l33t
l33t


Joined: 31 Oct 2006
Posts: 608
Location: Germany

PostPosted: Mon Feb 10, 2025 7:16 am    Post subject: solved - Gentoo does not boot on KVM guest Reply with quote

Dear all,

I am currently setting up a Gentoo box on a virtual machine. According to "dmidecode -s system-product-name", it is running on a KVM host.
Unfortunately, the system does not boot my configured kernel - after the grub splashscreen, only the following appears and the system does not boot:

"Loading Linux 6.6.74 gentoo ...
_"

I configured the kernel according to https://wiki.gentoo.org/wiki/QEMU/Linux_guest#Kernel. Since this kernel did not boot, I also built a kernel using
# make defconfig
and
# make kvm_guest.config

For testing purposes, I also activated all drivers for framebuffer devices - still no effect.

The problem stays the same. Since I have currently no idea what else I could try, I am asking for help ;)

See my system information here:
emerge --info: https://paste.gentoo.zip/EF9l6AAJ
dmesg: https://paste.gentoo.zip/2PEBmLw1
kernel config: https://paste.gentoo.zip/qI1zl0sp
lspci -nnk:

Code:
00:00.0 Host bridge [0600]: Intel Corporation 440FX - 82441FX PMC [Natoma] [8086:1237] (rev 02)
        Subsystem: Red Hat, Inc. Qemu virtual machine [1af4:1100]
lspci: Unable to load libkmod resources: error -2
00:01.0 ISA bridge [0601]: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II] [8086:7000]
        Subsystem: Red Hat, Inc. Qemu virtual machine [1af4:1100]
00:01.1 IDE interface [0101]: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II] [8086:7010]
        Subsystem: Red Hat, Inc. Qemu virtual machine [1af4:1100]
        Kernel driver in use: ata_piix
00:01.2 USB controller [0c03]: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] [8086:7020] (rev 01)
        Subsystem: Red Hat, Inc. QEMU Virtual Machine [1af4:1100]
        Kernel driver in use: uhci_hcd
00:01.3 Bridge [0680]: Intel Corporation 82371AB/EB/MB PIIX4 ACPI [8086:7113] (rev 03)
        Subsystem: Red Hat, Inc. Qemu virtual machine [1af4:1100]
        Kernel driver in use: piix4_smbus
00:02.0 VGA compatible controller [0300]: Device [1234:1111] (rev 02)
        Subsystem: Red Hat, Inc. Device [1af4:1100]
        Kernel driver in use: bochs-drm
00:03.0 Ethernet controller [0200]: Red Hat, Inc. Virtio network device [1af4:1000]
        Subsystem: Red Hat, Inc. Device [1af4:0001]
        Kernel driver in use: virtio-pci
00:10.0 SCSI storage controller [0100]: Red Hat, Inc. Virtio block device [1af4:1001]
        Subsystem: Red Hat, Inc. Device [1af4:0002]
        Kernel driver in use: virtio-pci
00:1c.0 Communication controller [0780]: Red Hat, Inc. Virtio console [1af4:1003]
        Subsystem: Red Hat, Inc. Device [1af4:0003]
        Kernel driver in use: virtio-pci
00:1e.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon [1af4:1002]
        Subsystem: Red Hat, Inc. Device [1af4:0005]
        Kernel driver in use: virtio-pci


Any ideas, what could be missing?

Best regards and thanks in advance
Jimini
_________________
"The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents." (H.P. Lovecraft: The Call of Cthulhu)


Last edited by Jimini on Tue Feb 11, 2025 9:37 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54852
Location: 56N 3W

PostPosted: Mon Feb 10, 2025 11:10 am    Post subject: Reply with quote

Jimini,

It sounds like your console driwer is missing, at least. It may boot but you can't see it.

Code:
00:02.0 VGA compatible controller [0300]: Device [1234:1111] (rev 02)
        Subsystem: Red Hat, Inc. Device [1af4:1100]
        Kernel driver in use: bochs-drm


Turn off
Code:
CONFIG_DRM_I915=y

Turn on
Code:
# CONFIG_DRM_BOCHS is not set
thats the driver for your faked VGA card. Make it a module in case it needs firmware.
Install linux-firmware to provide said firmware.

Turn off all the
Code:
CONFIG_FB_*
options except
Code:
CONFIG_FB_VESA=y
CONFIG_FB_EFI=y
CONFIG_FB_SIMPLE=y

VESA will be used if you BIOS boot. EFI will be used if you EFI boot. SIMPLE can be used if you set up grub. to use it.
All the others fight over the hardware and none will work.

Turn on
Code:
# CONFIG_FRAMEBUFFER_CONSOLE is not set
All console drivers are framebuffer devices now. That should only be off for very old real hardware.

Code:
# CONFIG_LOGO is not set
Have tux per thread at boot if you want.

Code:
CONFIG_MSDOS_PARTITION=y
CONFIG_EFI_PARTITION=y
CONFIG_BLOCK=y
CONFIG_VIRTIO_PCI=y
CONFIG_SCSI_VIRTIO=y
CONFIG_SATA_AHCI=y
CONFIG_ATA_PIIX=y
are all good.

The changes to your console drivers should let you see kernel messages
If you have root on EXTx, I think it has been booting. :)
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5398
Location: Bavaria

PostPosted: Mon Feb 10, 2025 2:01 pm    Post subject: Reply with quote

yes, after I checked your .config I see:
Code:
# CONFIG_DRM_FBDEV_EMULATION is not set

# CONFIG_DRM_BOCHS is not set

# CONFIG_FRAMEBUFFER_CONSOLE is not set

As @Neddy already said these must be enabled.
(see more here: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_Configuring_Kernel_Version_6.12#Framebuffer_Device_and_Console )

I also suggest to have a look to your settings for IOMMU ->
Code:
# CONFIG_VIRTIO_IOMMU is not set

(see more here: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_Configuring_Kernel_Version_6.12#IOMMU )
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Jimini
l33t
l33t


Joined: 31 Oct 2006
Posts: 608
Location: Germany

PostPosted: Tue Feb 11, 2025 9:37 am    Post subject: Reply with quote

Thanks a lot for your quick and helpful replies (once again... :) )!

The system is booting now, but I am unsure what the root cause was.

I will try to recomprehend what I did...
Immediately after Neddys answer, I rebuilt my kernel according to his hints. The system still did not boot.
Then I realized, that had overlooked the following:

Turn on
Code:
# CONFIG_DRM_BOCHS is not set   

thats the driver for your faked VGA card. Make it a module in case it needs firmware.
Install linux-firmware to provide said firmware.


Thus, I enabled the following option:
Code:
[*] Enable loadable module support  ----

and emerged linux-firmware. Since I did not use firmware and modules very often during the last years, I was unsure where to provide the firmware exactly. So I recompiled the kernel and I think, that the system booted afterwards.

I have now deactivated module support again and everything still runs as expected. I have put my running kernel config to https://paste.gentoo.zip/ZpodQKwh and I hope to help someone else with this.

Best regards and again thank you for your help
Jimini
_________________
"The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents." (H.P. Lovecraft: The Call of Cthulhu)
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5398
Location: Bavaria

PostPosted: Tue Feb 11, 2025 12:21 pm    Post subject: Reply with quote

Jimini wrote:
Thanks a lot for your quick and helpful replies (once again... :) )! [...]

You are very Welcome! :D

Jimini wrote:
[...] Since I did not use firmware and modules very often during the last years, I was unsure where to provide the firmware exactly. [...]

Please see this chapter: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#Driver_needs_Firmware

It is possible that Bochs does not require firmware. Simply check your system log with “dmesg”.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54852
Location: 56N 3W

PostPosted: Tue Feb 11, 2025 7:09 pm    Post subject: Reply with quote

Jimini.

I'm pleased you made it work.

I don't know if bochs_drm needs firmware or not. Many DRM drivers do, so the "make it a module and install the firmware" is a safe approach.
The other way to do it it to build the kernel with both bochs_drm and the firmware (if any) into the kernel binary.

Your new kernel configuration may leave you with a blank console again.

Code:
CONFIG_DRM_BOCHS=y
CONFIG_EXTRA_FIRMWARE=""
As that works, you do not need firmware for your video driver.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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