Computer Hope

Microsoft => Microsoft Windows => Windows Vista and 7 => Topic started by: ALAN_BR on February 14, 2013, 03:21:24 AM

Title: DISKPART UNIQUEID Error. Windows reports my GPT Disk as MBR. How do I fix it ?
Post by: ALAN_BR on February 14, 2013, 03:21:24 AM
I have this error when I launch CMD.EXE with full administrator privileges and then run DISKPART :-
Quote
DISKPART> UNIQUEID DISK ID=21EC2020-3AEA-1069-A2DD-08002B30309D

The specified identifier is not in the correct format.
Type the identifier in the correct format:
in hexadecimal form for an MBR disk or as a GUID for a GPT disk.
DISKPART correctly obeys me without any errors with MBR operations such as
DISKPART> UNIQUEID DISK ID=000FA832
and
DISKPART> UNIQUEID DISK ID=000FA830

I am working on a secondary non-system HDD that is GPT style and has been in use as such for a few years.
600 GB WDC WD6401AALS-00L3B2
I booted into a Boot Flash Drive based on SysLinux but after a couple of seconds it failed to present a menu and crashed back into a BIOS Restart
and I then allowed a normal Windows Start-Up.

The consequence of an abnormal RESTART into Windows is that it no longer sees a GPT GUID ID but an MBR Hexadecimal ID and now considers :-
the first 25 GB NTFS partition to be RAW,
and the main 500 GB NTFS partition has become unallocated space.

A Data Recovery tool has done an almost (but not quite)  perfect job on the 250 GB of files that remain in this unallocated space,
and I have another Partition Recovery tool that promises to work on both MBR and GPT disks.

I am simply trying to undo the damage and make Windows correctly recognise this GPT disk,
in the hope that both the recovery tools will have better prospects of complete success if Windows is not telling them they are dealing with an MBR disk.

Are there any alternatives to DISKPART UNIQUEID which I could try ?

I looked at the possibility of initialising the disk as GPT, but that seems to require cleaning the disk,
which would avoid confusing the tools,
but might also put my files out of their reach.
I would welcome any alternatives.

N.B.
My best guess of what went wrong :-
My drives are connected by SATA and Microsoft have never understood or fixed Windows to properly work with SATA.
According to a KB????? their intention was that Windows would report the drive on SATA channel "n" as being Drive "n"
They failed with XP and then VISTA and WIN 7, and I doubt WIN 8 is any better.
My OCZ SSD is connected to SATA Channel 0, but it almost never is seen as Disk 0.

On my system a Power UP START will every time result in
Drive 0 = WDC HDD
Drive 1 = SamSung HDD
Drive 2 = OCZ SSD

A RESTART results in either
Drive 0 = OCZ SSD
Drive 1 = WDC HDD
Drive 2 = SamSung HDD
Or a RESTART results in
Drive 0 = WDC HDD
Drive 1 = OCZ SSD
Drive 2 = SamSung HDD

I am guessing that the Linux Abort led to yet another chaotic Windows RESTART which caused Windows to replace the WDC UNIQUEID with the Samsung value.
I KNOW FOR SURE that Windows restarted and the WDC HDD had been allocated the same UNIQUEID as the SamSung HDD has always used,
and so Windows declared a Disc Signature Conflict and promptly put the Samsung HDD "offline",
and then it told me I had no Pagefilesys and it created one for me on the SSD
(I had moved my Pagefile away from the SSD and into what was now unallocated space on the WDC HDD.)

I now have the Samsung HDD back on-line and have reduced Pagefile.sys to a tolerable size,
and now my focus is on restoring normal operation of the WDC HDD.

Regards
Alan
Title: Re: DISKPART UNIQUEID Error. Windows reports my GPT Disk as MBR. How do I fix it ?
Post by: Geek-9pm on February 14, 2013, 01:34:32 PM
Firsts of all, it is hard to give a clear answer to your problem.
Here is a reference that may help others reading this.
 I assume you already know all about it:
http://msdn.microsoft.com/en-us/library/windows/hardware/gg463525.aspx
Windows and GPT FAQ

IMHO mixing OSs on one drive brings  unspeakable terror. Unless the drive is MBR.
Title: Re: DISKPART UNIQUEID Error. Windows reports my GPT Disk as MBR. How do I fix it ?
Post by: ALAN_BR on February 15, 2013, 02:26:19 PM
Thanks for the link, unfortunately it does not help me.

