Results 1 to 5 of 5
  1. #1
    Super Moderator bbearren's Avatar
    Join Date
    Dec 2009
    Location
    Polk County, Florida
    Posts
    2,362
    Thanks
    14
    Thanked 234 Times in 187 Posts

    Backing into a dual boot in UEFI

    As I posted previously,
    Quote Originally Posted by bbearren View Post
    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.
    Create a new drive image before making system changes, in case you need to start over!

    "Let them that don't want it have memories of not gettin' any." "Gratitude is riches and complaint is poverty and the worst I ever had was wonderful." Brother Dave Gardner "Experience is what you get when you're looking for something else." Sir Thomas Robert Deware. "The problem is not the problem. The problem is your attitude about the problem. Do you understand?" Captain Jack Sparrow.
    Unleash Windows

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    4 Star Lounger
    Join Date
    Dec 2009
    Location
    New Hampshire USA
    Posts
    424
    Thanks
    12
    Thanked 36 Times in 33 Posts
    Quote Originally Posted by bbearren View Post
    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 HKLM\System\MountedDevices 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).

  4. #3
    Super Moderator bbearren's Avatar
    Join Date
    Dec 2009
    Location
    Polk County, Florida
    Posts
    2,362
    Thanks
    14
    Thanked 234 Times in 187 Posts
    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. HKLM\System\MountedDevices 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.
    Create a new drive image before making system changes, in case you need to start over!

    "Let them that don't want it have memories of not gettin' any." "Gratitude is riches and complaint is poverty and the worst I ever had was wonderful." Brother Dave Gardner "Experience is what you get when you're looking for something else." Sir Thomas Robert Deware. "The problem is not the problem. The problem is your attitude about the problem. Do you understand?" Captain Jack Sparrow.
    Unleash Windows

  5. #4
    4 Star Lounger
    Join Date
    Dec 2009
    Location
    New Hampshire USA
    Posts
    424
    Thanks
    12
    Thanked 36 Times in 33 Posts
    My thought was that when Win 7 partially loaded in the GPT environment it might have added entries for the GPT partitions into HKLM\System\MountedDevices 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).

  6. #5
    Super Moderator bbearren's Avatar
    Join Date
    Dec 2009
    Location
    Polk County, Florida
    Posts
    2,362
    Thanks
    14
    Thanked 234 Times in 187 Posts
    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.
    Last edited by bbearren; 2013-02-06 at 19:34. Reason: grammer
    Create a new drive image before making system changes, in case you need to start over!

    "Let them that don't want it have memories of not gettin' any." "Gratitude is riches and complaint is poverty and the worst I ever had was wonderful." Brother Dave Gardner "Experience is what you get when you're looking for something else." Sir Thomas Robert Deware. "The problem is not the problem. The problem is your attitude about the problem. Do you understand?" Captain Jack Sparrow.
    Unleash Windows

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •