Git Product home page Git Product logo

uefiseven's Introduction

UefiSeven

Summary

UefiSeven is an efi module that enables Windows 7 to boot under UEFI Class 3 systems.

Windows 7 does not fully support UEFI and relies on legacy BIOS interrupt 10 (Int10h) during initial graphics initialization. On computers without proper legacy support Windows 7 might freeze on 'Starting Windows' screen or fail with error code 0xc000000d. Some motherboards have 'CSM' or 'legacy' boot options to fix this problem but it is getting increasingly rare as Intel decided to get rid of legacy BIOS support by 2020, and the option is virtually non-existent on consumer mobile devices. UefiSeven installs a minimal Int10h handler in the memory before Windows boots up so that the boot process do not fail because of the missing interrupt.

UefiSeven also contains a hack to enable screen output on hardwares that do not natively support 1024x768 as is needed by Windows Installer. Int10h handler comes with a macro, when enabled before compiling, that will enable serial console output which can be used to debug the handler itself.

Usage instructions

  1. Prepare Windows 7 installation USB Drive
  2. Rename bootx64.efi at (UsbDrive)\EFI\Boot\ to bootx64.original.efi
  3. Unpack bootx64.efi from UefiSeven archive and copy it to (UsbDrive)\EFI\Boot\
  4. Finish initial installation and wait for reboot prompt
  5. Power off computer
  6. Rename bootmgfw.efi at (HDD)\EFI\Microsoft\Boot\ to bootmgfw.original.efi
  7. Copy UefiSeven bootx64.efi to (HDD)\EFI\Microsoft\Boot\bootmgfw.efi using EFI shell

Settings

Settings can be applied by placing UefiSeven.ini file in the directory containing the main efi file. Refer to the sample configuration file for available options.

Build instructions

git clone https://git.mananet.net/manatails/uefiseven
(Copy or symlink UefiSevenPkg and IntelFrameworkPkg to the edk2 directory)
source ./edksetup.sh
make -C BaseTools/
./MdeModulePkg/Application/UefiSeven/Int10hHandler.sh ; Regenerate Int10h assembly. Optional
build -a X64 -t GCC49 -b RELEASE -p UefiSevenPkg/UefiSevenPkg.dsc --conf=UefiSevenPkg/Conf

Credits

  • Original VgaShim project
  • OVMF project
  • EDK II project

uefiseven's People

Contributors

ajfish avatar anthonyper-ctx avatar dandanbi avatar darylm503 avatar ftian1 avatar gdong1 avatar hesschen avatar hhtian avatar hliebel avatar hwu25 avatar jcarsey avatar jiaxinwu avatar jljusten avatar jljusten2 avatar jyao1 avatar lersek avatar lgao4 avatar lhauch avatar lushifei avatar lzeng14 avatar manatails avatar mdkinney avatar niruiyu avatar oliviermartin avatar ronald-cron-arm avatar sfu5 avatar sun-rui avatar vanjeff avatar ydong10 avatar zhangchaointel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uefiseven's Issues

Live Windows 7 system

Greetings,

can uefiseven be installed on a live (pre-installed) system ?

best regards

uefı seven: Unable to unlock VGA ROM memory at C0000

hello, i am using asus x509da laptop. İ am trying to install win7 on my computer, and my bios is completely uefı class3. So i tryed uefı seven, but it giving this error and it cant do its job. How i can fix this issue? İf someone fixed this issue, please help because i want to install windows7 and test on this hardware. My laptop specifications: AMD ryzen 3 3250u radeon graphichs 2.6 ghz max 3.5ghz, ddr4 2400mhz ram, 256 gb ssd, amd radeon vega3 graphich card. Thanks again. UefiMain: UefiSeven 1.30
InitializeDisplay: Found a GOP display adapter
SwitchVideoMode: Set mode 2 with desired 1024x768 resolution.
PrintVideoInfo: Current mode:
PrintVideoInfo: HorizontalResolution = 1024
PrintVideoInfo: VerticalResolution = 768
PrintVideoInfo: PixelFormat = 1
PrintVideoInfo: PixelsPerScanLine = 1024
PrintVideoInfo: FrameBufferBase = E0000000
PrintVideoInfo: FrameBufferSize = 3145728
PrintVideoInfo: Available modes (MaxMode = 4):
PrintVideoInfo: Mode0: 1366x768
PrintVideoInfo: Mode1: 800x600
PrintVideoInfo: Mode2: 1024x768
PrintVideoInfo: Mode3: 640x480
IsInt10hHandlerDefined: Int10h IVT entry points at location (0000:0000) outside VGA ROM memory area (C0000..D0000), rejecting handler
EnsureMemoryLock: Failure unlocking memory at C0000 with MTRRs
EnsureMemoryLock: Unable to find a way to unlock memory at C0000
UefiMain: Unable to unlock VGA ROM memory at C0000, aborting
FileExists: Opened file '\EFI\MICROSOFT\BOOT\BOOTMGFW.original.efi' for reading
UefiMain: Found Windows Boot Manager at '\EFI\MICROSOFT\BOOT\BOOTMGFW.original.efi'
Launch: Loaded 'PciRoot(0x0)/Pci(0x1,0x3)/Pci(0x0,0x0)/NVMe(0x1,63-9A-58-49-8B-44-1B-00)/HD(1,GPT,86FDF8B7-1BAD-4D34-9B07-8E651DA14281,0x800,0x32000)/\EFI\MICROSOFT\BOOT\BOOTMGFW.original.efi'
Launch: Addresss behind FileImageHandle=B9BF4B18
CheckBootMgrGuid: Found 9DEA862C-5CDD-4E70-ACC1-F32B344D4795
Launch: File matches an EFI loader signature

Freeze at boot logo despite using UEFISeven

My specs: Acer Aspire F5-571 34Z0 - i3 5005U - 4GB - Intel HD 5500.
I disabled Secure Boot but it's not booting, keep freezing at boot logo. Is there any workaround for this?

Does This Support Default VGA Driver?

Hello,

Would this hack still allow the system to work with a VGA driver? My friend's GPU has no driver for Windows 7, but the VGA driver should work fine for sometime. The laptop is an UEFI class 3 system, so no CSM/Legacy.

unable to boot Windows 7 on MacBookPro6,2

Initially I've installed windows 7 sp1 via dism as I couldn't boot the normal installer. Then I couldn't boot the installed Windows in (U)EFI mode of course, so I added hybrid MBR to the disk, booted in legacy mode and performed initial OS configuration as well as Bootcamp drivers installation.

Now tried this project to boot in (U)EFI mode properly. I've deleted the hybrid MBR using gdisk and ran bcdboot from Windows 10 to generate boot files. From UEFISeven's output it seems that all went well, however booting fails:

  • normal boot: just see black screen, then machine reboots
  • safe mode: reboot happens after I see message about loading CLASSPNP.sys

I saw identical behavior when trying to boot without this project.

Output:

