Monday, January 27, 2014

UEFI and GUID Partition Table de94bba4

Relax, for whilst this is a tale of the lost weekend there is a happy ending!  A lost weekend because I had about 4 hours sleep in the last 40 due to continued disk partition issues with my new PC virtualisation platform ...

In the 1980's the Industry used the standard MBR (Master Boot Record) way of partitioning a Hard Disk.  This gave upto 4 partitions, which (in the old days) could be used to store 4 different Operating Systems.

But the 32bit addressing allows for a maximum of 2TB disk addressability  (without tricks)

GPT i.e GUID Partition Table uses 64 bit addresses and also removes the 4 partition limitation.  64bits leads to single disk limits of about 8589 TB.  Now the biggest disk is currently 6TB so (famous last words) but this limit ought to be enough for anybody

How does it GPT Look

First I would read this helpful Microsoft Layout article

Configure UEFI/GPT-Based Hard Drive Partitions

Using diskpart I can show you the partition type and Attribute settings.  They are confirmed in the Wikipedia Reference for GPT which is a great read.

DISKPART> select disk 3

Disk 3 is now the selected disk.

DISKPART> list part

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Recovery           300 MB  1024 KB
  Partition 2    System             100 MB   301 MB
  Partition 3    Reserved           128 MB   401 MB
  Partition 4    Primary            106 GB   529 MB
  Partition 1 is now the selected partition.

DISKPART> detail part

Partition 1
Type    : de94bba4-06d1-4d40-a16a-bfd50179d6ac
Hidden  : Yes
Required: Yes
Attrib  : 0X8000000000000001
Offset in Bytes: 1048576

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
* Volume 3         Recovery     NTFS   Partition    300 MB  Healthy    Hidden

DISKPART> select part 2

Partition 2 is now the selected partition.

DISKPART> detail part

Partition 2
Type    : c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Hidden  : Yes
Required: No
Attrib  : 0X8000000000000000
Offset in Bytes: 315621376

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
* Volume 4                      FAT32  Partition    100 MB  Healthy    System

DISKPART> select part 3

Partition 3 is now the selected partition.

DISKPART> detail part

Partition 3
Type    : e3c9e316-0b5c-4db8-817d-f92df00215ae
Hidden  : Yes
Required: No
Attrib  : 0X8000000000000000
Offset in Bytes: 420478976

There is no volume associated with this partition.

DISKPART> select part 4

Partition 4 is now the selected partition.

DISKPART> detail part

Partition 4
Type    : ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
Hidden  : No
Required: No
Attrib  : 0000000000000000
Offset in Bytes: 554696704

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
* Volume 2     C                NTFS   Partition    106 GB  Healthy    Boot

Disk Imaging Goes Wrong

Once the GPT format disk was created and used, I was curious, how easy is it to clone or move to another disk.  The answer is a complete disaster!

Lots of tools that I was expecting to work did not, principally because of the GPT disk layout, combined with my rather ancient Gigabyte GA-X58A-UD7 revision 1 motherboard


Acronis True Image 2014 Premium


O&O Disk Image

Also failed combination of above and Diskpart debugging and jiggling.  Ah EBD0A0A2-B9E5-4433-87C0-68B6B72699C7  I was close. But no cigar.

In desperation I went back to the official, but hidden Microsoft System Backup tool that already failed, let's see if it can be coaxed to work

Finding the Windows System Backup

So, let us assume you installed Windows 8.1.   Let us make a complete System Image.  Difficult to find but here:

For me the backup of my initial Windows System of about 35GB took about 4 minutes.

Now trying the restore

Windows cannot restore a system image to a computer that has a different firmware.  The system image was created on a computer using EFI and this computer is using BIOS

But actually this IS the same computer!

Actually, this error message is because I had either booted the system from a USD DVD drive or a bootable USB key created with

USB/ DVD Download Tool

In other words via BIOS menu  impromptu bootlist as shown above will FAIL for all USB devices.

Only if you select the EFI boot option and boot from an internal DVD

So finally when it works, it works so elegantly and in less than 10 minutes, or about 30 hours and 10 minutes including head scratching. Now the system is restored.

And also important to note that
Depending on the BIOS setting it is possible to Boot from the DVD, or once installed boot Windows.   What I mean is that initially the setting is AHCI.  Windows will do the initial install from DVD but on the necessary reboot can't complete and sits there with a flashing _ in the top corner of the screen. You have to go back to IDE.

In Summary

  • Assuming your boot hard disk is less than 2TB in size you can still stick with the older MBR Master Boot Record style disk format
  • If you move to a GPT (GUID Partition Table) disk you better make sure your backup/ recovery  tools work correctly
  • Booting from my USB key or USB DVD confused Windows 8.1 recovery
  • Only Booting from an internal DVD enabled the Repair Windows options to correctly restore a backup
  • The Windows Restore utility once working took just minutes to recover my 100GB partition from a last backup
  • Other old and trused tools were incapable of backing up and restoring my UEFI partitioned environment