Re: compiling for hyper-v

"Thomas Trepl" ([email protected] via lfs-support Mailing List) <[email protected]> Fri, 07 Nov 2025 08:09:20 +0100
Newsgroups gmane.linux.lfs.support
Message-ID <5b0c179f75d3f3a238ab74a8b72fca8dc3ac678a.camel@linuxfromscratch.org>
Am Donnerstag, dem 09.10.2025 um 14:56 +0200 schrieb Thomas Seeling:
> Hallo dear list,
> 
> I'm playing around with Hyper-V and I could compile LFS 12.4 
> successfully, but for the life of me I don't get it booting.
> 
> Secure boot is off, LFS was built with Fedora 42 to a different 
> partition, so basically it's ready, but I cannot find the right 
> combination of kernel config definitions to make it boot.
> 
> I switched on all config lines with "HYPERV" in it, then ran `make 
> menuconfig` and it asked me some more questions about dependencies (like 
> some _SCSI_ definitions). 
Directly edited the .config?  Ok, but exactly for that they have invited
the menuconfig. It resolves some deps automatically and switches on/off
other settings. I'd never edit the .config by hand. Just have a look in it
where a specific option can be found in the menu.
> Compile went fine, but if I select the LFS 
> partition in the grub menu, it does nothing.
> 
> I have no idea what I'm doing wrong - I expected that it at least could 
> load the kernel, then panic because it can't find the virtual disk, but 
> after grub it does ... nothing?
Strange. What does "nothing" mean? Runs into a black screen and hangs, or
does the boot loader just return to where it got started?

> Out of desperation I started LFS with the Fedora kernel and its 
> initramfs, and this works, kind of, but of course it fails because I 
> built LFS with sysV, and Fedora has systemd.
Ok, at least it proves that the boot loader itself does work and file names
etc are correct.

> 
> Anybody else working with your own kernel in a Hyper-V environment? What 
> settings have I missed?
Not me and good question. I have only VirtualBox as host for my VMs running
on LFS. There is nothing special to configure (at least i do not remember).
I don't know which strange things HyperV does, but since its a M$ thing,
obscure things can happen. Is there something like signing the kernel image
or stuff like that so that HV refuses to run that initrd/kernel? Just blind
guesses...

-- 
Thomas

-- 
http://lists.linuxfromscratch.org/sympa/info/lfs-support
Unsubscribe: See the above information page