My devastated HDD was GPT because there appeared to be no reason that required it to be MBR.
It has not been used for running any operating system, other than Pagefile.sys was moved from C:\ on the Samsung HDD to E:\ on this WDC HDD,

Linux has never been on my computer apart from when it has run from a Boot Flash Drive.

I am currently recovering files from unallocated space and if there is no way to change the ID back back to a GUID,
then I hope that EaseUSŪ Partition Master Professional (Free GAOTD a few days ago) will recover my partitions without being confused by the lack of a GUID.
But first before I lose the whole thing I am trying my luck with Data Recovery tools.

I think that when I am satisfied that I have salvaged all possible information I will clean the disk and start again.
Many data recovery and partition recovery tools are not suitable for GPT,
thus MBR discs have to be better for recovery.

I have seen that GPT are claimed to be more fault tolerant,
and that if the beginning of the Disk was damaged it would not destroy access to all partitions.
In practice when searching for solutions to this problem I have found many Topics and Posts about GPT partition problems,
BUT I have never seen anything other than a total loss of ALL partitions.
One can hope that a GPT disk might survive a problem that would damage an MBR disk,
BUT I know that when there is a disk problem there are more tools that are better able to deal with MBR rather than GPT.

I think that in a few days this Disk is going to be cleaned and then re-used as an MBR disk.
If anyone thinks this a bad decision then please state your reasons before I take action

Regards
Alan
Title: Re: DISKPART UNIQUEID Error. Windows reports my GPT Disk as MBR. How do I fix it ?
Post by: Geek-9pm on February 15, 2013, 09:16:46 PM
My personal recommendation theist you buy another Hard drive. But the idea is not only mine, in fact t others on this forum recommended that  long before me.

By having separate drive for different systems, you avoid  some of the issues you have found.

Some, or many, versions of Linux do not support the GPT.

Vesta,  Windows  7 and 8 default to GPT. Windows XP does not. Except the 64 bit version. You must not t use XP utilizes to alter the hard drive definition area. Even if is seems to work.

This Desktop I have here now has Windows 7 64 bit and XP 32 bit  in a dual boot.  The only changers I make to the partition size and boot information p is with  utilities  certified to run under Windows 7.

Here is a commendation  from another forum
http://www.redmondpie.com/best-free-partition-manager-for-windows-7/

May I suggest you never use any Linux tool on a Windows 7 or 8 hard drive.
Never Never.
Title: Re: DISKPART UNIQUEID Error. Windows reports my GPT Disk as MBR. How do I fix it ?
Post by: ALAN_BR on February 16, 2013, 04:13:43 AM
Thanks

I take that as a vote against GPT and in favour of MBR.

I already use Partition Wizard,
both the version that runs under Windows,
and also the stand-alone self-contained Linux version that rescued all 6 partitions on my Laptop several years ago  ;D

To Secure Erase my OCZ SSD I now use a Linux ISO supplied by OCZ for this purpose.
OCZ also supply a Windows tool for the same purpose,
but unfortunately a "standard" version of WinPE (as built by Macrium Reflect) is not able to support that tool,
and I do not have the time to learn how to extract the requisite "extras" from a 2 GB WAIK.

I have used the YUMI bootloader in the past with no problems.

On this occasion the flash drive never got off the launchpad.
It failed to display its internal menu of ISO's - it simply spent a second or two loading and then it crashed/froze.

Windows consistently allocated the same incorrect sequence of Disk numbers to the SSD and HDD's upon a power up.
BUT upon a Restart there is no consistency.
I think this is another example of a typical Windows Race Hazard.
Power-up will present the BIOS and Windows with all the hardware fully reset and the HDD's at a standstill.
A restart will find the HDD's at full speed and ready to go, whilst perhaps the SSD is still busy with close-down housekeeping,
I have also in the past experienced Serial Port interface issues where some components only experienced a "hard restart" via Power-Down,
and a simple Restart failed to re-initialise the Serial Port.

I am guessing that before the HDD's were up to speed the system had crashed back from Linux into the BIOS achieving a very early Restart,
and during the unusual chaos Windows read the Samsung Disk Signature and "corresponding" Disk Number,
and subsequently it perceived the WDC as being the same Disk Number and having a different Signature so it over-wrote with the Signature read from the Samsung.