UefiMain: UefiSeven 1.30
UefiMain: You are running in verbose mode, press Enter to continue
InitializeDisplay: Found a GOP display adapter
SwitchVideoMode: Resolution 1024x768 not supported.
PrintVideoInfo: Current mode:
PrintVideoInfo:   HorizontalResolution = 1440
PrintVideoInfo:   VerticalResolution = 900
PrintVideoInfo:   PixelFormat = 1
PrintVideoInfo:   PixelsPerScanLine = 2048
PrintVideoInfo:   FrameBufferBase = C0000000
PrintVideoInfo:   FrameBufferSize = 7372800
PrintVideoInfo: Available modes (MaxMode = 1):
PrintVideoInfo:   Mode0: 1440x900
UefiMain: Current display does not seem to support changing to 1024x768 resolution
UefiMain: which is the minimum requirement of Windows 7.
UefiMain: It is likely that Windows might fail to boot even with the handler installed.
UefiMain: Press Enter to try a new 'hack' that will force the display driver to work.
UefiMain: The display might be glitchy but it will be able to provide a workable screen.
IsInt10hHandlerDefined: Int10h IVT entry points at location (0000:0000) outside VGA ROM memory area (C0000..D0000), rejecting handler
EnsureMemoryLock: Success unlocking memory at C0000 with EfiLegacyRegionProtocol
UefiMain: VESA information filled in, Int10h handler address=C0200 (C000:0200)
EnsureMemoryLock: Success locking memory at C0000 with EfiLegacyRegionProtocol
UefiMain: Int10h IVT entry modified to point at C000:0200
IsInt10hHandlerDefined: Int10h IVT entry points at location within VGA ROM memory area (C000:0200)
IsInt10hHandlerDefined: First Int10h handler instruction at C000:0200 (3D) valid, accepting handler
UefiMain: Pre-boot Int10h sanity check success
FileExists: Opened file '\EFI\Microsoft\Boot\bootmgfw.original.efi' for reading
UefiMain: Found Windows Boot Manager at '\EFI\Microsoft\Boot\bootmgfw.original.efi'
Launch: Loaded 'PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0x0,0x0)/HD(1,GPT,5AC2CD0B-C869-4F81-B91B-27C3B1725F62,0x28,0x64000)/\EFI\Microsoft\Boot\bootmgfw.original.efi'
Launch: Addresss behind FileImageHandle=A7F68898
CheckBootMgrGuid: Found 9DEA862C-5CDD-4E70-ACC1-F32B344D4795
Launch: File matches an EFI loader signature
WaitForEnter: Press Enter to continue

I've tried 2 ways of booting: with iGPU (Intel i5 Arrandale) and dGPU (Nvidia GT330M), windows 8.1 and 10 boot fine with either. Also prior to booting tried mm commands in the EFI Shell to set dGPU to bus master, activate VGA on the PCI bridge and disable iGPU completely (this procedure helps using dGPU properly in Windows 10 UEFI mode), but no luck either.

Then also by accident I've renamed bootmgfw.original.efi to something else which failed to attempt booting windows of course, but after renaming it back and second attempt the program's output was a bit different, although the result didn't change, not sure if it matters though.

UefiMain: UefiSeven 1.30
UefiMain: You are running in verbose mode, press Enter to continue
InitializeDisplay: Found a GOP display adapter
SwitchVideoMode: Resolution 1024x768 not supported.
PrintVideoInfo: Current mode:
PrintVideoInfo:   HorizontalResolution = 1024
PrintVideoInfo:   VerticalResolution = 768
PrintVideoInfo:   PixelFormat = 1
PrintVideoInfo:   PixelsPerScanLine = 2048
PrintVideoInfo:   FrameBufferBase = C0030000
PrintVideoInfo:   FrameBufferSize = 6291456
PrintVideoInfo: Available modes (MaxMode = 1):
PrintVideoInfo:   Mode0: 1440x900
IsInt10hHandlerDefined: Int10h IVT entry points at location within VGA ROM memory area (C000:0200)
IsInt10hHandlerDefined: First Int10h handler instruction at C000:0200 (3D) valid, accepting handler
UefiMain: Int10h already has a handler, no further action required
FileExists: Opened file '\EFI\Microsoft\Boot\bootmgfw.original.efi' for reading
UefiMain: Found Windows Boot Manager at '\EFI\Microsoft\Boot\bootmgfw.original.efi'
Launch: Loaded 'PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0x0,0x0)/HD(1,GPT,5AC2CD0B-C869-4F81-B91B-27C3B1725F62,0x28,0x64000)/\EFI\Microsoft\Boot\bootmgfw.original.efi'
Launch: Addresss behind FileImageHandle=A77FC498
CheckBootMgrGuid: Found 9DEA862C-5CDD-4E70-ACC1-F32B344D4795
Launch: File matches an EFI loader signature
WaitForEnter: Press Enter to continue

