17

I have a laptop that has Windows 7 64 bit Enterprise edition. It is already filled with plenty of Software and drivers.

The laptop (Dell E6220) supports booting through UEFI, but the insatllition was on legacy BIOS.

When I try to change the booting from Legacy to UEFI I get an error message that no boot device was found (the Windows 7 doesn't recognize as bootable). Is there any way I can configure the current install to allow booting from UEFI or do I have to format and reinstall?

7 Answers 7

2

Windows 7 on UEFI requires that the disk partitions use GUID partition table (GPT) rather than the traditional MBR partitioning format found on BIOS systems. Unfortunately, windows provides no way of converting an MBR partition to a GPT one non-destructively.

However, if you don't mind copying data off your drive, converting, then copying it back then you could use Windows to do it as described in this Microsoft Technet article Change a Master Boot Record Disk into a GUID Partition Table Disk. The article describes two procedures, both of which require making a copy of the data then modifying the disk to use GPT. Using the Windows interface you first delete any volumes on the disk and then convert the disk to a GPT disk using right click on the disk and selecting menu items. Using the command shell with Admin elevation, you use the diskpart utility to delete any volumes and then convert the disk to a GPT disk.

If you don't want to backup the data first and have access to a a Linux machine that you can install the drive in, there are tools in Linux that will allow you to convert the partition type non-destructively as described here. If you don't have a Linux box handy, you can also try creating a Linux boot CD and booting from that.

Searhing for "convert MBR to GPT" brings up other tools, but I have never tried them.

2
  • 2
    Hi zdan; can you expand on your answer by including the relevant information here? It seems very much like a Google search, not an answer, in its current form. Thanks! Sep 15, 2014 at 19:45
  • The first link doesn't work anymore : (
    – lapin
    Oct 28, 2016 at 13:58
10

No, you shouldn't have to format and reinstall, as you can convert your disk to allow UEFI booting via gptgen, an excellent opensource project that non-destructively converts a MBR partition table to GPT.

Microsoft published a good tutorial on this process (unabridged), with the abridged version below taking <10 minutes to do:

  1. Backup anything important by creating a system repair disc or using the Windows install media
  2. Identity the hard disk you want to convert via Windows Disk Manager (usually Disk 0)
  3. Download and unzip gptgen, start a cmd prompt as Admin, and run:
    WARNING: You did back up your data, right - this is the point of no-return
    gptgen.exe -w \\.\physicaldrive0
    
    You may or may not see a blue-screen after you run the above command, either is normal
  4. Boot the Windows install disc or system repair disc, choosing language and preferences, then: Repair Your Computer - Troubleshoot - Advanced options - Command Prompt
  5. Run diskpart, identifying the boot disk containing Windows via list disk:
      Disk ###  Status         Size     Free     Dyn  Gpt
      --------  -------------  -------  -------  ---  ---
    * Disk 0    Online          128 GB      0 B        *
    
  6. Select the disk via select disk <#> and verify via list partition:
    Partition ###  Type              Size     Offset
    -------------  ----------------  -------  -------
    Partition 1    Primary            350 MB  1024 KB
    Partition 2    Primary            126 GB   350 MB
    
  7. Delete previous system partition:
    select partition 1
      delete partition
    
  8. Create the new boot and Microsoft reserved partitions:
    create partition EFI size=100 offset=1
      format quick fs=fat32 label="System"
      assign letter=S
    
    create partition msr size=128 offset=103424
    
  9. Verify via list partition:
    Partition ###  Type              Size     Offset
    -------------  ----------------  -------  -------
    Partition 1    System             100 MB  1024 KB
    Partition 2    Reserved           128 MB   101 MB
    Partition 3    Primary            126 GB   229 MB
    
  10. Ensure the Windows install is mounted, replacing 3 with the Windows installation, then exit:
    list volume
      select volume 3
      assign letter=C
    
    exit
    
  11. Generate boot partition data, replacing C: with the Windows installation, then reboot:
    bcdboot C:\Windows /s S: /f UEFI
    
5
  • @Ramhound, thanks for the feedback. That's a good point...if the original article disappears then my answer is useless. I've updated my answer. Mar 26, 2015 at 21:26
  • 5
    The last instruction is invalid on windows 7 since bcdboot doesn't have the /f flag. I tried removing that but it didn't work.
    – simonzack
    Nov 21, 2015 at 16:14
  • This recipe worked for me as well. I have two comments and a follow-up: (1) after finishing the procedure, and before attempting to boot your new UEFI setup, do NOT forget to go back into BIOS and change the boot method to UEFI!! On my MSI board this took the form of giving disk-as-UEFI higher priority than disk-as-BIOS. If you do not do that, the boot will hang :-) on a dark screen with a cursor that jumps 1-2 lines down. (2) The first time I did assign letter=S it did not surivive exiting diskpart. Not sure why, had to redo. (3) What is the purpose of the MSR partition?
    – reikred
    Jul 16, 2017 at 2:49
  • This worked for win7 home premium but not without hickups. Laptop refused to use recovery disk at step 4. Changing BIOS boot to UEFI solved it. Creating msr partition at step 8 failed due to lack of space. Not creating it appears to be just fine. Copied bcdboot.exe containing /f option from win 10 (version 10?) onto flash drive and used that, worked. Even though BIOS was already set to UEFI it refused to boot, so reconfirming and saving this setting again in BIOS solved it. Sep 19, 2020 at 22:24
  • can we do exactly the same but UEFI to MBR plz ?
    – Matrix
    Jul 24, 2021 at 7:27
4

Convert Windows Installation from Legacy to UEFI:

Please note that this technique will work only for those computer systems which support UEFI firmware. Please check that first in your BIOS settings and then continue with this tutorial.

  • Step 1: Confirm that you installation is indeed in Legacy Mode. Press WinKey + R and then type msinfo32 and hit enter. The BIOS mode should be Legacy in System Summary.

  • Step 2: Download System Rescue Disk and make a bootable media from it. Download the disk from here. See instructions to make bootable media. That is pretty trivial and one can follow this tutorial.

  • Step 3: Reboot into Legacy or UEFI mode using the bootable media that you created in Step2.
  • Step 4: Run the command: testdisk Use the arrow keys to navigate. Select your HDD in which Windows is installed in Legacy Mode and press enter. Select [EFI GPT] EFI GPT Partition Map and press enter. Select Analyze and hit enter. Select Quick Search (at the bottom) and hit enter. Select Continue (at the bottom) and hit enter. Hit enter again. Select Write (at the bottom) and hit enter. Press Y and hit enter. Your partition table has changed from MBR to GPT.
  • Step 5: Reboot into UEFI mode using Windows recovery/installation media.
  • Step 6: Open command prompt. Shortcut is: shift+F10
  • Step 7: Run the following commands:

    1. diskpart
    2. list disk - Note the disk number which contains your windows installation. Let us say, it is x
    3. select disk x
    4. list partition - Note the partition number which contains your windows installation. Let us say, it is y
    5. select partition y
    6. shrink minimum=200 desired=200
    7. create partition efi
    8. list partition - Note the partition number of the new one. Let us say, it is z
    9. select partition z
    10. format fs = fat32
    11. assign letter = b:
    12. exit
    13. mkdir b:\EFI
    14. mkdir b:\EFI\Microsoft
    15. cd /d b:\EFI\Microsoft
    16. bootrec /fixboot
    17. diskpart
    18. list vol
    19. bcdboot c:\windows /l en-us /s b: /f ALL - Please note that here c: denotes the letter of the partition in which windows is installed. Lets find that out first.
  • Step 8: Reboot. Tada! Done! Check whether your installation has changed into UEFI or not.

Ref: How to Convert Windows 7/8/8.1 Installation from Legacy to UEFI Without Data Loss!

Simpler way using gdisk: Convert Windows 7/8/10 Installation from Legacy to UEFI Without Data Loss (Simpler Method)

2
  • One optional step missing from this: I was switching a system which already had a 100-ish MB "system" partition it was using for MBR boot. I needed to remove that partition before the new EFI partition would work.
    – dannysauer
    Aug 2, 2019 at 13:21
  • Oh, I also had to create a UEFI recovery disk. The windows 7 CD doesn't want to come up in UEFI mode, so I used rufus.ie to create the bootable UEFI USB disk. I'm not entirely sure if that was absolutely necessary, it seems to usually work better whatever the OS if you're in an UEFI-booted environment when you try to fix UEFI problems. :)
    – dannysauer
    Aug 2, 2019 at 13:29
0

A quick addendum to nathanbedford's answer:

As simonzack said, Windows 7's bcdboot doesn't support the /f flag.  I didn't have any problems; just had to run bootrec /rebuildbcd immediately after running Nathan's commands and it worked a treat.

The second, 128 MB partition is not necessary.  I had no room, and just ignored it.  Everything's working fine so far.

1
  • I copied bcdboot from win 10 to a flash drive and it worked a treat Sep 19, 2020 at 22:26
0

I did what @nathanbedford said, however Windows 7 bcdboot doesn't accept /f flag so in order to finish the last step

bcdboot c:\windows /s s: /f UEFI

you need to use a newer version of bcd, that's >=win8.

Two different ways to do this are, either copying a newer bcdboot.exe into an readable drive so you can access it from cmd (that's how I did it), or running a newer Windows system repair disk.

2
  • Why is it downvoted? (a comment would be useful to point if it is working or not).
    – Basj
    Jun 24, 2020 at 9:49
  • For me this worked, using bcdboot from win10 worked to recreate a boot system for win7. I was even able to do everything from HDD2 (win 10), and without any Recovery/Win7 Install disk /USB flasHdrive.
    – Basj
    Jun 24, 2020 at 13:23
0

Let's say the Windows 7 install that we want to process is on HDD1.

I have been able to do it with @nathanbedford's method with a few modifications:

  • no use at all of a system repair disc / original Windows installation media

  • boot on a secondary Windows 10 install (e.g. on HDD2)

  • similar use of gptgen.exe -w \\.\physicaldrive0 from a cmd.exe run in administrator mode (it did not work from Powershell in my test, but it worked from cmd.exe admin)

  • the rest is nearly identical, except Step 13 for which the second reserved partition create partition msr size=128 ... was not needed for me

  • since I booted on HDD2 (Win 10), HDD1's C:\ is now called D:\, and I had to modify it like this:

    bcdboot d:\windows /s s: /f UEFI
    

    (thus using Win10's bcdboot; I thought it would fail because it would create a Win10 boot system, but in fact it worked, see also @xkazuko's answer here)

  • reboot on HDD1, Windows 7 is now in UEFI mode

PS: after all these steps there will probably be two entries named "Windows Boot Manager" in bcdedit /enum firmware. Then you can do:

bcdedit /set {bootmgr} description "Windows 7"
bcdedit /set {...} description "Windows 10"  (or even /delete if the other entry is not needed)
-1

An easy method is using a third-party product in the following two steps:

  1. Convert the disk from MBR to GPT without lose of data
  2. Set the BIOS boot from legacy to UEFI.

The can be done in this way:

  • Download the AOMEI Partition Assistant Professional Edition Demo and run it

  • Right-click on the system disk and select "Convert to GPT Disk"

    enter image description here

  • Click "Apply" to apply the change

  • During the process, the computer will reboot into AOMEI Pre-OS mode.

  • When it completes, go into the BIOS and switch the boot mode from Legacy to UEFI mode.

I suggest taking a complete image backup of the disk before starting, where the free AOMEI Backupper Freeware can again be useful.

For more information see the article How to Change Legacy to UEFI in Windows 10/8/7.

2
  • The AOMEI Partition Assistant only converts a disk partitioning system from MBR to GPT. Making any existing MBR-based Windows installation on it unbootable ! It does not solve conversion of existing Windows installation to UEFI booting. What you are proposing there is dangerous and not what OP asked for.
    – Riva
    Sep 15, 2021 at 22:45
  • @Riva: That's absolutely not true.
    – harrymc
    Sep 16, 2021 at 8:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .