Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for Windows 11 24H2 driver injection #885

Merged
merged 2 commits into from
Oct 26, 2024

Conversation

gibmat
Copy link
Contributor

@gibmat gibmat commented Oct 25, 2024

This fixes two issues when injecting drivers into an installed Windows 11 24H2 system:

  • Adjust name of driver inf files
  • Also install exes when injecting drivers

When injecting drivers for Windows 11 24H2, there can be a conflict with
an existing "oem0.inf" file from C:\WINDOWS\System32\DriverStore\FileRepository\vmci.inf_amd64_72a1c95f9120db75\.
In the case of the NetKVM driver, this will prevent it from being
properly installed.

To work around this, adjust the name of the inf files installed so they
won't conflict with any existing ones.

Signed-off-by: Mathias Gibbens <[email protected]>
The NetKVM driver depends on starting a service when it is installed.
Without the corresponding exes, this will fail, so also install any
relevant exes when injecting the driver.

Signed-off-by: Mathias Gibbens <[email protected]>
@@ -489,7 +489,7 @@ func (c *cmdRepackWindows) injectDrivers(infDir, driversDir, filerepositoryDir,
softwareRegistry := "Windows Registry Editor Version 5.00"
for driverName, driverInfo := range windows.Drivers {
logger.WithField("driver", driverName).Debug("Injecting driver")
infFilename := fmt.Sprintf("oem%d.inf", i)
infFilename := fmt.Sprintf("oem-virtio-incus%d.inf", i)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if there are any "magical" assumptions about the inf files being named "oemX.inf", but driver installation seemed to continue working properly with the renamed inf files.

@stgraber stgraber merged commit bf4232a into lxc:main Oct 26, 2024
8 checks passed
@gibmat gibmat deleted the fix-win11-24h2-driver-injection branch October 28, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants