0

I want to format my Computer that currently have this partition

  • Disk 0 Partition 1 // Formatted
  • Disk 0 Partition 2 // Formatted
  • Disk 1 Partition 1 // Formatted
  • Disk 1 Partition 2
  • Disk 1 Partition 3

but after I format the partition and try to install the Windows, I got a warning like this

Windows cannot be installed to this disk. The selected disk has an MBR partition table. On EFI systems, Windows can only be installed to GPT disks.

What should I do to install the Windows again? If it's possible, without having to format or delete the other 2 partition that's not formatted yet

I'm using 1 HDD and 1 SSD

Kimino Shii
  • 101
  • 1
  • 1
  • If you use some third-party tool, you should be able to convert MBR to GPT without losing partitions. – Daniel B Feb 06 '15 at 07:19
  • @DanielB what third-party tool can I use? I've already formated my windows – Kimino Shii Feb 06 '15 at 07:24
  • Can people that explains this also explain what the hell is MBR and EFI and what's the problem? How to change from MBR to GPT? Reformat? – user4951 Feb 06 '15 at 08:20
  • possible duplicate of [Windows detects GPT disk as MBR in EFI boot](http://superuser.com/questions/508026/windows-detects-gpt-disk-as-mbr-in-efi-boot) – JdeBP Feb 06 '15 at 10:34
  • 1
    One question per question, Jim Thio. And your questions (and indeed the original question here) have already been asked and answered on this very WWW site, long since. See http://superuser.com/questions/540740/ for starters; then http://superuser.com/questions/803984/, http://superuser.com/questions/297776/, and many others. – JdeBP Feb 06 '15 at 10:35

2 Answers2

1

Please read this answer completely before doing anything!

Converting without data loss is possible. For the theory, read this. To do this, you need gdisk, AKA GPT fdisk. It’s contained on the GParted LiveCD, so I’ll go with that.

After booting you’ll end up with a screen somewhat like this: GPT after boot

In this image, I have already identified the hard disk I want to modify: /dev/sdb. The panel on the left (accessible via View → Device Information) shows I have a “msdos” partition table (AKA MBR). Remember the device name (/dev/sdb in my case), because we’ll need it. Close GParted.

Now, open a Terminal and type the following command, replacing /dev/sdb with the disk you want to modify:

sudo gdisk /dev/sdb

gdisk will explain in a complain-ish message that it didn’t find a valid GPT and converted the existing MBR table to GPT:

Gdisk

In my screenshot, I already executed the p (print) command, which shows the disk layout gdisk would write. Double-check that everything looks okay! This is very important. If anything looks wrong, immediately quit with q (quit)! Otherwise, you might destroy data.

If you find everything to be acceptable, type w (write) and confirm with y.

Congratulations, you have now converted MBR to GPT while keeping all partitions.

However, your work is not done. To be able to boot, you’ll need an EFI System Partition. This is a special FAT32 partition that holds boot information. Its recommended size is 200 MiB.

If you don’t have that much space, you’ll have to shrink one of the partitions.

Once again start GParted. On the correct disk, select some unallocated space of enough size and create a FAT32 partition. Apply these changes.

New FAT32 partition

Now, right-click on the FAT32 partition, select “Manage Flags”. Select “esp”, this will also automatically select “boot”. This change takes effect immediately.

After that, start your Windows Setup (in UEFI mode, naturally), and you’ll be able to go through with the installation.

“Upgrading” to UEFI

Follow the steps above, then continue with this answer. You’ll need an installation medium for this.

Since the steps are slightly different, here’s the gist of it:

Fire up Windows Setup, press ShiftF10 to get a command prompt.

Assign a drive letter in diskpart:

DISKPART> list volume

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     C   System       NTFS   Partition    119 GB  Healthy    Boot
  Volume 1                      FAT32  Partition    100 MB  Healthy    System   <-- EFI System Partition

DISKPART> select volume 1
...
DISKPART> assign letter=b:
...
DISKPART> exit

Restore boot info, bootrec may or may not be necessary:

b:
bootrec /fixboot
bcdboot c:\Windows /l en-US /s b: /f ALL

And you’re done. Simply abort setup (don’t press the PC’s Reset button, it’s bad for data integrity) and it’ll boot with UEFI.

Daniel B
  • 60,360
  • 9
  • 122
  • 163
  • If its not to much trouble can you explain how to already have Windows installed, fix the EFI partition, and without data loss? You already done half the work done :-) – Ramhound Feb 06 '15 at 11:49
  • @Ramhound I don’t quite get what you mean. Are you referring to converting a BIOS-boot installation to an UEFI-boot installation? That *might* be impossible. – Daniel B Feb 06 '15 at 13:27
  • I am indeed saying documenting converting a MBR-partition Windows installation to GPT partition. It should be possible I have see other people document how ( just not on this website ). Windows has a tool that fixes the EFI partition. If its possible to switch the partition type from MBR to GPT without data loss the only concern is "fixing" the firmware. – Ramhound Feb 06 '15 at 14:10
0

Since you want to keep everything intact, the best choice is to switch from UEFI to BIOS-compatibility mode.
When your computer starts, enter UEFI interface and (press del, F2, F9, F12, or what key is assigned) enter the firmware / boot menus.
Check the options in the firmware menus to enable or disable BIOS-compatibility mode.
To use BIOS-compatibility mode, check for options in the firmware menus to disable UEFI SecureBoot features.

After you successfully switch to BIOS mode, your installation will work.

Overmind
  • 9,924
  • 4
  • 25
  • 38
  • note , I have never had to disable secure boot (specifically) to use CSM (compatability support module) to get MBR booting. http://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface#CSM so depending on the UEFI that may not be nessisary to do. – Psycogeek Feb 06 '15 at 08:26
  • The UEFI menu versions vary quite significantly from system to system. From what I encountered secured boot is homehow related to MBR compatibility. Secure Boot contains a set of signatures, and refuses to run any EFI executable which is not signed with one of those signatures. Why does that correctly applies to GPT and not MBR is a separate issue. The 'features' are actually limitations which caused great debates specially among linux community. – Overmind Feb 06 '15 at 08:35
  • @Psycogeek: “Secure Boot is supported for UEFI Class 2 and Class 3 PCs. **For UEFI Class 2 PCs, when Secure Boot is enabled, the compatibility support module (CSM) must be disabled** so that the PC can only boot authorized, UEFI-based operating systems.” – Daniel B Feb 06 '15 at 08:58
  • so by that, wouldn't the reverse also be true? if you have the CSM turned on then the new secure boot addition would not be used? – Psycogeek Feb 06 '15 at 09:08
  • In practice I found that to be true. I do not know if exceptions are at least theoretically possible. Since MBR is not compatible with something like that, probably there are no exceptions. – Overmind Feb 06 '15 at 09:10
  • @Psycogeek The only implication is that if Secure Boot is enabled, CSM is disabled. It doesn’t work the other way around. Usually, the firmware setup simply hides the CSM option while Secure Boot is enabled. – Daniel B Feb 06 '15 at 09:47
  • I am so confused. The question makes no mention of wanting to keep data. The drivers have already been formatted. Why is he switching to MBR mode instead of booting to a EFI disk and using GPT? This seems to answer a question just doesn't seem to be answering the question that was asked. – Ramhound Feb 06 '15 at 11:46