Installing Windows 7 on the pure UEFI systems without CSM

Discussion in 'Windows 7' started by PrimeExpert Software, Jan 2, 2020.

  1. Hannspree

    Hannspree MDL Novice

    Aug 10, 2016
    7
    0
    0
    Hi everyone, I'm currently having issues with getting Windows 7 to work without CSM on my HP Envy x360 15m-ds0011dx AMD Ryzen laptop. I had successfully installed Windows 7 on the laptop with CSM enabled, then I had tried a method by Youtuber Bob Pony that had worked on all my other Intel computers, but once I had restarted the HP Envy laptop, it hung at the Starting Windows boot screen, but the logo kept on animating rather then freezing all together, and the Windows 7 logon sound played while still stuck on the Starting Windows screen. I also had the same problem with my Ryzen custom built desktop, but it didn't play the startup sound. I just don't know what to do with how to getting Windows 7 to boot without CSM on my HP Envy. Coincidentally, they both have an AMI BIOS, but I thought that had nothing to do with why it doesn't work. I can't do this by myself, but I really want to use the laptop with Windows 7 without CSM. Please help.
     
  2. ExtremelyFancyUsername

    Oct 17, 2018
    128
    28
    10
    Has anyone ever resolved this?
     
  3. PrimeExpert Software

    Dec 3, 2019
    15
    22
    0
    #43 PrimeExpert Software, Feb 16, 2021
    Last edited: Feb 16, 2021
    (OP)
    Since FlashBoot version 3.2x we have fixed limited display resolution problem (it's no longer restricted to 1024x768 and now reflects actual LCD panel resolution as reported in EDID block), added support for GPU hardware which maps framebuffer to physical memory above 4 Gb boundary, and fixed dual boot problems (Windows Update in Windows 10 no longer overwrites FlashBoot's patch for the UEFI loader of Windows 7). Besides that, we have switched to generic USB3 and generic NVMe drivers for Windows 7 which support all hardware from all vendors.

    Remaining problems:

    1. nVidia GPUs don't work on some motherboards lacking support for VGA arbitration (nVidia drivers report "Code 12" error: "This device cannot find enough free resources that it can use. If you want to use this device, you will need to disable one of the other devices on this system."). AMD GPU cards have no such problem, as their drivers don't depend on legacy VGA resources to be assigned to the GPU device.

    You can view which resources (memory and I/O ports) are assigned to PCI-E devices in your system using Linux command "lspci -vv | more". VGA resources are: 0xA0000 0xC0000 memory range, 0x3B0 0x3DF I/O ports range. Unfortunately, during last few years firmware vendors and hardware suppliers started to exclude VGA arbitration support from PCI-E bridges and their initialization code in firmware (because it's no longer required by Windows 10 and modern versions of Linux).

    Unfortunately, PCI-E bridge configuration is very hardware-dependent, there's no standartized protocol for software control of these devices, realistically only BIOS or UEFI firmware can manage them. Linux tries to do some tricks related to this matter in the vfio driver and GPU passthru code in qemu, but in my experience it oftentimes doesn't work, it's easier to find motherboard with functional VGA arbitration rather than trying to reprogram PCI-E bridges after the BIOS.

    2. Certain UEFI firmware (on some the laptops and tablets, never seen on desktops) throws ACPI_BIOS_ERROR (0xA5) BSoD which becomes visible after applying FlashBoot Pro patch for Windows 7 UEFI loader (without FlashBoot's patch for UEFI loader, Windows 7 just halts on "Starting Windows" screen before the logo animation starts, because it's unable to switch to classic VGA 640x480x16 video mode to draw the BSoD). Examples why this BSoD might happen:

    • References to I2C resources in DSDT table. These ones can be removed, but then Windows 7 is unable to query battery status (battery charge level).
    • Duplicate definitions between DSDT and SSDTs. Windows 8+ tolerates that, Windows 7 throws ACPI_BIOS_ERROR BSoD instead. These duplicates usually can be removed without any negative consequences.
    • Zero-length array. Depending on context, it can be either removed or replaced by array consisting from one zero byte. This is something related on nVidia dual graphics card support. Replaced it without any issues at all (all hardware works as expected).
    • Reference to power resource of some yet-undeclared device. Windows 10 tolerates that, Windows 7 throws the same ACPI error BSoD again. Removing the reference fixes the issue completely.

    Sometimes it's possible to resolve such issues by preparing and sideloading modified ACPI tables (UEFI loader for Windows 7, when patched by FlashBoot Pro, loads ACPI override tables from \EFI\Boot\ACPITABL.DAT file on the partition it boots from). Out of 9 users who asked for this, there were 8 cases which were resolved successfuly and one case when the solution wasn't found (Windows 7 with modified ACPI tables hangs on their laptop). We have a special setup for this purpose: checked build of Windows 7 in VMware Workstation with overriden ACPI tables and attached kernel debugger on the host (but actually rarely deal with this kind of thing, it's not very common).
     
  4. ExtremelyFancyUsername

    Oct 17, 2018
    128
    28
    10
    tl;dr: forget about getting Nvidia GPUs working under Win7 on a Crosshair VIII Dark Hero. Or better yet: forget about getting Win7 to work at all on it.

    God damn, guess I'll have to get used to Wins**t 10 then.
     
  5. shhnedo

    shhnedo MDL Expert

    Mar 20, 2011
    1,036
    1,411
    60
    You can very easily get an Edu iso, integrate latest updates + directx9c + vc runtimes, debloat the iso with MSMG toolkit and be on your way. Not to mention you're crippling the platform with windows 7.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. csvw

    csvw MDL Novice

    Aug 4, 2009
    13
    0
    0
    I've seen the A5 blue screen on some brand desktops, e.g. dell optiplex 5060,7060,5070,7070,7080 etc.
     
  7. PrimeExpert Software

    Dec 3, 2019
    15
    22
    0
    This is a clear symptom that Windows 7 builtin VGA driver (VGA.SYS) has switched your GPU card to 640x480x4bpp video mode. With video memory at 0xA0000. There's no hardware support for that anymore, of course.

    Why did it? Probably something went wrong with EDID (there's no intersection between EDID data and table of supported video modes returned by GPU driver). Or only video mode as indicated as supported by EDID is over 1600x1200 (yes, Windows 7 VGA.SYS dislikes when 1024x768 is not available). We at PrimeExpert Software have observed this weird behaviour multiple times and even reproduced in the virtual machine under kernel debugger.

    Anyway, FlashBoot Pro UEFI loader patch for Windows 7 can make VGA.SYS driver to forget about 640x480x4bpp and make it switch to whatever is supported by your GPU.
     
  8. michael pastras

    michael pastras MDL Novice

    Aug 17, 2021
    7
    0
    0
    It is not that it shows the Windows environment but with low resolution..
    It only displays the boot animation while I am logged in (at obviously low resolution)..
    Anyway!
    I want to purchase FlashBoot Pro at this point, but could you tell me exactly what I can do now to fix this problem with FlashBoot Pro, as is, without reinstalling Windows 7?
    Maybe a mini tutorial?
    (I could remove my SSD and connect it externally to another computer to maybe patch this file?)
    Please give me some more detailed info.
    Thanks so, SO much for your response.
     
  9. PrimeExpert Software

    Dec 3, 2019
    15
    22
    0
    VGA.SYS tries to switch your GPU to 640x480x4bpp, but hardware does not respond to that command, because there's no hardware support for this legacy stuff anymore. So, your screen continues to display previous picture (boot logo/flag), and Windows 7 tries to draw your desktop, applications etc over non-existent video memory at 0xA0000 (but these bytes are not converted to visible pixels on your screen).

    You can prepare USB thumbdrive for Windows 7 installation in the UEFI mode with patched UEFI bootloader in FlashBoot Pro, and then just copy patched UEFI bootloader from USB thumbdrive (\EFI\Boot\bootx64.efi, \EFI\Microsoft\Boot\bootmgfw.efi) over your existing Windows 7 UEFI bootloader in the EFI System Partition on the internal SSD of your laptop. To access EFI System Partition, you can run Windows 7 setup from USB thumbdrive, press Shift+F10 and run "mountvol s: /s" command, or use third-party tools (e.g. Linux with some GUI file manager).
     
  10. michael pastras

    michael pastras MDL Novice

    Aug 17, 2021
    7
    0
    0
    Oh!! Okay I see.
    So only files needing to be replaced are bootx64.efi and bootmgfw.efi , right?
    This will also take care of the VGA.sys thing, right? Does this file need to be manually replaced, as well?
     
  11. PrimeExpert Software

    Dec 3, 2019
    15
    22
    0
    VGA.SYS will be patched in memory, by the UEFI loader, on every boot, so you don't need to change this file on disk.
     
  12. morfi717

    morfi717 MDL Novice

    Sep 26, 2016
    11
    1
    0
    #53 morfi717, Aug 17, 2021
    Last edited: Aug 17, 2021
    I'm here just to leave a commendation for Flashboot pro regarding installing Win7 on modern hardware.

    I'm usually kinda skeptical for those kind of software and scammy websites that look similar to 'winrar-pro-ultimate-100%-money-back-guarantee' (sorry for assuming your software belongs to this category! allow me to humble myself before you), but luckily this thread exists and people from primeexpert post genuine stuff here which boosted up my confidence and made me not hesitate so much to purchase a license.
    I couldn't ask for more, as it just worked. I selected the vanilla win7 iso, next> next> next> finished, booted up the install from USB stick on my i7-10900 + Z490 board with M.2 drive and, again, it just worked.

    On top of that, the win7 installer did not forcefully created it's own EFI partition, but actually managed to use an existing one without overwriting anything in there. It just created it's own "Microsoft" directory and remained modular -- just as it should.
    Thanks @PrimeExpert Software for saving so much time I could have wasted on trying to make this work.

    PS:
    I've noticed that while Windows logo animation works fine, if I happen to have chkdsk run before, the text will overlap. It's a minor issue, but just thought I'll share an issue in case it's not "known" yet.
     
  13. michael pastras

    michael pastras MDL Novice

    Aug 17, 2021
    7
    0
    0
    Quick question:
    I bought FlashBoot 3.3i Pro and currently preparing the USB drive..
    How do I tell it to specifically "patch the UEFI Bootloader"?

    So far this is my summary:
    Scenario:
    Prepare Windows Vista/7/8/8.1/10 installer on USB (UEFI mode) with drivers

    Data source:
    ISO image file W:\Operating Systems\Complete Windows Collection\Windows 7\Windows 7 SP1 x64 & Office 2010 Pre-Activated [August 2017].iso

    Driver integration options:
    Add builtin USB 3.x drivers
    Add builtin NVMe drivers
    Add builtin AHCI/RAID drivers

    Target:
    USB storage device: F: 115 GB Patriot Memory
    Filesystem: Auto
    Volume label: WIN10_DRVIN
    Unallocated space at the end of the disk: 0

    Will this config create the bootx64.efi and bootmgfw.efi we were talking about earlier?

    Thanks!
     
  14. michael pastras

    michael pastras MDL Novice

    Aug 17, 2021
    7
    0
    0
    Okay! Used the install.esd file, instead and now I saw the option "Patch Windows 7 UEFI loader for compatibility...."
     
  15. PrimeExpert Software

    Dec 3, 2019
    15
    22
    0
    Yes, that's the right one. UEFI loader patch option wasn't displayed first time because FlashBoot Pro misinterpreted your ISO file as Windows 10 Setup ISO file (it happens sometimes with third party customizations which borrow \sources\boot.wim from Windows 10 and \sources\install.wim from Windows 7). Original ISO files as published by Microsoft always have correct version numbers in boot.wim, so they are fine.
     
  16. michael pastras

    michael pastras MDL Novice

    Aug 17, 2021
    7
    0
    0
    Okay! Congrats on this software for helping out so much
    I did exactly as you told me with the patched files and, indeed, windows loaded in 4K and showed the login screen.
    At this point, I can use my computer, BUT, there is absolutely no display acceleration!
    How can I fix this now?
    It detects the video cards and installs drivers and asked me to reboot, but then, still no display acceleration.
    Also, Computer only displays through the main monitor. Second display is off..
    So, is there anything else I can do to be able to actually use my video cards?
     
  17. ibay770

    ibay770 MDL Novice

    Oct 9, 2015
    4
    0
    0
    Interesting. I'll see if it works on my Surface Pro 2/3
     
  18. morfi717

    morfi717 MDL Novice

    Sep 26, 2016
    11
    1
    0