Regards
Alan
Title: Re: DISKPART UNIQUEID Error. Windows reports my GPT Disk as MBR. How do I fix it ?
Post by: BC_Programmer on February 16, 2013, 10:15:44 AM
First: a GPT disk ALWAYS has an MBR. It's called a Protective MBR, And includes Partition information, just as a Basic MBR Disk setup would. GPT puts the Primary GUID Partition table immediately afterwards, the GUID Partition Tables themselves after that, and then the partitions. the Backup GPT Data is placed after all Partitions.

I have this error when I launch CMD.EXE with full administrator privileges and then run DISKPART :-DISKPART correctly obeys me without any errors with MBR operations such as
DISKPART> UNIQUEID DISK ID=000FA832
and
DISKPART> UNIQUEID DISK ID=000FA830
DiskPart might require the customary usage of braces on each end of the GUID. You can use Device Manager and select the properties of the disk drive in question, and then populate the Volumes tab.

Booting with GPT Requires EFI. the Protective GPT MBR has an ID of Hexadecimal EE. a EFI BIOS does not use this identifier, As far as I'm aware, to determine it's boot process; it is simply a protective MBR so that the GPT Table won't be overwritten. My understanding is that it can be practically erased with no ill effect, since the EFI knows where to look.

Quote
The consequence of an abnormal RESTART into Windows is that it no longer sees a GPT GUID ID but an MBR Hexadecimal ID and now considers
the first 25 GB NTFS partition to be RAW,
and the main 500 GB NTFS partition has become unallocated space.
This sounds more like the syslinux boot did something cruel and unnatural. There is nothing abnormal about the windows Restart in this case. The only difference between when it ran before and after would be that sysLinux crashed in between. a GPT Disk can be used as an MBR Drive, it's just limited to 2TB Partitions and 4 Primary Partitions total in that case. From the sounds of it, the MBR Information was out-dated. I'm not sure what a Flash Boot would do to cause this.

Quote
Are there any alternatives to DISKPART UNIQUEID which I could try ?
Well all you've offered is the Diskpart information- or rather, it not letting you use a specific ID format. I can't find any documentation on the proper format, but it might be as simple as omitting braces. Device Manager is probably a better source of this information (well, it's the same information, really).

Quote
My drives are connected by SATA and Microsoft have never understood or fixed Windows to properly work with SATA.
SATA Drives have worked perfectly fine using the generic SATA support since Vista. XP has never had built-in SATA support and always requires third-party drivers to be slipstreamed. The Exception is that some manufacturer drivers- and presumably some that were included with Vista/7/ (and possibly) 8, have some issues dealing with very large drives, but that doesn't seem to be an issue here (very large being >2TB)

Quote
My OCZ SSD is connected to SATA Channel 0, but it almost never is seen as Disk 0.
Conversely, All my drives have always been identified as the Disk # of their Channel Number. This could be a BIOS issue, or some sort of remapping feature through the BIOS, or it could even be the usage of IDE-Compatible mode.

Quote
I am guessing that the Linux Abort led to yet another chaotic Windows RESTART which caused Windows to replace the WDC UNIQUEID with the Samsung value.
The UniqueID information is in the ESCD, which is read-only after the BIOS initially populates it with data from it's POST inspection. The actual Drive information is requested from the drive firmware (via the ATA IDENTIFY command).
Quote
I KNOW FOR SURE that Windows restarted and the WDC HDD had been allocated the same UNIQUEID as the SamSung HDD has always used,
and so Windows declared a Disc Signature Conflict and promptly put the Samsung HDD "offline",
and then it told me I had no Pagefilesys and it created one for me on the SSD
(I had moved my Pagefile away from the SSD and into what was now unallocated space on the WDC HDD.)

If we are talking about three different drives, this actually changes quite a lot. the usage of GPT or MBR partitioning is only per-drive, not System-wide. My understanding is that the SATA Channels given back for drives can be inconsistent if the BIOS is in ATA-Compatible mode- but generally those assignments are only known by the BIOS- the Controller then emulates two ATA Channels.

Side Note: GPT is not and has not been the default partitioning scheme on any OS. There really is no reason to use GPT unless you happen to be hitting one of the limits of MBR (needing more than 4 primary partitions on a disk and having partitions larger than 2TB)

It could have been a bug with the particular AHCI Driver in use. Some AHCI Driver and hardware combinations have issues in certain situations. Your previous session might have triggered the bug and you only coincidentally attempted to boot SysLinux, which failed as a result of inconsistent disk structures when investigating it's hardware environment.
Title: Re: DISKPART UNIQUEID Error. Windows reports my GPT Disk as MBR. How do I fix it ?
Post by: Geek-9pm on February 16, 2013, 08:52:47 PM
http://en.wikipedia.org/wiki/GUID_Partition_Table#Operating_System_support_of_GPT

The above is only for people that read.   :(
Title: Re: DISKPART UNIQUEID Error. Windows reports my GPT Disk as MBR. How do I fix it ?
Post by: ALAN_BR on February 17, 2013, 12:27:03 PM
If we are talking about three different drives, this actually changes quite a lot. the usage of GPT or MBR partitioning is only per-drive, not System-wide. My understanding is that the SATA Channels given back for drives can be inconsistent if the BIOS is in ATA-Compatible mode- but generally those assignments are only known by the BIOS- the Controller then emulates two ATA Channels.
I am sure I supplied system specs before I started this topic, but now when I click I just see a javascript error. so here are my details

OCZ SSD 59 GB (MBR)
WDC HDD 600 GB (GPT)
SamSung HDD 931 GB (MBR)

I think I remember seeing that 64 bit XP had SATA capability, but I could be wrong.

I forget the number but Microsoft definitely published a KB nnnnnn stating that they intended Windows to allocate Disk numbers according to the SATA port numbers,
but admitting that they were unable to ensure this.

I have had this desktop for 2 or 3 years,
but  the OCZ SSD was only added 11 months ago.

I forget the details but the original HDD's were displaced to SATA ports 1 and 2 so the SSD could be on port 0,
and the BIOS needed an AHC? change to enable the delivery of TRIM commands.

I tried curly braces and that failed with the same error.
This was my modified attempt
DISKPART> UNIQUEID DISK ID={EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}

Was that the format you intended ?

Regards
Alan
Title: Re: DISKPART UNIQUEID Error. Windows reports my GPT Disk as MBR. How do I fix it ?
Post by: BC_Programmer on February 17, 2013, 01:05:07 PM
Found this:
Disk drive numbers may not correspond as expected to the SATA channel numbers when you install Windows on a computer that has multiple SATA or RAID disks (http://support.microsoft.com/kb/937251)

Quote
This problem occurs because drives are enumerated in the order in which they are presented to the operation system by the system BIOS.

Quote
I think I remember seeing that 64 bit XP had SATA capability, but I could be wrong.
XP x64 required a separate SATA Driver to work with AHCI connected Hard Disks (without compat mode, that is).

Only idea I really had for this was the braces, which you got my intent for. I don't use GPT, myself (don't see much point) so can't speak from experience. I do know that using a new File System or Disk schematic can be a bad idea- NTFS was a good example of this.
Title: Re: DISKPART UNIQUEID Error. Windows reports my GPT Disk as MBR. How do I fix it ?
Post by: ALAN_BR on February 18, 2013, 05:19:24 AM
Thanks for all the information.

I now have an idea of the obstacles to be overcome, and will desist from attempting the impossible.

I have used Data Recovery tools that have located 460 GB of files that were in :-
the small NTFS partition that is now RAW;
plus the large archive partition that is now "Unallocated".
I am fresh out of spare HDD's to receive 460 GB of recovered files.
I have selected and successful recovered 45 GB that are relevant to the future,
and am now looking at 415 GB that is pending to see if there is anything more that is worth having.

My next stage is to evaluate Partition Recovery tools - but only for the purpose of learning.
I am definitely intending to conclude by cleaning the HDD and initialising as MBR and not GPT.

Again, thanks.

Regards
Alan
Title: Re: DISKPART UNIQUEID Error. Windows reports my GPT Disk as MBR. How do I fix it ?
Post by: Geek-9pm on February 19, 2013, 08:32:33 PM
Here is a link of interest.
Five free portable recovery tools
http://www.techrepublic.com/blog/five-apps/five-free-portable-recovery-tools/1521
Title: Re: DISKPART UNIQUEID Error. Windows reports my GPT Disk as MBR. How do I fix it ?
Post by: ALAN_BR on February 20, 2013, 01:54:52 AM
Thanks

Regards
Alan