So i’m going to explain how i’ve installed Windows 7 on my Lenovo V14 G4 AMN, as well as the fixes i’ve got and what’s left to fix.
Some of these things could also obviously apply to other hardware.
Now of course you can make this easier by modifying the windows 7 iso to already include usb driver as well as its update or even more fixes like nvme updates, however im going with a stock iso but some of these steps may be skippable in your case if using a modified iso.
I’ll refer to a “work environment” as an installer/working windows install you can boot into to work on windows 7.
Requirements:
Windows 10 installation iso (will be used to install windows 7 to skip getting its installer working)
Windows 7 x64 iso (service pack 1 optionally, recommend it since thats what i tried it on and its usually better to use anyway rather than release)
Modded acpi.sys file from here: GitHub - Rireki/Win7_ACPI_Patch: A simple modified acpi.sys integrator for Windows 7.
KB2990941 & KB3087873 updates for windows 7 from here:
NVME Updates.zip (6.6 MB)
bootmgfw.flashboot.efi file from here: windows-7-uefi-fix directory listing
acpidump, iasl & asl command line utilities from here to edit acpi dsdt table in windows 7:
ACPI Tools.zip (598.7 KB)
Generic USB 3 driver & KB2864202 update for windows 7 from here:
Win7 Generic USB Driver.zip (1.3 MB)
0- Installing Windows 7 (before fixing it so it boots & works)
Flash the windows 10 iso (has to be a working installer) to a usb drive or something you can boot off of, then go to sources folder and get rid of/move install.wim (or possibly multiple install.swm files) out of the way, then go into the windows 7 iso, go to sources and grab ITS install.wim file and place it in the windows 10 installer under sources.
Booting the installer should now let you install windows 7 as expected, and it should go pretty much flawlessly (you can choose ultimate, pro, or anything you want really)
However, trying to boot windows 7 will result in an almost immediate crash, and this is where you either need another working windows install or the windows installer to work with & fix windows 7.
1- Fixing ACPI BSOD
The reason windows 7 crashes almost instantly is because it crashes due to non-working acpi, and it actually throws a BSOD that just does not display since graphics is broken (which is also something that will be fixed later).
This is where you’ll need the acpi.sys file to fix this bsod. Boot into your work environement and replace acpi.sys in windows 7.
Or, alternatively, use a windows 7 modified iso with fixed acpi.
You can either replace all the acpi.sys files in the filesystem to avoid having to replace it again after the first reboot (after windeploy), or you can only replace acpi.sys in \Windows\system32\drivers but you’ll have to replace it once again later.
If you’re replacing all of them, run dir/s acpi.sys in the root of the drive to find all paths with acpi.sys in them to then replace them. Depending on if you’re using an installer or not, you may run into access denied errors where you’ll either need to run a command prompt as trustedinstaller through other tools, or edit file owner & permissions to allow you to edit them (as well as possibly the folder they’re in).
Once you replaced acpi.sys with the patched one on windows 7, acpi should now be fixed however windows 7 will not get much further at all most likely and bsod very shortly after if installed on an NVME drive since it lacks the drivers for it.
2- Adding NVME drivers to fix BSOD
Microsoft released 2 updates which added official nvme support to windows 7 which you’ll need to install to get windows 7 to boot.
Alternatively, you can use a modded windows 7 iso with these updates built-in (see windows 7 isos with “nvme drivers”)
Boot into your work environement, use an admin cmd and change your directory to the one which has the KB2990941.msu and KB3087873.msu files extracted from earlier. I’ll be assuming the windows 7 drive letter is D:\, however change accordingly if it is not.
Run this command:
dism /image:D:\ /add-package /packagepath:KB2990941.msu
And:
dism /image:D:\ /add-package /packagepath:KB3087873.msu
Once you’ve waited for them to install and they both succeeded, you can now boot back into windows 7 where you’ll get much further and the bootscreen will state “Setup is updating registry settings”. Do NOT power off the system at this state, as it is actually secretly running in the background without any display output and is going through windeploy. It will eventually reboot after a few minutes.
Once it did, you can now move on to fixing graphics, as well as swapping out acpi.sys again if you had only replaced it in \Windows\system32\drivers earlier.
3- Fixing graphics/display output
You’ll need the bootmgfw.flashboot.efi file from earlier, and you’ll need to boot into your work environement.
From there, open an admin cmd, and mount the EFI partition.
You can do this by running mountvol and mounting a volume with no mount points by running mountvol (letter you want) (unc path to that volume)
Example: mountvol W: \\?\Volume{63d62724-9037-4f9d-9637-e208680e95fe}\
Now go to the letter you mounted, and it should have an EFI folder. If it does not, you got the wrong volume and you can unmount it by running mountvol W: /d
Mount the next volume with no mount points in the list until you get the correct volume mounted.
Now go to EFI\Microsoft\Boot, and replace bootmgfw.efi file with the bootmgfw.flashboot.efi file from earlier (you’ll have to rename it to bootmgfw.efi of course)
Something to note is this will affect dualboots with lets say windows 10 which will no longer be able to boot, so in that case you’ll need to use a workaround like making a copy of the EFI folder on lets say a usb drive and replacing its bootmgfw.efi file, then booting off of that to boot into your windows 7. You have to do this AFTER windeploy has ran, otherwise it will throw an error and kick you out of windeploy and reboot then say you have to reinstall windows 7!
If you manage to boot windows 7 with the custom efi file, windows 7 should now display and you should be met with OOBE screen! However you most likely won’t be able to control windows 7 yet, as the trackpad, internal keyboard, and usb ports ALL won’t work, so you’ll have to fix one of these first to go through setup. I was able to fix the internal keyboard as well as usb ports, however i haven’t got the trackpad working yet, so you’ll most likely need a mouse after you’re done setting up windows 7 to actually use it.
This obviously is not true if you have an iso with usb drivers added, as you can use that to get past setup and fix the keyboard.
4- Fixing the internal laptop keyboard
I’ll now explain how to fix the laptop’s keyboard, which you’ll to download acpidump, iasl & asl for, and you can also do this just fine in your work environement (“offline”) if you cant control windows 7 yet, except for actually applying the tables on windows 7 which i’ll get into later.
Now, to keep this organised, you’ll probably want a folder to work from with all 3 executables from earlier extracted.
Run an admin cmd, and start by running acpidump -b
This will dump a bunch of acpi tables and make a lot of files, however you can delete all of these except for dsdt.dat which is the one we actually need.
Now, to make this file readable, run iasl -d dsdt.dat which will produce a dsdt.dsl file which you can just edit in notepad. You no longer need dsdt.dat, so you can delete that if you wish.
Open dsdt.dsl in notepad, and then ctrl f to look up and type “Keyboard”. This should bring you to the keyboard device, and if you look a few lines down you’ll find a line that says:
IRQ (Edge, ActiveLow, Shared, )
Change the “Edge” word to “Level”. You should end up with this:
IRQ (Level, ActiveLow, Shared, )
That’s all you need to modify. You can now save the file and recompile it by running iasl -tc dsdt.dsl which will produce dsdt.hex and dsdt.aml files (unless there’s an error from the file being edited incorrectly). You do not need dsdt.hex (and probably dsdt.dsl anymore) so you can get rid of those.
Now, if you’re able to control windows 7, you can simply copy asl.exe and dsdt.aml to it and then run asl /loadtable dsdt.aml and skip the next steps however if you’re unable to control it you’ll need to run that command on startup. Here’s how:
Copy asl.exe, dsdt.aml to the root of the windows 7 drive, and also create a script.bat file.
Open that script.bat file, and put this in it:
\asl /loadtable \dsdt.aml
timeout /t 5
Save the file. Now open the registry editor, and go to hkey_local_machine, then press file and load hive and browse to \Windows\system32\config, and load SYSTEM file then name it sys when registry editor prompts you to name it.
Now that it is loaded, go to HKLM\sys\Setup
Make sure to save the original values that are on the right, as we’ll edit them and you’ll need to set them back after!
Set these:
CmdLine > cmd /c \script.bat
OOBEInProgress > 1
RestartSetup > 1
SetupPhase > 3
SetupType > 2
SystemSetupInProgress > 1
Now that you’ve done that, select sys, go to file and unload the hive.
Boot into windows 7 once, and when it boots up you should see a cmd and you should see it saying that table overriding succeeded. After 5 seconds, it should reboot.
Now, do NOT boot back into windows 7! Boot back into the work environement, load sys hive and set HKLM\sys\Setup values back to their originals and unload the hive!
This should’ve had the same effect as controlling windows 7 to run asl /loadtable dsdt.aml.
You’ve now applied the dsdt patch that’ll fix the keyboard, however it won’t actually apply until testsigning is enabled on windows 7. (Test mode).
Boot back into your work environement (or windows 7 if you can control it), and use bcdedit in cmd to set testsigning to on. Normally with regular BCD that hasnt been tampered with it’d be something like this:
bcdedit /set testsigning on
or
bcdedit /set {default} testsigning on
You can type bcdedit to list the “installs” its got and grab the id if its not {current} or {default} for some reason.
Now, reboot, and your keyboard should FINALLY work. You can now go through setup if you could not previously, and install usb drivers from there.
5- Fixing USB
Get the usb driver from earlier. It will not work right off the bat without installing the update i provided in the .zip file, so make sure to install the update just like the nvme updates in step 2. This should be something like:
dism /image:D:\ /add-package /packagepath:KB2864202.msu
(assuming D:\ is the root of the drive, it’ll probably be C:\ if booted into windows 7 or for other reasons)
Now, you can just go into device manager and try to update every unknown device with the provided usb driver. The USB driver should install, and usb should immediately start working at this state, allowing mouses, usb drives, networking from usb and so on.
3 devices total should install from experience, however for me one wouldnt start up successfully but it didint matter so just disable the one that doesnt work and leave it alone.
Windows 7 should now basically be working somewhat alright for generic drivers now, and it should just work! You can also now install the realtek ethernet driver, which is basically one of the only drivers that actually supports windows 7 on this hardware, as well as try other drivers like the chipset drivers (do NOT let the PSP driver install thoough, as it’ll brick the install), however you usually won’t have much success.
What you can do is now up to you, like using ethernet or usb to connect to the internet and so on. I still havent managed to fix some things like wifi, power button, sleep/hibernate, trackpad, volume buttons, bluetooth, graphics acceleration, and probably a lot more things i forgot/didint notice because i dont use them. If anyone manages to fix more than i did, especially wifi and gpu, please let me know!
I quickly wrote this and i understand some things may be confusing, so if you’ve got any questions or are confused, feel free to ask and ill also edit this if i can! Thanks!