Windows Legacy to UEFI

BIOS[Legacy] and UEFI are two firmware interfaces for computers which work as an interpreter between the operating system and the computer firmware. Both of these interfaces are used at the startup of the computer to initialize the hardware components and start the operating system which is stored on the hard drive.

BIOS works by reading the first sector of the hard drive which has the next device’s address to initialize or code to execute. BIOS also selects the boot device that needs to be initialized for starting the operating system. Since BIOS has been in use since the very beginning, it still works in 16-bit mode, limiting the amount of code that can be read and executed from the firmware ROM.

UEFI does the same task a little differently. It stores all the information about initialization and startup in an .efi file instead of the firmware. This file is stored on the hard drive inside a special partition called EFI System Partition (ESP). The ESP partition will also contain the boot loader programs for the Operating System installed on the computer.

UEFI is meant to completely replace BIOS in the future and bring in many new features and enhancements that can’t be implemented through BIOS.

Some of the Advantages of UEFI include:

  • Improved boot time.
  • Enhanced Security
  • Supports large storage Devices.

As of 2016, windows PCs are shipped only in UEFI mode. But if you are a person like me who tries different operating systems, or installs windows by your own, chances are, your windows installation is running in Legacy Mode.

If you are running windows in Legacy and would like to switch to UEFI without loosing data, follow these steps.

  1. Make sure your system supports UEFI. (Almost all boards post 2010 supports UEFI)
  2. To Check the type of your windows installation, Go to System Information you can find it there.
  3. Download gpt-fdisk (gdisk) for Windows. (We need this to make a EFI partition).
  4. Extract the files to a drive (You will access it via command prompt later) .
  5. Use a Windows Boot USB/ DISK (Any version of windows will do)  to boot and while in the installation menu, press shift+F10 to access command prompt or navigate to it
  6. while in the command prompt, Go to diskpart and find out the disk identifier for your Windows installation.
    list disk
    sel disk X
    list par
  7.  Navigate to the location where gdisk binary is kept and type:
    gdisk -l X:
    (Replace X with the disk number)
    This will list out the partitions available in the disk. Make sure this is the one your want to convert.
  8.  Now, convert the partition table from MBR to GPT.
    gdisk X:
    Type w to write changes. Press Y whenever prompted.
  9.  Type the following commands:
    sel disk X (Replace X with the disk number)
    list par
  10. # Now we make some space for our EFI partition
    # Note the partition number of the partition which you want to shrink
    sel par X (Replace X with the partition number)
  11. # You may delete the System Reserved partition and replace it with the EFI partition. To do that, type:
    # sel par X (Replace X with the System Reserved Partition)
    # del par override
  12. # The shrink command is not required if you do the above two commands.
    shrink desired = 200 minimum = 200
  13. # The following commands are common:
    create par efi
    format fs = fat32 quick # Format this with fat32 file system
    assign letter = Z:
  14.  Copying boot files.
    Find out the partition in which Windows is installed. Note, the partition letter here might be different than the partition letter you see in Windows. Perform dir X: on each partition letter you think can have the Windows installation and confirm X. Then type:
    bcdboot X:\Windows /l en-us /s Z: /f ALL
  15.  Done. Now reboot in UEFI mode.

Leave a reply:

Your email address will not be published.

Site Footer