Restoring UEFI partition

Discussion in 'backup, imaging & disk mgmt' started by Elwe Singollo, Jan 25, 2016.

  1. Elwe Singollo

    Elwe Singollo Registered Member

    Joined:
    Oct 30, 2015
    Posts:
    70
    Good day WSF,

    First post under this user although I was a member for 5 years or so before deciding to take a break from this and another couple of forums I visited. Can’t seem to contact Mods to see if the old ID can be reactivated. You obviously can’t PM as a new member and a few tries on the ‘Contact Us’ link went unanswered so here goes with this one.

    I’ve been asked for help from a friend who has done something rather odd to a new, for him (though certainly not modern in terms of spec etc.), HP laptop.

    He was previously on a Windows 7 set-up that had been upgrade from XP so the whole UEFI concept was alien to him. He appears to have booted the installed Win 8.1 system, partitioned the hard-drive into OS, Data and Back-ups the copied in his data from the old machine and after backing it up destroyed the old hard drive.

    He then seems to have noticed the UEFI boot partition and mistaking it for an HP recovery partition deleted it! This unsurprisingly left the laptop unbootable. He’s then tried to re-install Win 8.1 but because it told him he’d need to delete his data and back-up partition to get UEFI he’s installed Win 8.1 MBR/legacy onto the OS partition. In the interim he’s upgraded the Win 8.1 install to Win 10.

    Anyway, he now for whatever reason, wants to get back from a legacy boot to UEFI and is wondering if there are any tools to do that without wiping his other 2 partitions. Hence his reason for enlisting my help.

    I’ve advised him I'm unaware of any but have suggested he invest in an external back-up solution, copy his data partition and start from scratch win Win 10 installation media which I think should install Windows and recreate the UEFI boot environment. He can then re-create his partitions and copy the data back-in.

    A few questions though for the experts here:
    1. Is this the best/only solution for him?
    2. If so, should he copy the data over to the external device or could he copy the whole partition and restore it (he uses IFW)
    3. Are his existing back-ups of the OS (MBR/legacy) of any use to him once he re-instals Windows with the UEFI environment?
    Any assistance would be greatly appreciated.

    Thanks
     
  2. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    8,634
    Location:
    NSW, Australia
    Elwe Singollo,

    You mentioned he has TeraByte's IFW. Does he have TeraByte's BIBM? BIBM includes a chgdtype.tbs script which can convert MBR to GPT.
     
  3. Elwe Singollo

    Elwe Singollo Registered Member

    Joined:
    Oct 30, 2015
    Posts:
    70
    Thanks Brian K,

    Not that I'm aware of but he might be willing to invest.

    Would BIBM allow MBR to GPT while retaining the existing partitions? Would it create the UEFI boot environment as well?

    Thanks
     
  4. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    8,634
    Location:
    NSW, Australia
    The script creates two extra partitions. ESP and MSR, so make sure you have about 300 MB of unallocated free space available. There should be no data loss in the OS partition but make sure you have a backup. I suggest an IFW entire drive image backup before you run the script.
     
    Last edited: Jan 26, 2016
  5. Elwe Singollo

    Elwe Singollo Registered Member

    Joined:
    Oct 30, 2015
    Posts:
    70
    Brilliant thanks. He's over on Thursday. Will get him to bring the lappy and we'll give it a try. He can store the full disc image on my external drive while we work through it.

    Does it matter where the unallocated space is?

    Thanks
     
  6. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    8,634
    Location:
    NSW, Australia
    I just ran a test with a Win10 MBR install. The conversion to GPT takes less than a second. The MSR is 128 MB and the ESP is 100 MB. These were created in the free space following the Win10 partition. The next step is to edit the BIOS for Secure Boot UEFI and disable CSM. Win10 booted fine.
     
  7. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    8,634
    Location:
    NSW, Australia
    No, it can be anywhere. Start, middle or end of drive.
     
  8. Elwe Singollo

    Elwe Singollo Registered Member

    Joined:
    Oct 30, 2015
    Posts:
    70
    OK, great. Your help is much appreciated.
     
  9. Robin A.

    Robin A. Registered Member

    Joined:
    Feb 25, 2006
    Posts:
    2,278
    Macrium has a free procedure: Restoring an MBR System image to UEFI/GPT.

    I don´t know if it works.

    It seems that in the TB procedure the OS partition can be finally located after the EFI and MSR. I had understood that the order had to be: EFI, MSR, OS.

    BTW, the "Fix Boot problems" module mentioned in the Macrium article is very good, independent of any restore procedure, and free.
     
    Last edited by a moderator: Jan 26, 2016
  10. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    8,634
    Location:
    NSW, Australia
    Robin, that's what I used to think too. I did tests and you can have these 3 partitions (and the Recovery partition) anywhere on the HD, in any random order and Windows still loads normally.
     
  11. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    8,634
    Location:
    NSW, Australia
    Robin,

    From Microsoft...

    The MSR can be deleted (online or offline) and Win10 still loads normally. I'm not suggesting this should be done but just an observation.
     
  12. TheRollbackFrog

    TheRollbackFrog Registered Member

    Joined:
    Mar 1, 2011
    Posts:
    3,042
    Location:
    The Pond - USA
    WikiPedia explains the MSR interaction pretty well... it is only really needed upon very special (unique) occasions.
     
  13. Robin A.

    Robin A. Registered Member

    Joined:
    Feb 25, 2006
    Posts:
    2,278
    I read this MS document (2014):

    Configure UEFI/GPT-Based Hard Drive Partitions

    It seems that the "recommended" order is intended to prevent eventual damage to some partitions. Also, the size of the EFI partition should be 260 MB (for compatibility with 4k native sector disks) and the WinRE Tools partition is required for some particular processes, some of them involving BitLocker encryption.

    So, the MSR and the WinRE Tools partitions may not be needed in most home environments.

    But my preferred method to configure a UEFI-GPT boot disk is still to clean-install Windows in UEFI mode. It´s better to have to whole thing right from the beginning.
     
  14. crofttk

    crofttk Registered Member

    Joined:
    May 15, 2004
    Posts:
    1,976
    Location:
    Eastern PA, USA
    Note that since that July '14 article. A Win10 truly clean install in UEFI mode with GPT disk scheme (AND all partitions deleted as part of Custom Install option) will give, in order: WinRE @ 450 MiB, ESP @ 100 MiB, MSR @ 16 MiB, followed by OS partition.
     
  15. Robin A.

    Robin A. Registered Member

    Joined:
    Feb 25, 2006
    Posts:
    2,278
    Yes, in Windows 10, the size of the MSR partition is 16 MB, according to the Wikipedia article. Also here:
    How to Clean Install Windows 10.

    The more recent MS document is
    UEFI/GPT-based hard drive partitions
     
    Last edited: Jan 27, 2016
  16. Elwe Singollo

    Elwe Singollo Registered Member

    Joined:
    Oct 30, 2015
    Posts:
    70
    Just an update for those kind enough to respond. TBH BIBM was a bit daunting for both of us but I did notice he had AMOEI Partition Assistant Pro he'd got from a giveaway already installed which has a convert MBR to GPT option. We opted for that instead.

    While it does not appear to have created the ESP and MSR partitions the disc is noted as GPT, he can create more that 4 primary partitions and I was able to enable Secure Boot UEFI and disable CSM and it booted fine (previously that led to a 'no operating system found' message). The System Reserved partition that was (and still is) at the start of the disc now shows EFI,GPT in the description.

    While booting the manufacturer logo is shown rather than Windows and he's shaved about 15 seconds (30%) from boot times. Other than the expected missing UEFI partitions everything seems to work fine.

    The process also changed the drive lettering to sequential lettering from c based on location on the disc (they were all over the place previously) so some locations for docs, music etc had to be re-done. The only real issue is IFW is not picking up any partitions when trying to do a back-up. It only sees the full disc not the constituent parts.

    At any rate he's happy with the result so thanks for the advice. I've learned a lot from the sources quoted etc.

    Cheers
     
  17. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    8,634
    Location:
    NSW, Australia
    Elwe Singollo,

    Thanks for the update. IFW not seeing the partitions is concerning. Can you go to this folder...

    C:\Program Files (x86)\TeraByte Unlimited\TeraByte OSD Tool Suite Pro\win

    Right click tbosdtw.exe and Run as Administrator. At the prompt type...

    list hd 0 /f /u

    ... and press Enter.

    What do you see? (under list hd 0 /f /u)

    It should show all partition Names, their Size, Free, Type, ID and File System.
     
  18. Elwe Singollo

    Elwe Singollo Registered Member

    Joined:
    Oct 30, 2015
    Posts:
    70
    Thanks Brian K

    Difficult because I don't have the machine but I'm told it says:

    Name Size Free Typ ID File System
    ---------------- ---------- ---------- --- ------ ------------------
    MBR 0 2097152MB Pri (01) GPT Reserved

    Screenie sent of Disk Management and it looks like this:

    upload_2016-1-29_19-12-57.png
     
  19. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    8,634
    Location:
    NSW, Australia
    IFW and tbosdtw.exe can't see the partitions. tbosdtw.exe is reporting the Protective MBR. Disk Management can see the partitions but not the MSR.

    Can the AOMEI boot disk see the partitions?
     
  20. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,480
    Location:
    California
    Is it a current version of IFW? If it's an older version it may not support GPT.

    You could also check what the Partition Info program reports (make sure it's current, though). It's normally installed with IFW (same folder as IFW, partinfg.exe).
     
  21. Elwe Singollo

    Elwe Singollo Registered Member

    Joined:
    Oct 30, 2015
    Posts:
    70
    Brian K, AOMEI gives the same as Disk Manager. I had an Easeus Partion Master recovery disc on hand just in case as well and it also showed the partitions as noted in the Disk Manager. I still have the BIBM disc I made to install that software but don't have access to the machine at present. I'll try to get it over the weekend and select not to create the BIBM partition automatically so it shows me the disc as it sees it to select/create the partion etc. I'll let you know what that says.
    Thanks MudCrab I'll do that also. I'm told it is 2.97.3. Not sure if that is totally up to date bit won't be far off it.

    I still have the the full disc and data backed up. I'm sure he'll be happy just to reinstall Windows and copy in data later if you think there are any long term issues with the disc looking like it does here. It's what we were planning anyway.

    Thanks again for taking the time to consider this.
     
  22. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,480
    Location:
    California
    That version supports GPT disks so it should be seeing the partitions (2.98 is current). I suspect something may not be quite right with the conversion. I assume IFW is reporting the disk as MBR (for example, "HD 0 - MBR").
     
  23. oliverjia

    oliverjia Registered Member

    Joined:
    Jul 21, 2005
    Posts:
    1,517
    converting a disk from MBR to GPT with data on it is basically a gamble at this point. Best way to do it is to transfer all customer data to other drives, then clean the whole disk, then clean install Windows. Yes you have to spend about 1 hour or two to install Windows, but you'll save yourself tons of time later, without having to deal with all sorts of strange problems.
     
  24. Elwe Singollo

    Elwe Singollo Registered Member

    Joined:
    Oct 30, 2015
    Posts:
    70
    Yes it is. I think the routine use by the AOMEI software is somewhat cosmetic and while it allows the system to boot as normal its not made all the required changes and I'm getting worried if anything odd happens it might cause issues
    Yeah, thinking the same thing.

    Thanks
     
  25. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    8,634
    Location:
    NSW, Australia
    Elwe Singollo,

    I can think of a 1 minute fix but it looks frightening on paper. Do you have an Entire Drive backup of the system prior to converting to GPT?
     
Loading...