I've also tried the original VgaShim from https://github.com/driver1998/VgaShim but it didn't help either.

Any idea what else to try?

P.S. My MBP has EFI version 1.10.

Unable to install ANY gpu driver

I would assume this is because it uses its own driver, but I wanna bypass this and make my new driver override. I'm assuming my code 12 issue is this, because I tried lowering VRam, highering it, etc.

Or if there's a different patch that does this. Already tried the 2022 september update to no avail.
I also have an issue where I have to manually boot off a thing with a different bootx64, since this thing is buggy.

I'm gonna replace the boot.wim in Windows to the modified ISO one.
Fix this thing please.

How to have uefi7 when dualbooting with Windows 10?

So I used UEFI7 for the USB Windows 7 intaller, and it boots, however it hangs at Starting Windows on my XPS 15 7590 after the initial installation, and the only EFI partition on disk is the Windows 10, so Im wondering how do I get UEFI7 to work on a dualboot solution?

Windows 7 hanging at logo forming

Anyone know how to fix this? My pc specs are
Processor 11th Gen Intel(R) Core(TM) i3-1115G4 @ 3.00GHz 2.19 GHz
Installed RAM 8.00 GB (7.73 GB usable)
System type 64-bit operating system, x64-based processor
Dell Insprion 5050

It stucks at Starting Windows without even a Logo

I did everything like in the instructions but when i try to install windows i get stuck at Starting Windows and like i said the Windows 7 logo doesn't even show up. Tried another USB stick and ISO but it didn't worked.

WhatsApp Image 2021-03-25 at 18 36 34 (1)

WhatsApp Image 2021-03-25 at 18 35 45

Compilation failed

GenFvInternalLib.c:24:10: fatal error: uuid/uuid.h: No such file or directory
24 | #include <uuid/uuid.h>
| ^~~~~~~~~~~~~

the video card driver does not start

Windows installation was successful. the video card driver does not start (error 43), there are graphic artifacts and win7 did not detect the battery. are there any ways to solve these problems?
WCwSGx6mOnw
-aAo-mf0gB0

IMG_20210529_112010

Setup only gets to 'Windows is loading files' but bootloops after it's done

The log or verbose don't seem to show anything.
I have enabled fakevesa but it didn't do much.
If I try to install Windows through Windows 11 it freezes on the 'Starting Windows' screen.
My laptop is an Acer Nitro AN515-42 with a Ryzen 5 2500U and RX 560/Vega 8 Graphics.
Is there any reason for this bug happening?

Display1_DownScalingSupported

in case you are one of the very few lucky ones that UefiSeven does work for you, but you can't find a graphics driver, you are then stuck with a 1024x768 resolution which now-days is non-functional

you may want to give a try to Display1_DownScalingSupported (have not tried it myself)

0

0

Add gop resolution to ini file

