Solution: compile kernel for Hyper-V VM
"Thomas Seeling" ([email protected] via lfs-support Mailing List) <[email protected]> Thu, 19 Mar 2026 09:26:47 +0000
| Newsgroups | gmane.linux.lfs.support |
|---|---|
| Message-ID | <trinity-d28acdd7-5b26-48e6-b7a6-a0b171c5d539-1773912407625@trinity-msg-rest-gmx-gmx-live-6779b97d68-m9tn5> |
This is a multi-part message in MIME format... ------------=_1773912421-22678-17154 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hallo dear list, 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 s= uggestions were basically useless they pointed me in the right direction to= continue. The AI always congratulated me at every step, and assured me "th= at'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 al= l: I still wanted to continue with Fedora's grub (my hostsystem for the ini= tial build), and the kernel configuration. First I simply added my LFS partition to the boot menu, and grub did not ev= en *try* to start loading the kernel, it just sat there and nothing happene= d. I switched off the "BLS" method where grub uses config files in /boot/loade= r/entries to define each bootable option, and replaced it with a minimal gr= ub.cfg - this worked. Then I found out that not only had I have to enable all of the CONFIG_HYPER= V_* kernel settings and have them compiled into the kernel as static module= s (so choose y not m), I had to make them visible in make menuconfig. Previ= ously I simply edited the .config file with vi, changing all from "# ... is= not set" to "=3Dy". 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 i= n. But I was sure I had included CONFIG_HYPERV_STORAGE into .config manuall= y with an echo >> command, but I could not find it anymore after building t= he kernel. So I ran make menuconfig and used / to search for the keyword. I= t was there, but I could not navigate to it. I had to enable the upper leve= ls of menu choices (it is under low level SCSI drivers). This might sound obvious to experienced kernel compiler folk but to me it w= as news. If the upper-level option in the config tree is not enabled the ke= rnel will not look at the settings in the lower decks. Stay healthy, Thomas --=20 "Do you wanna be a legend or a passing footprint on the sands of time?" ------------=_1773912421-22678-17154 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- http://lists.linuxfromscratch.org/sympa/info/lfs-support Unsubscribe: See the above information page ------------=_1773912421-22678-17154--