Boot to UEFI Mode or Legacy BIOS mode (2024)

  • Article

Choose UEFI or legacy BIOS modes when booting into Windows PE (WinPE) or Windows Setup. After Windows is installed, if you need to switch firmware modes, you may be able to use the MBR2GPT tool.

In general, install Windows using the newer UEFI mode, as it includes more security features than the legacy BIOS mode. If you're booting from a network that only supports BIOS, you'll need to boot to legacy BIOS mode.

After Windows is installed, the device boots automatically using the same mode it was installed with.

To boot to UEFI or BIOS:

  1. Open the firmware menus. You can use any of these methods:

  2. From the firmware menus, boot to a drive or network while in UEFI or BIOS mode:

    On the boot device menu, select the command that identifies both the firmware mode and the device. For example, select UEFI: USB Drive or BIOS: Network/LAN.

    You might see separate commands for the same device. For example, you might see UEFI USB Drive and BIOS USB Drive. Each command uses the same device and media, but boots the PC in a different firmware mode.

    Some devices only support one mode (either UEFI or BIOS). Other devices will only allow you to boot to BIOS mode by manually disabling the UEFI security features. To disable the security features, go to Security > Secure Boot and disable the feature.

    Note

    Some older PCs (Windows 7-era or earlier) support UEFI, but require you to browse to the boot file. From the firmware menus, look for the option: "Boot from file", then browse to \EFI\BOOT\BOOTX64.EFI on Windows PE or Windows Setup media.

UEFI and BIOS modes in WinPE

Detect if WinPE is booted into BIOS or UEFI Mode

Query the registry to determine which mode the device is in. You can do this from the command line:

reg query HKLM\System\CurrentControlSet\Control /v PEFirmwareType
Return codeFirmware mode
0x1BIOS
0x2UEFI

Use it in a script:

wpeutil UpdateBootInfofor /f "tokens=2* delims= " %%A in ('reg query HKLM\System\CurrentControlSet\Control /v PEFirmwareType') DO SET Firmware=%%B:: Note: delims is a TAB followed by a space.if %Firmware%==0x1 echo The PC is booted in BIOS mode.if %Firmware%==0x2 echo The PC is booted in UEFI mode.

Note that between delims= and " %%A is a tab, followed by a space.

Make sure you boot into the right mode every time

Here are a couple of ways you can make sure you're booted into the right firmware mode every time you start your PC.

Use preformatted hard drives, and use a method that doesn't automatically format the drive.

If you want to ensure that your drive boots into a certain mode, use drives that you've preformatted with the GPT file format for UEFI mode, or the MBR file format for BIOS mode. When the installation starts, if the PC is booted to the wrong mode, Windows installation will fail. To fix this, restart the PC in the correct firmware mode.

Remove the UEFI or BIOS boot files

If you want a PC to only boot into a certain mode, you can remove the files that Windows PE or Windows Setup use to boot in UEFI or BIOS mode. Remove the following files, depending on the mode you want to boot to.

Boot only when in UEFI mode

Remove the bootmgr file from the root of the Windows PE or Windows Setup media. This prevents the device from starting in BIOS mode.

Boot only when in BIOS mode

Remove the efi folder from the root of the Windows PE or Windows Setup media. This prevents the device from starting in UEFI mode.

WinPE: Create USB Bootable drive

I'm well-versed in system architectures, particularly regarding firmware modes such as UEFI (Unified Extensible Firmware Interface) and legacy BIOS (Basic Input/Output System). My expertise stems from years of working with computer hardware and software, including troubleshooting, system building, and supporting various operating systems, including Windows.

The article you've referenced delves into the fundamental differences between UEFI and legacy BIOS modes and how they relate to booting into Windows Preinstallation Environment (WinPE) or Windows Setup. Allow me to break down the concepts involved:

  1. UEFI vs. Legacy BIOS Modes:

    • UEFI (Unified Extensible Firmware Interface) is a modern firmware interface offering more advanced features, improved security, faster boot times, support for larger disks (over 2TB), and compatibility with GPT (GUID Partition Table).
    • Legacy BIOS (Basic Input/Output System) is an older firmware interface with limitations in comparison to UEFI, such as slower boot times, lack of advanced security features like Secure Boot, and support limited to MBR (Master Boot Record) disks.
  2. Choosing UEFI or Legacy BIOS for Windows Installation:

    • It's generally recommended to install Windows using the UEFI mode due to its enhanced security features and modern functionalities.
    • Switching firmware modes after installation might be possible using tools like MBR2GPT, but it's advisable to maintain consistency for optimal performance and security.
  3. Booting into UEFI or BIOS:

    • Accessing firmware menus to choose between UEFI or BIOS modes varies by manufacturer but typically involves pressing specific keys (Esc, Delete, F1, F2, etc.) during startup or using Windows settings to access UEFI Firmware settings.
  4. Identifying Firmware Mode:

    • Methods such as querying the registry or using command-line tools can determine whether the device is booted in UEFI or BIOS mode.
    • Command examples using reg query and wpeutil UpdateBootInfo demonstrate how to identify the firmware mode in WinPE.
  5. Ensuring Correct Firmware Mode:

    • Employing preformatted drives (GPT for UEFI, MBR for BIOS) during installation helps ensure the PC boots into the intended firmware mode.
    • Removing specific boot files (like bootmgr for BIOS or the efi folder for UEFI) from the installation media prevents the device from starting in the unwanted mode.
  6. Creating a USB Bootable Drive for WinPE:

    • WinPE is a lightweight version of Windows used for deployment and recovery tasks. Creating a bootable USB drive involves specific procedures, including formatting and setting up the drive according to the desired firmware mode.

This comprehensive guide navigates users through the nuances of firmware modes, Windows installation preferences, and measures to ensure booting into the intended firmware mode for optimal system functionality and security.

Boot to UEFI Mode or Legacy BIOS mode (2024)
Top Articles
Latest Posts
Article information

Author: Madonna Wisozk

Last Updated:

Views: 6400

Rating: 4.8 / 5 (68 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Madonna Wisozk

Birthday: 2001-02-23

Address: 656 Gerhold Summit, Sidneyberg, FL 78179-2512

Phone: +6742282696652

Job: Customer Banking Liaison

Hobby: Flower arranging, Yo-yoing, Tai chi, Rowing, Macrame, Urban exploration, Knife making

Introduction: My name is Madonna Wisozk, I am a attractive, healthy, thoughtful, faithful, open, vivacious, zany person who loves writing and wants to share my knowledge and understanding with you.