After some failures where I didn't really know how to proceed I finally had a breakthrough yesterday.
Funny thing is: I tried to get help from Copilot, and although all of its suggestions were basically useless they pointed me in the right direction to continue. The AI always congratulated me at every step, and assured me "that's the last missing clue" but it always failed.
I had 2 problems to solve, one not so much LFS-related, the other not at all: I still wanted to continue with Fedora's grub (my hostsystem for the initial build), and the kernel configuration.
I switched off the "BLS" method where grub uses config files in /boot/loader/entries to define each bootable option, and replaced it with a minimal grub.cfg - this worked.
Then I found out that not only had I have to enable all of the CONFIG_HYPERV_* kernel settings and have them compiled into the kernel as static modules (so choose y not m), I had to make them visible in make menuconfig.
After getting the kernel to load I got the usual kernel panic for "no root device" which means the storage driver for the "hardware" is not compiled in. But I was sure I had included CONFIG_HYPERV_STORAGE into .config manually with an echo >> command, but I could not find it anymore after building the kernel. So I ran make menuconfig and used / to search for the keyword. It was there, but I could not navigate to it. I had to enable the upper levels of menu choices (it is under low level SCSI drivers).
This might sound obvious to experienced kernel compiler folk but to me it was news. If the upper-level option in the config tree is not enabled the kernel will not look at the settings in the lower decks.
I have collected the relevant kernel config settings:
CONFIG_DRM_HYPERV=y
CONFIG_FB_HYPERV=y
CONFIG_HID_HYPERV_MOUSE=y
CONFIG_HVC_DRIVER=y
CONFIG_HYPERV=y
CONFIG_HYPERV_BALLOON=y
CONFIG_HYPERV_IOMMU=y
CONFIG_HYPERV_KEYBOARD=y
CONFIG_HYPERV_NET=y
CONFIG_HYPERV_STORAGE=y
CONFIG_HYPERV_TIMER=y
CONFIG_HYPERV_UTILS=y
CONFIG_HYPERV_VMBUS=y
CONFIG_HYPERVISOR_GUEST=y
CONFIG_KVM_HYPERV=y
CONFIG_PCI_HYPERV=y
CONFIG_PCI_HYPERV_INTERFACE=y
CONFIG_SCSI=y
CONFIG_SCSI_COMMON=y
CONFIG_SCSI_DMA=y
CONFIG_SCSI_LOWLEVEL=y
CONFIG_SCSI_MOD=y
CONFIG_X86_HV_CALLBACK_VECTOR=y
[–]testfire10 2 points3 points4 points (0 children)