Hi. Your binary is working perfectly if you have a native graphic driver for seven.
More and more computers comes now without a driver for it, a substitute will be a "wrapper" like vbemp (I use it for XP 64 and works perfectly with Uefiseven).
For that usage, gop resolution need to be changed from native 1024 (can't be used for browsing today) and winload.efi to be modified to desired gop resolution (not the question here).
Is it possible to add a section "gop resolution" in ini file and modify the code to read it at execution ?

any success stories with UefiSeven ?

has anyone been able to use UefiSeven & install a working graphics driver (other than the default system VGA) & been able to use resolutions higher than 1024x768 ?
uefiseven_vga_monitor

stuck at "starting windows" after the initial reboot

Hello, my device is surface pro 4(GPU intel HD520) and the bios supports neither CSM nor Legacy Boot Mode. Before installation, I injected drivers(intel graphics, ssd controller, xhci...) into the pure image and made sure the Secure Boot is off. Instead of the first reboot, I followed all your instructions step by step on WinPE. And here is what happened when I reboot. Then the installation process stuck at "starting windows". After a few seconds, it automatically reboot and then repeated what I mentioned above.
uefi

Infinity load error

After completing all the steps, I just got an endless boot with the motherboard logo.

You must fix your tool.

chkdsk

Can u fix chkdsk? i formated so many times because this and other users can do this

Windows wont boot

Windows 7 gets stuck on installer saying starting windows but the windows logo is formed
The log says its fine

"Unable to unlock VGA ROM memory at C0000" error upon booting installation media & installed Windows 7 OS

I am using a Dell G3 3500, and have done the procedure of Steps 2 & 3 (for the installation media) and Steps 7 & 8 (for a transported Windows 7 installation from another computer). The installation media freezes at the Starting Windows screen, and the installed OS briefly freezes with a red line on top but restarts the computer.
This error message appears before the boot screen (F8 variant - the one that disappears quickly omits the last two paragraphs):

Unable to find a way to unlock memory at C0000. Proceeding without unlocking...
Unable to unlock VGA ROM memory at C0000, aborting
F8 keypress detected, switching to text mode
Press Enter to continue and then immediately press F8 again

iirc this error also occurred in QEMU.
I looked in the previous Issues articles and some others appear to be having the same problem with different models.

Can't Install windows 7 in uefi class 3

Ok I tried uefiseven and did everything step by step but still Im getting stuck at windows flag boot animation tried every versions of uefiseven but no luck . It is a Asus vivobook x412da with ryzen 5 3500u and Radeon vega 8 integrated graphics it is pure uefi no CSM .please help me boot windows 7 in my lapp . I love windows 7/Vista ui

I think this project is deserted

Something to do with INT10 and then it hangs

I have been trying all morning to get the windows 7 installer to boot on my laptop, and it never booted, this is what i saw in verbose mode after it hung:

20210808_114127

EDIT: I saw that there was a fakevesa option, so I tried it. It still hung.

20210808_115610

Can't boot Windows 7 SP1 x64 without CSM

I've replaced the boot file in the EFI on an installed version of Windows 7. Once upon booting I was able to hear the startup sound but it remained on the start up animation. Most of the time it just sticks on the start up animation. However when pressing F8 to try Safe Mode I was greeted with this message about the VGA ROM.

IMG_1627

I'm using a MSI MPG X570 Gaming Plus and a Ryzen 5 3600. System boots without issue when CSM is enabled but other systems wont.

point 7 of procedure

Shall I rename the bootx64 from win 7 archive or copy it straight?
And what is EFI shell?
Sorry, I am really confused by English language strange precision...

7.Copy UefiSeven bootx64.efi to (HDD)\EFI\Microsoft\Boot\bootmgfw.efi using EFI shell

Error during initial build

Hello,

On the 4th step of build instructions, "make -C BaseTools/" it gave out below error:

In file included from ../Include/Common/UefiBaseTypes.h:19,
from BasePeCoff.c:17:
../Include/Common/BaseTypes.h:23:10: fatal error: ProcessorBind.h: No such file or directory
23 | #include <ProcessorBind.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.

logfile=1 not working

Greetings,

I am trying to port an existing win7 system to a new J4125 UEFI only hardware. I have tested in the past this hardware with a different win7 system with success.

on this specific system though, with latest simplix installed & updated, I get no video output. system is working though and pressing power-off, shuts down properly.

Edit: the above issue was due to (apparently) problematic Copy UefiSeven bootx64.efi to (HDD)\EFI\Microsoft\Boot\bootmgfw.efi & has now been resolved. the issue with the missing UefiSeven.log bellow, remains.

besides that, the problem that I would like to report is that the logfile=1 option is not working. It does not create the UefiSeven.log file. Other options, such as verbose or skiperrors do work.

regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.