3-Partitions scheme with Boot Camp and Parallels Desktop

Discussion in 'Installation and Configuration of Parallels Desktop' started by Angel Garcia, Mar 17, 2009.

  1. Angel Garcia

    Angel Garcia Member

    Messages:
    23
    The Boot Camp Assistant included in Mac OSX (Leopard) only allows to have either a single Mac partition or a 2-partition scheme MacOSX / Windows. Some people (me included) prefers to have their data in a separate, dedicated partition rather than using the same partition as the OS. Here I explain how to achieve it.

    1- Use the Boot Camp Assistant for creating a standard Boot Camp configuration. The size for the Windows partition should be the neccessary for Windows and your Windows Applications only, as your data will be stored in a different partition. Follow the Assistant until you get a Windows installed and working via BootCamp.

    NOTE: These instrucctions assume that you've chosen NTFS file format when asked by the Windows installer.

    2- Use the WinClone application for creating an image file of the Windows partition. WinClone lets you select the partition and will store it in a single file that can be restored anytime. This is a MANDATORY step, even if you have some other way for creating backup files / images. You'll see why later.

    3- In Mac OS open the Disk Utility. Resize the Macintosh HD partition in order to leave an emtpy space between this partition and the Windows partition. This empty space will hold your Data partition, so leave as much space as you want for it. Then create a new Partition in the empty space.

    Detailed steps:

    - Open Disk Utility
    - Select your hard disk from the left list.
    - Click Partitions
    - Click the first partition (Macintosh HD). Drag its lower-right corner in order to leave an empty space.
    - Click the [+] button below the partition schema. A new partition will be created filling the empty space.
    - Click Apply.

    4- Reboot your Mac. This is neccesary so each partition could receive their proper id acording to their order in the disk.

    5- Format the new partition so it can be accessed from Windows (NTFS or FAT32).

    5A- If you want FAT32 in your Data partition:

    - Open Disk Utility
    - Select the second partition from the left list (the partition directly under "Macintosh HD").
    - Click Erase
    - Select "MS-DOS (FAT)" as volume format.
    - Name it "Data"
    - Click Erase.

    5B- If you want NTFS in your Data partition:

    You need to download and install MacFUSE, then NTFS-3G for Mac (ublio version recommended). Both tools are painless to install and can be easily removed later if you decide not to use NTFS.

    Once installed, the NTFS file system is added to the list of formats for erasing a partition in Disk Utility. However it cannot be used directly here because NTFS-3G doesn't have permissions, and it seems not to be clever enough for requesting your password.

    If you have followed the previous steps then the new partition has the identifier disk0s3. You can verify that by typing "diskutil list" in Terminal. So in order to format it as NTFS open Terminal and type:

    Code:
    sudo diskutil eraseVolume "NTFS-3G" Data /dev/disk0s3
    Enter your password, then you'll get our Data partition formatted as NTFS.

    6- Use WinClone for restoring the Windows image file created at step 2.

    Why, if you haven't changed anything? Because as the partition scheme has changed, Windows no longer boots in Boot Camp (it may even have disappeared from the Boot menu). After restoring the image file, WinClone adjusts and fixes *everything* so Windows will boot again perfectly. The restoration itself is pointless, but I haven't found any better/easier way for getting Windows back to work.

    Detailed steps:

    - Open WinClone
    - Click Restore
    - Click "Select Image", then choose the file created at step 2.
    - Select the Windows partition at Destination (/dev/disk0s4).
    - Click the lower Restore button.

    NOTE (FAT32 only): If you have formated your Data partition as FAT32, then you'd better delete and re-create it again now. For some reason, WinClone (version 2.0.10) marks both Data and Windows partitions as NTFS in the partition table. This doesn't seem to have any effect, but I believe it's better to have them right (and it's easy to do):

    - Open Disk Utility
    - Select the hard disk, then click Partitions.
    - Delete the Data partition [-] then recreate it [+]. Click Apply.
    - Restart Disk Utility, so the new partition appears in the left list.
    - Select the new partition in the left list, then click Erase
    - Choose FAT32 as volume format, name it Data, and click Erase.
    - Reboot your Mac.


    Your Data partition is now ready and can be used from both Mac OSX and Windows. You could also boot your Windows from Parallels Desktop using a Boot Camp based virtual machine, but by default it won't detect the Data volume properly. You can fix that by following these instructions (Creating custom Boot Camp configurations in Parallels Desktop 4).
     
    Last edited: Mar 17, 2009
  2. Rick Smith

    Rick Smith Bit poster

    Messages:
    7
    Major mistake

    That i made. I used the sudo command that was provided here and erased the volume and forgot to backup my boot camp partition copy. now i am in a messed up situation. PLEASE IF ANYONE COULD HELP I WOULD APPRECIATE IT.
     
  3. Angel Garcia

    Angel Garcia Member

    Messages:
    23
    If you have followed all the instructions of the article, then you should have a backup made with WinClone. Just open WinClone, locate the image file, and then restore it at the BootCamp partition. If Winclone says that there's no Windows partition or doesn't let you restore the image for any other reason, then open DiskUtil and perform a disk test on all units. After the test Winclone should let you restore the image file.

    If you haven't used Winclone and have no image file, then at this point I'd recommend you:
    - Do not touch anything on your just-formatted volume. No tests, no repairs, no writting any data...
    - Look for a commercial data recovery software for mac (Google). Most of these softwares have trial versions that let you know whether your data could be recovered or not.

    As the volume haven't been formatted at in "full-erase" way, then your data is probably still there. The possibility of restoring it is up to the data recovery software.
     
  4. Rick Smith

    Rick Smith Bit poster

    Messages:
    7
    BootCamp iSSUE

    Thanks for the quick reply. I will try what you said.
     
  5. megavolt17

    megavolt17 Product Expert

    Messages:
    367
    I was able to make a 3 partition system with a Boot Camp partition, but Parallels 5 did not see it until I removed 1 of the partitions. Can you get Parallels 5 to boot with your configuration? I usually do work using Parallels, but for games like Gears of War I get better frame rate using Boot Camp. Guess I want it all!
     
  6. megavolt17

    megavolt17 Product Expert

    Messages:
    367
    How about Parallels 6? There is supposed to be more support for multiple hard drives, how about multiple partitions? I can use iPartition or TechTools to make an emergency boot partition with minimum system software, etc. When I do this I can boot the Mac to the regular partition, the eDrive partition or the Boot Camp partition. Parallels 6 does not seem to even notice the Boot Camp partition when configured this way.

    Is a 3 partition Boot Camp partition possible to use with Parallels 6?
     
  7. joevt

    joevt Forum Maven

    Messages:
    1,229
  8. GeoffreyZ

    GeoffreyZ Member

    Messages:
    36
    Boot Camp Multiple Partitions

    Hi joevt

    Could you please elaborate on your comment regarding selection of the proper Boot Camp partition when running Parallels? I have Parallels 6 installed but receive an error message that the hard disk cannot be configured whenever I attempt to create a virtual machine from the Boot Camp partition. I have a separate, internal SSD where the Windows 7 x64 system is located, divided into two partitions, both of which are bootable (one is a recovery partition which allows me to perform a clean installation in the other partition without the need for a DVD drive). If I remove the recovery partition then Parallels works just fine, but I'd like to keep it. Even if I try to manually select the Windows partition (this option is given me when I enter the hard disk options in the hardware tab), I still receive the error message. If I try to start up the virtual machine in parallels, an error message states that no SCSI controller is present.
    I've already posted this issue with Technical Support but they haven't been able to provide an answer, so I'd like to ensure that the GPT and MBR partitions are correctly identified. I've downloaded the tool you provided the link to but am at a bit of a loss as to how to proceed.
    Thanks for your help!

    Here are the results of my diskutil list command in Terminal (Perhaps FDisk_Partition_Scheme is causing the problem?)
     

    Attached Files:

    Last edited: Oct 26, 2010
  9. joevt

    joevt Forum Maven

    Messages:
    1,229
    The diskutil output says that your disk is not GPT formatted. It just has an MBR. Use the following commands to make sure:
    Code:
    diskutil list /dev/disk0
    sudo gpt -r show -l /dev/disk0
    sudo fdisk /dev/rdisk0
    
    The first will repeat the output you gave already just for the first disk.
    The second will dump the GPT table if it exists (it probably doesn't).
    The second dumps the MBR. It will give some info that diskutil does not, such as which partition is selected as the active (boot) partition otherwise known as the system partition in Windows.

    You say both partitions are bootable. How do you choose which partition you boot? rEFIt? Or does one partition boot, and you select either partition using the BOOTMGR menu? Do both partitions contain BOOTMGR (along with the BOOT folder)?

    Only one partition can be the active partition. rEFIt automatically sets the active partition when you select a partition to boot. The select partitions need boot code in the first blocks of the partition. This boot code loads the BOOTMGR.

    Parallels allows you to select which partitions will be included on the virtual hard disk (unselected partitions will be unreadable) but it is missing a feature to select which partition is the active partition. But there are a couple work arounds:
    http://forum.parallels.com/showthread.php?t=95585

    I think what you want to do is have your virtual machine include both partitions and have the boot menu on the active partition have a selection for each partition. EasyBCD is the best way to modify the boot menu. For this virtual machine, you might want the recovery partition as the active partition in case you want to nuke the other partition.

    You could have a second virtual machine which has only the other partition selected. You'll have to make sure it is the active partition and has the boot files on it.

    Maybe instead of creating two virtual machines (.pvm), you could create two virtual hard disks (.hdd) stored outside the .pvm. Each virtual hard disk would have a different set of selected Boot Camp partitions. Then you would have one virtual machine and select which virtual hard disk you want to attach to it.
     
  10. GeoffreyZ

    GeoffreyZ Member

    Messages:
    36
    Wow, thanks for the quick reply!

    I'll be glad to take a look at your suggestion tonight and will let you know if I'm successful.

    Here's what my EasyBCD currently shows: (see attached image)


    When I boot into Windows I'm given the option to select between "Windows 7" or "Recovery Environment". The bootmgr file is located in the Win7x64 recovery partition, which is listed as "System, Active, Primary" in Computer Management. The Windows 7 partition is listed as "Boot, Crash Dump, Primary".
    This configuration is ideal for me because I can perform clean installations directly from the recovery partition without the need for an external USB DVD Drive, since I've replaced my OptiBay DVD with the SSD and have no use for it.

    Edit: The GPT table doesn't exist. Do I need one for Parallels to be able to configure or access the SSD? I tried to create one via iPartition but was warned that all data would be lost!
     

    Attached Files:

    Last edited: Oct 26, 2010
  11. joevt

    joevt Forum Maven

    Messages:
    1,229
    As I understand it (tell me if I get anything wrong):

    C: is the big partition (247 GB). It is the Boot partition which means it has your current Windows installation (winload.exe, etc).

    W: is the small partition (8.1 GB). It is the System partition which means it contains the boot files (BOOTMGR and BOOT folder which contains the bcd). It is the Active partition, which means it has boot code in the first sectors of the partition to load the boot files. The boot menu in the bcd contains two entries, one for drive C:, and another for a Windows image stored on drive W:.

    Both are Primary partitions, which means they both are listed in the 4 partition entries of the MBR and not as extended partitions elsewhere.

    I don't see a reason why Parallels can't work with the above setup. I don't know if Parallels Desktop doesn't support disks that don't have GPT since I don't have such a disk to test. I don't know if Parallels Desktop will boot the .wim.

    iPartition should be able to convert it from MBR to MBR/GPT hybrid for you. Did you try the "Change Partition Scheme" option (select GUID)? It may need to shrink and move partitions to create space for the GPT. It will tell you what it needs to do in the Pending Operations window. It won't do it until you click Go. How much disk space is free on W: and C:?

    Anyway, before you try that, post here the results of the gpt and fdisk commands.
     
  12. GeoffreyZ

    GeoffreyZ Member

    Messages:
    36
    OK, I got it to work and am now up and running in Parallels.
    Here's what I did:
    1. Backed up my Windows installation with ShadowProtect
    2. In Snow Leopard, ran the Boot Camp utility to create a single Windows FAT32 partition on the SSD, deleting all data.
    3. Restored the Windows 7 system on the single partition using the ShadowProtect recovery DVD.
    4. Back in Snow Leopard, installed Parallels and set up the virtual machine via the Boot Camp partition.
    5. Still in Snow Leopard, used Coriolis iPartition to create a second partition in the SSD of 12 GB (Microsoft FAT NTFS formatted).
    6. Rebooted in Windows to make sure everything was OK. Copied the Windows 7 x64 Ultimate installation files to the 12 GB partition. Then with EasyBCD I added a second boot option, copying the Boot.wim image from the smaller partition and naming it "Windows Recovery Environment". Both partitions now contain their own Bootmgr files and Boot folders.
    7. Back in Snow Leopard, the second Windows partition wasn't visible. Restarted Parallels and was given the option to boot into either partition without issue just like on the Windows side.

    Everything good to go! Looks like the GPT table was the issue, as well as the initial dual partitions. Once the Parallels virtual machine was linked to the partition I wanted to boot, adding a second didn't cause any trouble. When running the Parallels virtual machine I get an occasional error message that the hard disk cannot be accessed but this hasn't yet been an inhibitor.

    Thanks for all your help and I'm glad to be back on line again!
     
    Last edited: Oct 27, 2010
  13. joevt

    joevt Forum Maven

    Messages:
    1,229
    You mean the second partition isn't visible in the Finder even when the virtual machine is not running? Post the results of diskutil, fdisk, and gpt here so we can figure out why this is happening.

    Did both boot options actually work in Parallels?

    This problem with Boot Camp partitions is reported in other threads by many people. I don't remember experiencing it myself though. Perhaps you can use the "Report a Problem..." option in the help menu as soon as it happens. Do a search in the forums for keywords unable access hard disk for posts newer than 3 months old. Can you post a screen shot so we can see the exact wording of the error message?
     
  14. GeoffreyZ

    GeoffreyZ Member

    Messages:
    36
    Here are my terminal command results:

    Bogus map, suspicious MBR...doesn't look good!

    I cannot boot from the Windows Recovery Environment in Parallels, but can boot from both in Boot Camp.

    The next time I receive the error message that the hard drive could not be accessed I'll post a copy here.

    Thanks again!
     

    Attached Files:

  15. GeoffreyZ

    GeoffreyZ Member

    Messages:
    36
    Parallels Error Message

    Here's the error message I just received:
     

    Attached Files:

  16. joevt

    joevt Forum Maven

    Messages:
    1,229
    I'm not sure why the gpt command failed. Make sure Parallels Desktop insn't running, Then try the following commands instead:
    Code:
    sudo gpt -r show -l disk0
    sudo gpt -r show disk0
    
    Also take a look at http://forum.parallels.com/showthread.php?t=103653.
    Use the gdisk -l command mentioned in that thread (post #7) and post the results here. Also, post it as text as described in that thread. Text makes working with the info much easier (searching and copy/paste).

    Maybe the bogus map problem has something to do with the "
    Unable to access Hard Disk 1
    An error occurred when accessing the hard disk. Error ID: Undefined error: 0.
    " error message...
     
  17. GeoffreyZ

    GeoffreyZ Member

    Messages:
    36
    Here's the result of the gdisk command (Finally got to use this program!):

    Code:
     Geoffrey-Zimmers-MacBook-Pro:~ Geoffrey$ sudo gdisk -l /dev/disk0
    Password:
    GPT fdisk (gdisk) version 0.6.13
    
    Partition table scan:
      MBR: hybrid
      BSD: not present
      APM: not present
      GPT: present
    
    Found valid GPT with hybrid MBR; using GPT.
    Disk /dev/disk0: 500118192 sectors, 238.5 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): 23EA0BCE-4DC6-4884-9782-A1BE3A07F3C9
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 500118158
    Partitions will be aligned on 1-sector boundaries
    Total free space is 2019 sectors (1009.5 KiB)
    
    Number  Start (sector)    End (sector)  Size       Code  Name
       1              40          409639   200.0 MiB   EF00  EFI System Partition
       2          411648       474938552   226.3 GiB   0700  Windows
       3       474938553       500118153   12.0 GiB    0700  Win7x64
    Geoffrey-Zimmers-MacBook-Pro:~ Geoffrey$ 
     
  18. GeoffreyZ

    GeoffreyZ Member

    Messages:
    36
    Here are the results of the other commands you requested:

    Code:
    Geoffrey-Zimmers-MacBook-Pro:~ Geoffrey$ sudo gpt -r show -l disk0
    Password:
    gpt show: disk0: Suspicious MBR at sector 0
    gpt show: error: bogus map
    gpt show: unable to open device 'disk0': No such file or directory
    Geoffrey-Zimmers-MacBook-Pro:~ Geoffrey$ sudo gpt -r show disk0
    gpt show: disk0: Suspicious MBR at sector 0
    gpt show: error: bogus map
    gpt show: unable to open device 'disk0': No such file or directory
    Geoffrey-Zimmers-MacBook-Pro:~ Geoffrey$ 
    
     
  19. joevt

    joevt Forum Maven

    Messages:
    1,229
    The partitions listed in the gpt (which the Finder uses) as listed by gdisk do not match the partitions listed in the MBR (which Windows uses) as listed by fdisk.

    Since the Windows partitions are bootable using Boot Camp, we can assume that the partitions in the MBR are correct and the partitions in the GPT are wrong (also because the Finder won't show those partitions).

    Therefore, you need to modify the 2nd and 3rd GPT partitions to match the 2nd and 3rd MBR partitions. Follow the instructions in post #6 in the thread at http://forum.parallels.com/showthread.php?p=426817.
     
  20. GeoffreyZ

    GeoffreyZ Member

    Messages:
    36
    I succeeded in modifying the partition table with the GPT commands, which allowed me to see both Windows partitions in Finder. Unfortunately, the Windows SSD is no longer bootable. The fdisk command shows only one recognized sector (the larger one), with both the EFI and Win7x64 partitions having disappeared. Not sure why that happened since I only modified the GPT table. So I'm going to recreate a single Windows FAT32 partition using Boot Camp utility and start over.
     

Share This Page