Skip to content

Add hyper-v modules, needed to enter LUKS password

Arnaud Rebillout requested to merge arnaudr/initramfs-tools:hyperv into master

As reported in the Kali Linux bug tracker, it's not possible to type the LUKS password, in case of full disk encryption, in Gen2 Hyper-V virtual machine. This is due to missing modules.

The original bug is at https://bugs.kali.org/view.php?id=7846, and I'll quote the bits that are relevant:

Because Generation 2 virtual machines in Hyper-V are presented with a minimal set of EFI hardware, the kernel module "hyperv_keyboard" must be present to interact with the console keyboard. On systems with disk encryption, the user will be prompted for the key to decrypt the disk, but cannot enter the password because no keyboard driver is present.

[...]

This module is present when the grub menu is presented and later when the kernel is fully loaded. FYI, if some mechanism requires a mouse or touch, the hid_hyperv module will also be needed.

This issue also affects Debian, as discussed in: https://forums.debian.net/viewtopic.php?t=131468

This issue was also reported in the Ubuntu tracker, back in 2016: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1567107 It was fixed in Ubuntu, but the changes never made it to Debian.

Therefore this commit cherry-picks what's in the Ubuntu's initramfs-tools regarding Hyper-V.

The module hyperv-keyboard and its dependent hv_vmbus are clearly needed to fix the issue at hand.

Other modules are just included on the assumption that if it's included in Ubuntu, it must be useful for some use-cases. For the record, those modules were added to Ubuntu back in 2012, in response to this bug: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/917135

Merge request reports

Loading