• Backing into a dual boot in UEFI

    Home » Forums » AskWoody support » Windows » Windows 10 » Questions: Win10 » Backing into a dual boot in UEFI

    Author
    Topic
    #487637

    As I posted previously,

    I’m creating a total hard drive image with Windows 8 Pro in pristine condition with all drivers installed. From this point I can tinker around with the laptop without fear. I intend to get a dual boot going next with Windows 7 Ultimate, like I have on my desktop.

    Now that I have converted my hard drive to GPT, enabled EFI, reinstalled Windows 7 Professional SP1 and then upgraded it to Windows 8 Pro, I want to set up a dual boot with the Windows 7 Ultimate that was installed on my laptop with all my programs, apps and data prior to the changes. Windows 7 was installed on MBR, with two primary partitions and an extended partition with four logical drives. This is the setup I use to enhance the backup regimen using drive imaging that I have developed and honed over the years.

    At present, Windows 8 is installed on one of two 60GB partitions I made during the installation of Windows 7 Pro. I’ve since used BootIt Bare Metal to setup partitions as I had in my Windows 7 installation on this laptop drive. I used Image for Windows to restore my Windows 7 backups of each individual partition to the same relative locations on the GPT drive. I then editted the BCD Store to add Windows 7 to the boot menu, rebooted and selected Windows 7. Windows 7 booted, took me to the login screen, and I logged into one of my user accounts – almost. It proceeded normally, but the wait for the desktop was a tad longer, and then I got an error message that Windows was unable to find my user profile. Clicking on OK simply returned me to the login screen.

    So I have an almost-dual-boot setup on my laptop. After ruminating over this for a while, it seems that the differences between GPT and MBR are what is keeping Windows 7 from finding my Users partition. GPT doesn’t allow Extended Partitions, and my Users partition is actually a logical drive in an extended partition. GPT and MBR mark partition boundaries in different ways, and Windows 7 is looking for an MBR identified boundary in an extended partition for my Users drive, and the labeling just isn’t there. What this means for me is that I have to stitch Windows 7 back together into one primary partition, and make a drive image of that partition. I’ve already made a drive image of my Windows 8 partition for safe keeping, next I’ll disable EFI, and restore my full-drive Windows 7 image in order to gather it all back together.

    After I have Windows 7 restored and booting, I’ll have to slide the primary partition back enough to allow creation of an EFI partition and MSR partition, and probably finagle the BCD Store to get it to boot again. Once I have the reconstruction of Windows 7 completed, I’ll enable EFI again, convert the drive to GPT again, create the EFI and MSR partitions, then restore my Windows 7 image to a single partition right behind the MSR partition. I’ll most likely have to boot my Windows 7 Ultimate installation USB to re-create the EFI partition as true EFI, finagle the BCD Store, and then Windows 7 should be able to fully boot in EFI.

    At least, that was the plan. My TBWinRE rescue disk made under MBR wouldn’t boot the laptop in UEFI. So to keep it simple, I installed Windows 7 Ultimate on the GPT disk, installed Image for Windows and the TBWinRE build utility, built a new rescue disk under UEFI, and rebooted. The UEFI rescue disk booted the laptop, TBWinRE reached across the network to my NAS and restored my reconstructed Windows 7 Ultimate, wiping out the utility installation. I had to do a startup repair, but it was simple enough that Windows managed it all alone.

    Now that I have Windows 7 Ultimate booting in EFI with all my programs and data intact, I can restore my Windows 8 EFI drive image, add it to the boot menu, and have my dual boot setup complete. I think I’ll save that for tomorrow.

    Always create a fresh drive image before making system changes/Windows updates; you may need to start over!
    We were all once "Average Users". We all have our own reasons for doing the things that we do to our systems, we don't need anyone's approval, and we don't all have to do the same things.

    • This topic was modified 2 years, 8 months ago by bbearren. Reason: update link
    Viewing 3 reply threads
    Author
    Replies
    • #1373146

      it seems that the differences between GPT and MBR are what is keeping Windows 7 from finding my Users partition. GPT doesn’t allow Extended Partitions, and my Users partition is actually a logical drive in an extended partition. GPT and MBR mark partition boundaries in different ways, and Windows 7 is looking for an MBR identified boundary in an extended partition for my Users drive, and the labeling just isn’t there.

      At least superficially (though there certainly may be more going on here) this sounds like the long-standing problem one has when simply moving partitions around in a bog-standard MBR environment: my impression is that while Vista and later systems using the BCD have improved the ability to locate ‘boot’ partitions wherever they may be in the system they still use a ‘disk signature plus partition offset’ mechanism within the operating system itself for identifying other partitions, and if that offset (or signature) changes then the partition is not recognized as what the system used to think it was (i.e., it’s assigned a drive letter based on an algorithm rather than on the basis of the one the system expects it to have, and when the system goes looking for the drive letter it used to use to find its contents it may well be assigned to some other partition – if it’s in use at all).

      If indeed this mechanism is still used, it resides in the HKLMSystemMountedDevices key in the Registry and this might have been able to have been manipulated to restore the proper drive letter assignments for the partitions (e.g., the one containing your user profile) that you needed the system to be able to find without resorting to the more laborious process which you describe above. Having no experience with GPT partitions I have no idea what the entries in that key may look like with that partition structure, but the corresponding data within your Win 8 system might have provided sufficient clues (and if so that might be useful for anyone else encountering such a situation to know, if you have the time to check it out).

    • #1373158

      Windows 7/8 is natively aware of its environment. My Windows 7 Ultimate was installed in an MBR environment, which uses 32bit addresses in the Master Boot Record for partition(s) locations. The GPT environment uses 64bit addresses in the GUID Partition Table for partition locations. I’m speculating that Windows 7 Ultimate could partially boot because the boot loader in EFI/GPT could point to the OS partition without difficulty.

      Once Windows 7 Ultimate loaded, it was unable to find 32bit MBR addresses in the 64bit GPT partition table, and most likely would not have been able to locate the GPT partition table, since it is considerably different in layout and position than the MBR. HKLMSystemMountedDevices lists volumes by hex string, not drive letter. These volume addresses are 32bit in an MBR system, and 64bit in an EFI system. I could perhaps have editted the registry remotely to gain access to my Users partition, but I would have had to modify the GUID of all my partitions, not just the Users partition, in order to get any functionality for Windows 7 Ultimate, and probably a lot more to get full functionality.

      Each partition GUID would have had to be found manually, either in the GPT itself, or in the Windows 8 registry, then editted one by one in the Windows 7 Ultimate registry. I didn’t want to geek it up that much, so I just used the down and dirty. The devil-you-know sort of thing.

      Always create a fresh drive image before making system changes/Windows updates; you may need to start over!
      We were all once "Average Users". We all have our own reasons for doing the things that we do to our systems, we don't need anyone's approval, and we don't all have to do the same things.

      • This reply was modified 3 years, 3 months ago by bbearren.
    • #1373233

      My thought was that when Win 7 partially loaded in the GPT environment it might have added entries for the GPT partitions into HKLMSystemMountedDevices but just didn’t know which ones to apply the appropriate drive letters to. At the end of that key reside the drive-letter-to-partition-ID mappings, so it might just have been a matter of copying the appropriate GPT partition ID values (rather than GUIDs), perhaps identifiable by the comparable information in the Win 8 Registry, to the relevant drive-letter keys (at least that seems to work when drive letters get scrambled in traditional MBR environments, but since I have no idea what the entries in that key look like in GPT environments that’s purely a guess).

    • #1373348

      My understanding is that Windows inspects the environment during installation, and from that point forward expects to boot into that environment. I have had partition mix-ups before where the drive letter for my Users partition/logical drive got shuffled when I installed another hard drive, but when I logged on, Windows put me into a default desktop, and I could work from there to get everything straightened out.

      In this case, it just backed out, which tells me that there was more amiss than Windows could confront, as in the 32bit addresses for partition locations were nowhere to be found. Like a typing error in a command console – the error message says the command is not valid. And as I said, I didn’t want to geek it up too much, just get it done in a manner with which I’m familiar.

      That being said, I have Windows 7 Ultimate running normally, and Windows 8 Pro in dual boot. I’m using the Windows 7 bootmgr, like my desktop setup. I don’t care for the (to me, unnecessary) reboot that Windows 8 bootmgr pulls when selecting a different OS. I wrote the Windows 8 entry into the boot menu using BootIt Bare Metal’s BCD Edit function. I didn’t expect the GUID’s to be correct, and when Windows 8 failed to boot, I used my Windows 8 installation USB to do a startup repair. That wrote the correct GUID’s, etc. into the BCD Store, and Windows 8 booted correctly.

      This is being posted from my standard user account in the Windows 8 StartIsBack desktop.

      Always create a fresh drive image before making system changes/Windows updates; you may need to start over!
      We were all once "Average Users". We all have our own reasons for doing the things that we do to our systems, we don't need anyone's approval, and we don't all have to do the same things.

      • This reply was modified 3 years, 3 months ago by bbearren.
    Viewing 3 reply threads
    Reply To: Backing into a dual boot in UEFI

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: