Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

solved - Gentoo does not boot on KVM guest

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
Jimini
l33t
l33t
User avatar
Posts: 620
Joined: Tue Oct 31, 2006 8:39 am
Location: Germany

solved - Gentoo does not boot on KVM guest

  • Quote

Post by Jimini » Mon Feb 10, 2025 7:16 am

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: Select all

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
Last edited by Jimini on Tue Feb 11, 2025 9:37 am, edited 1 time in total.
"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)
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56078
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Mon Feb 10, 2025 11:10 am

Jimini,

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

Code: Select all

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: Select all

CONFIG_DRM_I915=y
Turn on

Code: Select all

# 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: Select all

CONFIG_FB_*
options except

Code: Select all

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: Select all

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

Code: Select all

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

Code: Select all

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.
Top
pietinger
Moderator
Moderator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Feb 10, 2025 2:01 pm

yes, after I checked your .config I see:

Code: Select all

# 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:Pieti ... nd_Console )

I also suggest to have a look to your settings for IOMMU ->

Code: Select all

# CONFIG_VIRTIO_IOMMU is not set
(see more here: https://wiki.gentoo.org/wiki/User:Pieti ... 6.12#IOMMU )
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
Jimini
l33t
l33t
User avatar
Posts: 620
Joined: Tue Oct 31, 2006 8:39 am
Location: Germany

  • Quote

Post by Jimini » Tue Feb 11, 2025 9:37 am

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: Select all

# 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: Select all

[*] 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)
Top
pietinger
Moderator
Moderator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Tue Feb 11, 2025 12:21 pm

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:Pieti ... s_Firmware

It is possible that Bochs does not require firmware. Simply check your system log with “dmesg”.
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56078
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Tue Feb 11, 2025 7:09 pm

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: Select all

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.
Top
Post Reply

6 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic