How to: Resolve trouble between Parallels and Windows under Boot Camp

Discussion in 'Windows Guest OS Discussion' started by bulletproof, Sep 8, 2007.

  1. joevt

    joevt Kilo Poster

    Messages:
    1,203
    Are you able to boot your Mac (not Parallels) using the Boot Camp partition?

    Run the script at http://members.shaw.ca/joevt/dumpvols.sh.zip to list your partition info and post the results here so we can see if there's an issue with your partitions.

    Once your partitions are verified, you'll make a new virtual machine using one of the following methods:
    A) "New, From an install disc, continue without disc, Like a PC, Customize settings before installation, select Hard Disk 1, press [-], move to trash, press [+] new hard disk, type: Boot Camp, select disk and Windows partitions.
    B) "New, Boot Camp, Configure, select Hardware -> Hard Disk 1, select Source: your hard disk, Edit Partitions..., select partitions needed by Windows 7.
    C) Or you can edit the existing My Boot Camp configuration.
     
  2. Korvhaal

    Korvhaal

    Messages:
    5
    I am able to boot into the boot camp partition fine. However, I am noticing there isn't a system reserved partition for windows and it is on a gpt formatted HDD. I am going to run into problems later with updates like service packs, but I will deal with that down the road. I attached the results of the dump command.

    on a side..... how very un-mac to not allow the upload of an rtf file, lol.
     

    Attached Files:

  3. joevt

    joevt Kilo Poster

    Messages:
    1,203
    I think you can include rtf if you zip it first (Finder -> File -> Compress). But the best format is plain text (Text Edit -> Format -> Make Plain Text or
    Code:
    sudo ./dumpvols.sh 2>&1 | cat > dumpvols_result.txt
    Use the above command to get the state of your disks before making any changes to your partitions.

    disk0, Bay 4, "WDC WD1001FALS-00J7B0", "Big Daddy" has some code in the MBR that I haven't seen before. I don't know what it does - something about EFI, udf, and GPT. Disks that don't have legacy OS's (Windows/Linux) probably don't need MBR code. The -u option of fdisk will erase MBR code but you don't really need to.

    disk1, Bay 3, "WDC WD1002FBYS-02A6B0", "Big Momma" has some code in the MBR also. It looks like standard MBR code but I don't think it came from Windows. Not a problem.

    disk2, Bay 1, "WDC WD1002FBYS-02A6B0", "Bubba" has just an MBR - it has no GPT. Both the "System Reserved" and "Bubba" partitions have BOOTMGR in their VBR and are therefore probably bootable. The MBR is set to boot "Bubba". Are you able to select this disk in Parallels? If not, you could use iPartition or gpt fdisk to convert it from an MBR disk to a hybrid GPT/MBR disk. Converting may delete whatever is within the first blocks of the disk before the first partition (but there shouldn't be anything there) and there won't be any space for an EFI partition (which is not necessary anyway).

    disk3, Bay 2, "WDC WD3200AAKS-00L9A0" "BOOTCAMP", has a single Windows partition that has BOOTMGR in its VBR so it is probably bootable, but there is no boot code in the MBR so the disk itself will not be bootable. The MBR is set to boot the EFI partition which is wrong (the boot code in the EFI partition's VBR only displays "Non-system disk..Press any key to reboot....."). Use fdisk to change the boot partition to partition 2 (BOOTCAMP). You can boot Bubba and use Windows to add the MBR boot code for BOOTCAMP. Download EasyBCD. Run EasyBCD -> Useful Utilities -> EasyBCD Power Console. Then type
    Code:
    bootsect /nt60 X: /mbr
    where X: is the driver letter for your BOOTCAMP disk. You could also use EasyBCD to add BOOTCAMP to Bubba's list of startup options (maybe your system is already setup that way?) and vice versa. If you have one partition setup to boot another partition on a different disk then both disks would need to be added to Parallels and you should verify using EasyBCD that the BCD settings still point to the other partition correctly. It is much simpler to ensure that all disks containing bootable OS's have proper MBR code so you only have to include the one drive in Parallels. It wasn't clear in your e-mail if you were trying to boot Parallels using "Bubba" or "BOOTCAMP".

    Use the dumpvols command again (use a different output filename than before) to get the state of your disks after you've made changes to your partitions so you can compare them and make sure everything is as expected. If you have further issues, post the results (before and after) as a compressed zip file if possible.
     
  4. Korvhaal

    Korvhaal

    Messages:
    5
    Thank you for your analysis. Bubba was going to be an install but it was when I had a raid configuration. I just never got around to changing it back to gpt. After reviewing you report, I wonder if the bootsect for Win7 is on Bubba. In boot select screen I only have one disk labeled windows where before Lion (10.7) any drive formatted MBR would show up as "Windows", so anything is possible. I will use EasyBCD and see what I can do. Thank you again
     
  5. Korvhaal

    Korvhaal

    Messages:
    5
    It would appear the boot sector that is of import is located on the efi partition with Bootcamp. I changed the active partition using fdisk and I couldn't boot in to Windows 7 with boot camp. So, I set the efi partition with Bootcamp back to active.
     
  6. joevt

    joevt Kilo Poster

    Messages:
    1,203
    That doesn't seem possible. Are you saying you can boot your Mac using Boot Camp into the "BOOTCAMP" partition only if the MBR partition at block 1 (type EE) is flagged in the MBR as the boot partition?

    Block 1 is the GPT Header and doesn't contain any boot code. Are you sure it's not booting a different partition? Maybe Bubba? Maybe Bubba has a boot setting pointing to BOOTCAMP? If you use EasyBCD to edit the BCD settings, and edit the startup options so there's more than one option, and that each option says what partition they are booting to by name instead of just Windows OS version, and make it so that the BCD on Bubba is different than the one on BOOTCAMP then you can tell for sure which one you're booting into.

    My script didn't dump the contents of block 1. I made a change to the script at http://members.shaw.ca/joevt/dumpvols.sh.zip to do that. Run it with this command:
    Code:
    sudo ./dumpvols.sh 2>&1 | cat > dumpvols_result.txt
    and post the results here. Then we can see if it has any boot code.

    The GPT Header is at block 1. The GPT table starts at block 2. The EFI partition starts at block 40. The MBR partition 1 covers everything from block 1 to the last block before the BOOTCAMP partition to protect them (the GPT and any Mac OS partitions) from Windows.

    You can mount the EFI partition (block 40) in Mac OS using the following commands (change SLICE to the correct disk and partition number for the EFI partition you want to mount):
    Code:
    SLICE=disk3s1
    mkdir "/tmp/EFI"$SLICE
    mount_msdos /dev/$SLICE "/tmp/EFI"$SLICE
    
    The EFI partition (block 40) is a FAT32 partition with a volume name of "EFI" that does not contain any Windows bootable files. It may be empty or contain a file called:
    /EFI/APPLE/EXTENSIONS/Firmware.scap

    The protective partition (partition 1 in MBR type EE that points to block 1) should not be mountable in Windows because it does not point to a valid file system (block 1 is the GPT header - it's not an NTFS or FAT partition header).

    A bootable Windows partition should have the following files:
    C:\bootmgr
    C:\boot\bcd
    Do all your Windows partitions have those files? You can add them with EasyBCD.

    The first block of a bootable Windows partition has code to find and start the bootmgr program which will read the BCD and show the Boot Manager screen with the startup options listed in the BCD which you can change using EasyBCD. EasyBCD can edit or add the BCD on any Windows partition that is currently mounted in Windows.
     
  7. Korvhaal

    Korvhaal

    Messages:
    5
    Okay, so I will make this clear. I used fdisk -e /dev/rdisk2 => f 2 => q and I could not boot my Bootcamp partition. So, I changed it back to disk2s1. Whether it makes sense or not it gave me a black screen with a flashing cursor, which means it knows there is a Windows OS there, but it can't find the boot file. I now recall the System Reserved partition not being on Bubba before, so Windows 7 did put that there during the install. I wonder what it would have done if there wasn't an MBR formatted drive present. I did try including Bubba in the VM, only the System Reserved partition, but it didn't like it. It told me "No Operating System".

    Here is the requested dump file.
     

    Attached Files:

    Last edited: Aug 22, 2011
  8. joevt

    joevt Kilo Poster

    Messages:
    1,203
    Some strange caching error seems to have given you the older version of the script at http://members.shaw.ca/joevt/dumpvols.sh.zip . I think it's working now so it will return the new version (the script should have yesterday's date).

    Anyway, the .txt file you posted is much easier to read now. I sent you a private message with my e-mail address if you want to continue this discussion off forum until we figure out what's wrong.

    Before you can figure out how to boot your Boot Camp setup in Parallels, you need to figure out how it boots your Mac.

    What is the output of the following commands (this will tell us where the boot files are):
    Code:
    ls -l /Volumes/System\ Reserved /Volumes/System\ Reserved/[bB]oot
    ls -l /Volumes/Bubba /Volumes/Bubba/[bB]oot
    ls -l /Volumes/BOOTCAMP /Volumes/BOOTCAMP/[bB]ought
    
    Boot into Boot Camp, run EasyBCD and copy and paste the contents of the BCD settings here. This will tell us which drives are used. Use "Select BCD Store" to examine the BCD on your other hard disks. Use "Load System BCD" to get back to the BCD that was used to boot.

    Grab a screen shot of Disk Management (Computer -> Manage -> Storage -> Disk Management). This will tell us how Windows booted up (I think the partitions it used will be marked System for BOOTMGR, and Boot for Windows).
     
  9. designwallah

    designwallah

    Messages:
    1
    I will spend some time reading this thread backwards (it goes all the way back to Sept. 2007). It seems incredulous to me that a software at version 6 would still have this problem. I am so annoyed by the Windows activation message and by the fact that Parallels does not recognize a second Windows partition I created on the same MacBook Pro. I just use Bootcamp and have, for the moment, abandoned Parallels. Maybe v7 will be better.
     
  10. JohnHurley

    JohnHurley Bit Poster

    Messages:
    8
    can someone take a look at these dumpvol results?

    My new system is not exactly playing well with bootcamp and parallels. Pretty sure I messed it up myself.

    I started with a 2011 mbp with the base 320 gb drive. Put a large 200 gb win 7 partition on it. I think used windows backup to get a system image of the win 7 system.

    Put in a new 750 gb wd scorpio drive and installed os x 10.7.1 ( initialized drive, loaded os fom apple over the internet, then did a time machine restore ). Back into bootcamp assistant, partitioned a 350 gb space for win 7, installed win 7 ( including formatting as ntfs ), recovered win 7 system image using system restore, increased win 7 partition size.

    The system now works well between win 7 and mac os x. The mac os x system sees as candidate startup disks both operating systems as does the win 7 system thru bootcamp console.

    Parallels 7 will also see the bootcamp partition but is not happy with it and won't use it.

    I do believe that I have done some ( from the mac os x side and manipulating GUID/MBR's ( somehow thru win 7 restores etc ) ) somethings that are apparently not kosher. While my system is holding together and I can backup mac os x and win systems separately and restore the whole thing from initializing the disk to getting all the pieces back together.

    One example is I deleted thru mac os x the bootcamp partition ... and voila the whole thing went south real fast and I had to re-initialize disk, reinstall os, recover os x, put bootcamp back together and get win 7 back from system image.

    A second example is when I look at from the win 7 side how it thinks the disk is partitioned it somehow seems to show the mac os x allocation way back from the base 320 gb disk. From win 7 side it seems to have a very confused idea.

    The final example is that parallels 7 cannot deal with bootcamp partition even though mac os x sees it as a startup disk option.

    Attached is my results from dumpvols ... is my system salvageable/repairable?

    I gotta feeling that maybe I need to go all the way back to initializing disk, install mac os x, recover mac os x, setup bootcamp, and NOT USE any kind of restore of the win 7 system image from winows backup. In other words, reinstall win 7 from scratch and go thru and re install all the win 7 apps, and re-activate everything.

    In no way am I claiming that what I was doing was smart! Just trying to get my hands around some schema of backing up both mac os x and win 7.

    Any advice/hints appreciated!
     

    Attached Files:

  11. joevt

    joevt Kilo Poster

    Messages:
    1,203
    When you increased the Windows 7 partition size, did you use Mac or Windows to do it? You should not resize partitions in Windows.

    dumpvols failed to get the GPT information so it's hard to see how out of sync the MBR is.
    Code:
    sudo gpt -r show disk1
    
    Which partitions are visible (with the correct files/folders .etc) in the Mac OS X Finder?

    Which partitions are visible (with the correct files/folders .etc) in Windows?

    Maybe gpt fdisk (gdisk) can fix your GPT so that the above gpt command will work.
    http://www.rodsbooks.com/gdisk/
    https://sourceforge.net/projects/gptfdisk/

    What does gdisk show?
    Code:
    sudo gdisk /dev/disk0
    
    Press ? for a list of commands, p to print the gpt info.
     
  12. JohnHurley

    JohnHurley Bit Poster

    Messages:
    8
    Well initially on the new bigger drive I created a 350 gig bootcamp partition. On the windows install I think recovered the 200 gb system image ... then eventually increased the 200 gb system thru windows utility. I think I even skipped initially formatting the new 350 gb partition as NTFS before jumping into the system recovery from win 7 backup image.

    That drive has been pulled for the moment and I may get back to it.

    Man there is a good learning curve when you start using mac os x and bootcamp and then jump right into moving from one drive to another! Nothing wrong with shooting yourself in the foot a couple of times on a non critical system eh?

    So I am trying to figure out what the best hybrid approach is for backing up a mac os x and bootcamp system. Looks like time machine an easy winner on the mac os x side.

    How about for the bootcamp partition? What are people using and recommending for backing that up?

    Is it safe to use win 7 backup and recovery ( create system image ) and then restore that image back on top of the original source of the backup? Or does even doing that kind of recovery cause windows to somehow step on the feet of ( the magic behind GUID/EFI stuff ? ) what needs to be left alone?
     
  13. joevt

    joevt Kilo Poster

    Messages:
    1,203
    I don't know how win 7 backup and recovery works. If it doesn't change partition info then it should be ok.

    The most basic restriction is that usable partitions in the GPT and MBR should not overlap each other.

    Generally, partitions in the MBR should match partitions in the GPT. Use the fdisk command to see the MBR partitions. Use the gpt or gdisk commands to see the GPT partitions.

    The EE type partition in the MBR (partition 1) is supposed to overlap the GPT and the EFI partition - but that's ok since the EE type partition is not a usable partition in Windows.

    The problem with doing partitioning in Windows is that Windows does not know about the GPT. This means any partition in the GPT that is not covered by the MBR may be overwritten. Also, the GPT does not get updated when Windows changes the partitions in the MBR.
     
  14. TheophaneW

    TheophaneW

    Messages:
    4
    Hey guys,

    I am having a frustrating problem with parallels 7 / win 7. In simple terms, I can boot my win 7 boot camp partition just fine (it's on the internal hard disk of my iMac), but I cannot boot it from parallels (MISSING OPERATING SYSTEM message). I should note that I have a fairly unusual configuration: win7 is on the internal hard disk, while mac os loads from an external firewire disk.

    I tried the usual - using windows 7 to repair startup (does not see the disk, though if i start in command line my disk is found at D: ), playing with frisk to make sure the win7 partition was flagged, and so on.
     

    Attached Files:

  15. joevt

    joevt Kilo Poster

    Messages:
    1,203
    TheophaneW, you have two NTFS partitions on /dev/disk0: "System Reserved" and "BOOTCAMP". Which partition has the Windows folder and which partition has the boot files (?:\bootmgr and ?:\Boot\*)?

    The hard disk's MBR is currently set to boot using the "System Reserved" partition which means it must have the boot files. Those boot files might be set to boot Windows from "BOOTCAMP". If that's the case, then it means that you need to include both partitions in the Parallels virtual machine's virtual hard disk settings by clicking the "Edit Partitions..." button and selecting both partitions. Any partition that is not included in the virtual hard disk will be read as all zeros (unformatted) by the virtual machine.

    You can use EasyBCD to create boot files on the BOOTCAMP partition so that you don't need to include the System Reserved partition in Parallels. If you do that, then you have to use "sudo fdisk -e /dev/disk0" on your hard disk to set the "BOOTCAMP" partition as the boot partition (using "f 2" command in fdisk) before creating the virtual hard disk or you can use "fdisk -e yourvirtualmachine.pvm/virtualharddiskname.hdd/PhysicalMbr.hds" to edit the virtual hard disk after it's created (but you have to do that again if you recreate the virtual hard disk again).

    You have many disks on your Mac. If you restart your Mac, it's possible the disk numbers might be renumbered differently and you'll have to reselect the correct drive in the virtual hard disk's settings. For example, my virtual hard disk setting might say "SAMSUNG (disk3)" but my SAMSUNG disk is actually currently disk2 because the disks got renumbered after restarting. You can tell it's wrong because SAMSUNG (disk3) is the last item in the menu and the dialog doesn't indicate that it's a Boot Camp disk or what size it is. You can pick the correct disk by selecting the SAMSUNG option that appears earlier in the menu. That is difficult if you happen to have more than one disk from the same manufacturer. In that case you would use "diskutil list" or "Disk Utility.app" to find the correct disk.

    I've mentioned some of these problems before. Parallels needs better disk support:
    1) ability to select boot partition in virtual MBR
    2) disk identification that doesn't use disk device number
    3) allow selecting non-MBR partitions (for virtualizing Mac OS)
    4) don't require Disk Utility to figure out which partitions are on which disk - list them in the menu. (hierarchical menu or indented listing)
    5) don't unnecesarily unmount partitions until the user attempts to start the virtual machine
     
  16. ChrisHam

    ChrisHam

    Messages:
    1
    "PRL_ERR_DISK_GPT_MBR_NOT_EQUAL (0x80021065)" Errorfix

    @joevt & @johnhurley & BrockF

    Sorry for my english, i come from germany & english is not my native language ...

    I have a MacBookPro 2009 with OSX & Windows 7 inside my BootCamp running on a 640mb HDD. Before i had Parallels Desktop 6 running, now i upgraded (for Full-Lion Support) for Desktop 7.

    Everything worked out fine on Desktop 6 for some time, until i did this Upgrade. New Desktop 7 came up to me with the wellknown "PRL_ERR_DISK_GPT_MBR_NOT_EQUAL (0x80021065)" Error ...

    Now i got to read a lot, get to know about GUID - GPT and MBR Harddiskpartioning and i remembered, i played with Windows 7 and changed size of the windows-partition before and changed it back to the old size.

    Now the size and the uuid of the mbr-partition no more match 100% to the gpt-table, bootcamp didnt care and dual booting was still possible, but desktop 7 (and 6 afterwards, i tried downgrading) did (for dualrunning reason) and i have this big problem no more bootcamp windows7 inside osx ...

    Hmm, what u can do for fix ... first u can try backup your windows-partition with acronisbackup, erase bootcamp, make it new, and play back the backup & desktop 7 recognises the windows partition again. Problem, i´m not home now, backup/recover takes long time & the bootcamp direct booting still works great.

    Now i had to find a much better solution ... and here it is ...

    i downloaded the reFIt package from here

    http://refit.sourceforge.net/#download

    After burning the iso file for a cdrom (used toast-it or the build-in osx programm), booted from the cdrom (press alt while booting), when i have the reFIt menue, i choose the Partitiontool (which starts the gpt-sync included inside reFIt), and gpt-sync posted my GPT-Tables and the MBR-Tables, showed me a difference in the MBR-Table and prompted, if it can fix the lag ...

    After prompting "Yes", gpt-sync got finished, said it fixed the lag, i rebooted my MBP, started Desktop 7 and .... No more "PRL_ERR_DISK_GPT_MBR_NOT_EQUAL (0x80021065)"-Error ... YES. That was it.

    My repartitioning inside Win7 caused this error and gpt-sync inside reFIt-package "synced" it without data-loss. GREAT. No longtime backup/recover, and my Desktop 7 now works great again on Windows 7 Bootcamp ...

    What i learned? Never resize a GPT-Volume inside Windows7, after u have a lot of trouble ... :)

    Probably u can try this solution on your systems with the same error and succeed, too.

    Cheers,

    ChrisHam (very happy again)
     
  17. joevt

    joevt Kilo Poster

    Messages:
    1,203
    rEFIt assumes your GPT is more correct than your MBR but since the last modification you made to your partitions was done by Windows, then this assumption might not be 100% correct. It's generally safe if you only shrink the partition in Windows but in that case your disk would have unused space not represented by the GPT (or by the MBR after syncing).

    rEFIt only syncs the first three partitions. If you have more partitions then it might not put the partitions you want in the MBR.

    You can manually fix your MBR or GPT without rebooting using command line tools such as fdisk (for MBR), gpt (for GPT), or gdisk (for GPT and syncing selected partitions to MBR).

    A utility like iPartition can resize partitions including Windows partitions and it will keep your MBR and GPT in sync at the same time. It can also move partitions around if you're increasing the size of a partition and there's not enough free space before the next partition.

    Disk Utility.app can get confused by some hybrid MBR/GPT partitioned disks (it draws the Partition Layout incorrectly) so I use iPartition instead.
     
  18. Cooper

    Cooper

    Messages:
    2
    Two Physical Disks - OSX & Windows 7

    BootCamp runs my 64 Bit Windows 7 install from an internal 256GB flash drive inside the MacPro with 16GB, Xeon's like it was born there.

    Parallels Desktop 7 for Mac displays "Use Windows from Boot Camp" in the "New Virtual Machine" window like it's going to let that happen . Of course, it won't.

    Instead I get:
    ____________________

    Failed to coonfigure the Boot Camp partition's hard disk. A disk configuration error has occured. Make sure that you have read/write permissions for the disk.

    More details...

    Error: PRL_ERR_DISK_GPT_MBR_NOT_EQUAL (0x80021065)
    Path: '/Users/bonnie/Documents/Parallels/My Boot Camp.pvm/OCZ-VERTEX3 (disk3).hdd'
    ____________________


    Since MBR and GPT's are kept on physically apart that this is causing the error. Or am I stupid and there really is a read/write issue?

    I've scrounged this forum and the interwebs and can't believe there were no other mentions...or am I just missing it?

    Thanks in advance for *any* help, even if it just points my short sight to the correct thread.
     
  19. joevt

    joevt Kilo Poster

    Messages:
    1,203
    Your disk uses a GUID Partition Map (GPT). Mac OS X uses this for it's partitions.

    Windows only boots from disks using the MBR partition map and only knows about partitions that are listed in the MBR.

    Your disk boots using Boot Camp, which means it is a GPT/MBR hybrid.

    The first partition of an MBR is type EE (EFI Protective partition) and covers the GPT table and the invisible EFI partition so that Windows will not overwrite them.

    The other 3 partition entries in the MBR must be blank or have the same start and size as a partition in the GPT.

    Parallels doesn't like your disk because some partitions in the MBR do not match the GPT. The MBR doesn't match because you probably used Windows to change some partitions (remember, Windows doesn't know about the GPT so the GPT will not get updated when it makes changes to the MBR).

    The fdisk command will list the partitions in the MBR. The gpt command will list the partitions in the GPT.
    Code:
    diskutil list disk0
    sudo fdisk /dev/rdisk0
    sudo gpt -r show -l disk0
    
     
  20. Cooper

    Cooper

    Messages:
    2
    I just got a great answer and description of the problem and was able to read back through the thread with a much better background, Thanks for that!

    I'm not certain which solution to use. Acronis partion backup and restore? Syncing the tables with tools for GPT and MBR? Is one method more reliable than another?

    I think I also need to add that the OSX disk has been left as it was from Apple. It lives all alone on the original 1TB drive as shipped.

    The BootCamp disk has never had partion work done after the initial installation. There *are* two 2TB data disks that have had partion "changes" - specifically one is an NTFS mount inside an empty folder of another to fake out a 4TB data disk. Is this enough to cause the two tables to be out of sync?

    Again thanks. It's nice to see an active board for Parallels.
     
    Last edited: Sep 28, 2011

Share This Page