Contribute
Register

Mavericks & Windows 8 on same drive without erasing

Status
Not open for further replies.
4k doesn't seem to be relevant - tried with an older drive using the Windows tool to format and chose default. Results are the same.

I think I found the problem, though. While in disk utility I tried selecting the drive and using the repair tool. In the detail page it said the EFI partition was too small and it could not be changed. OK, so went and formatted the drive with OS X disk utility, 1 partition and looked at the drive with diskutil list. EFI partition for OS X is 209.7Mb. Windows is 100Mb View attachment 95326 . So, experimenting a bit, I formatted the drive 1 partition. Rebooted with the Win7 install media and this time did not delete the EFI partition created by OS X disk utility. Chose to let Win7 create its partitions default single partition for the drive and Win7 was happy with it and installed with no problem.
Used Win7 disk management tool to shrink the single partition, created a Simple Volume and formatted it NTFS, default and rebooted to UniBeast. OS X installed without a single problem after erasing the partition using OS X Extended (Journaled) format.

Conclusion? Is it just the EFI partition size OS X doesn't like with older versions of Windows installed UEFI?

It is definitely something that it doesn't like about the EFI partition. I was able to partition in Windows but had to use diskpart at the command line before running the Windows installer.

The process went like this:
- boot Windows installer USB
- at first screen press Shift+F10 to get command prompt
- type: diskpart
- type: list disk (to you're certain on the disk you're working with, in my case confirms disk 0)
- type: select disk 0
- type: clean (don't blame me if you don't know what this does :)
- type: convert gpt
- type: create partition efi size=200
- type: format quick fs=fat32 label="EFI"
- type: create partition msr size=128
- type: exit
- type: exit

Now you can continue with the Windows Installer, and install to unallocated space (via Custom).

If you go into Disk Utility after installing Windows with this setup, you'll find it likes the EFI setup.

Obviously, the above doesn't help someone with a similar setup from an OEM, but it does allow a fresh install of Windows UEFI first.

Next up: Determine if there is a way to fix the broken situation after a default fresh install... Stay tuned...
 
It is definitely something that it doesn't like about the EFI partition. I was able to partition in Windows but had to use diskpart at the command line before running the Windows installer.

The process went like this:
- boot Windows installer USB
- at first screen press Shift+F10 to get command prompt
- type: diskpart
- type: list disk (to you're certain on the disk you're working with, in my case confirms disk 0)
- type: select disk 0
- type: clean (don't blame me if you don't know what this does :)
- type: convert gpt
- type: create partition efi size=200
- type: format quick fs=fat32 label="EFI"
- type: create partition msr size=128
- type: exit
- type: exit

Now you can continue with the Windows Installer, and install to unallocated space (via Custom).

If you go into Disk Utility after installing Windows with this setup, you'll find it likes the EFI setup.

Obviously, the above doesn't help someone with a similar setup from an OEM, but it does allow a fresh install of Windows UEFI first.

Next up: Determine if there is a way to fix the broken situation after a default fresh install... Stay tuned...

This works fine if you do your research and find it on the Windows forums. For someone who just gets the install DVD and does a default install using the DVD to boot and format it seems there is a problem with the Windows installer. Just did a fresh install of Win8 and checked - the partitioning is:

disk0s1 = utility partition Windows RE tools = 314.6 Mb
disk0s2 = system partition = EFI = 104.9 Mb (same as Win7)
disk0s3 = MS Reserved = 134.2 Mb
disk0s4 = MS Basic Data = 255Gb
disk0s5 = utility partition Windows Recovery = 367.0 Mb

So, here again, the EFI partition is too small and an attempt to shrink the basic data partition to make room for OS X and erase the partition in disk utility fails.

Only way to get a large enough EFI partition is to manually format with the command line tools. Do OEM computer manufacturers make the EFI larger for some reason?
 
This works fine if you do your research and find it on the Windows forums. For someone who just gets the install DVD and does a default install using the DVD to boot and format it seems there is a problem with the Windows installer. Just did a fresh install of Win8 and checked - the partitioning is:

disk0s1 = utility partition Windows RE tools = 314.6 Mb
disk0s2 = system partition = EFI = 104.9 Mb (same as Win7)
disk0s3 = MS Reserved = 134.2 Mb
disk0s4 = MS Basic Data = 255Gb
disk0s5 = utility partition Windows Recovery = 367.0 Mb

So, here again, the EFI partition is too small and an attempt to shrink the basic data partition to make room for OS X and erase the partition in disk utility fails.

Only way to get a large enough EFI partition is to manually format with the command line tools. Do OEM computer manufacturers make the EFI larger for some reason?

My Lenovo came with a ~270MB EFI partition. OS X still doesn't like it much (Verify complains about not having an EFI partition) but I was still able to install.

I think you're right about the size.

I did a default install of Win81. It created the ~300MB Recovery partition, ~100MB EFI, 128MB MSR, and main partition in the remainder. Of course this config causes problems for OS X as it evidently demands a larger EFI partition. After installing Windows, I decided to see if I could fix it.

Since the Recovery partition is not really needed, I sacrificed it.

Goes something like this (from memory):
- boot Windows installer USB
- Shift+F10 for recovery command line
- type: diskpart
- type: list disk (verify disk 0)
- type: select disk 0
- type: list part (you should see the four partitions)
- type: select part 2 (part 2 is 99/100 EFI part)
- type: assign
- type: list vol (to find out the drive letter assigned to EFI/main volume, in my case E: and C: respectively)
- Shift+F10 for another command prompt
- type: robocopy e:\efi c:\efi.bak /mir
- switch back to original command prompt (the one running diskpart)
- type: select part 1
- type: delete part override
- type: select part 2
- type: delete part override
- type: create part efi size=200 (could be bigger)
- type: format quick fs=fat32 label="EFI"
- type: assign
- type: list vol (to find out new drive letter, in my case F: )
- switch back to other command prompt window (the one just running cmd)
- type: robocopy c:\efi.bak f:\EFI /mir
- type: exit
- switch to original command prompt (the one running diskpart)
- type: exit
- type: exit
- Alt+F4 at the Windows installer to quit

At this point, verify that Windows still boots... It should. And after it does, you should now be able to use diskmgmt.msc to resize the Windows partition, create placeholder partition(s) for OS X, and boot into the OS X installer/Disk Utility to erase as HFS+J.

If you wanted to retain the Recovery partition, you could probably clone it and place it after the main partition (assuming Windows isn't dependent on the position and only the partition GUID). The clone would have to be a perfect copy, including the GUID partition type.

Not exactly a process for noobs...
 
Not exactly a process for noobs...

Definitely not. Been thiking about it and I doubt OEM computers are installed individually. Bet they do unattended installs using the toolkits provided by MS, so went looking in the Win8 techet library to see what I could find. Seems they have a step by step for IT pros for Win8 deployment on multiple computers on a network. Step 5 is the interesting one. Seems they create a diskpart script to format the drive. Reading thru the script I see the command "create partition efi size=100" which is followed by a remark -
rem ** NOTE: For Advanced Format 4Kn drives, change this value to size = 260 **

So this may be why people with new Win8 machines have no problems - default Win8.1 EFI partition on a 4k drive is 260Mb if the installer uses the recommended size and OS X is happy with the larger EFI partition. Not sure why they put the recovery image partition last, though. Seems to me it would be better next to the RE tools partition.
 
Definitely not. Been thiking about it and I doubt OEM computers are installed individually. Bet they do unattended installs using the toolkits provided by MS, so went looking in the Win8 techet library to see what I could find. Seems they have a step by step for IT pros for Win8 deployment on multiple computers on a network. Step 5 is the interesting one. Seems they create a diskpart script to format the drive. Reading thru the script I see the command "create partition efi size=100" which is followed by a remark -
rem ** NOTE: For Advanced Format 4Kn drives, change this value to size = 260 **

IT pros... over the network via automated process/scripts...
Manufacturers... mass production imaging.

I'm thinking now this Lenovo SSHD (500GB) is 4k.

So this may be why people with new Win8 machines have no problems - default Win8.1 EFI partition on a 4k drive is 260Mb if the installer uses the recommended size and OS X is happy with the larger EFI partition. Not sure why they put the recovery image partition last, though. Seems to me it would be better next to the RE tools partition.

And probably most manufacturers create larger EFI even if not 4k...

A less-often used partition, such as a recovery partition is best placed last. With HDDs, generally it is faster to access LBAs with low values (eg. closer to the beginning of the disk) than it is to access LBAs with higher values at the end.

In addition, for consumers who don't want/need the recovery partition (external recovery created), it makes it easier to expand the main partition into that space.
 
@GoingBald and others interested...

Regarding GPT/UEFI setups and OEM/default Windows installs.

I did a bit more testing on this. And here's what I know now...

- OS X needs the EFI partition to be 200MB or greater. The default for some installations is 100MB and OS X will complain about it and not be able to deal with the disk (not even format an existing partition).

- OS X likes the EFI partition to be the first partition. Some Windows installs will have a WinRE (Recovery) partition in the first position followed by EFI. OS X will still be able to manipulate a GPT partition table arranged this way (provided EFI>200, no MSR), but Verify Disk will complain about the disk not having an EFI partition. You can resolve this by removing the EFI partition (optionally moving it into the space formerly occupied by the WinRE partition... optionally moving the WinRE partition somewhere else)

- Most GPT drives created by the Windows installer or from OEMs have a special "Microsoft Reserved" or MSR partition. This partition causes OS X to be unable to manipulate the partitions on the disk.

- The MSR partition is generally not required by Windows, and can be removed. It is used as a placeholder for some obscure features of Windows, so it is not really necessary.

- If you remove the MSR and have an EFI partition of 200MB+, OS X Disk Utility will be able to manipulate the drive without issue.

- With an MSR partition present (and EFI 200MB+), you can still format existing partitions in Disk Utility, but not create them. This limitation can cause issues for certain imaging operations (Restore) in Disk Utility.

- If you create a Windows partition in Disk Utility on a GPT drive (exFAT, FAT32 (MS-DOS)), Disk Utility will create a hybrid GPT/MBR and this will give Windows trouble for UEFI setup as it expects to see a pure GPT drive, not a hybrid. Don't create partitions with those formats in Disk Utility. Instead create them as HFS+J, then format them once you reach Windows/Windows installer.

Summary: It is best, therefore, to do your initial disk partitioning in Disk Utility, using HFS+J placeholders for Windows partitions. If you have an existing OEM or Windows install with an EFI partition under 200MB, you will need to re-create it via cloning or re-install. If you have an MSR partition, you can remove it to enable full functionality in Disk Utility. If your EFI partition is not first, you can remove the partitions in front of it to keep Verify Disk from complaining.
 
Summary: It is best, therefore, to do your initial disk partitioning in Disk Utility, using HFS+J placeholders for Windows partitions. If you have an existing OEM or Windows install with an EFI partition under 200MB, you will need to re-create it via cloning or re-install. If you have an MSR partition, you can remove it to enable full functionality in Disk Utility. If your EFI partition is not first, you can remove the partitions in front of it to keep Verify Disk from complaining.

So even though you can shrink the C:\ partition and create a new partition for OS X on OEM Win8.x UEFI installs it is still better to do a clean install from scratch of Win8.x.

Windows 7 doesn't have the WinRE Tools and WinRecovery partitions at start and end of the drive and is quite happy to allow the shrink of C:\ and creation of the new partition and OS X disk utility is quite happy to erase it to Mac OS X Extended (Journaled) IF and ONLY IF the EFI partition is 200Mb or larger (verified by fresh install of Win7 Ultimate - had to create EFI in OS X disk utility as the default is 100Mb) You can also create the partition with Windows diskpart prior to the installation of Win7, so Win7 still takes a clean install before you can install OS X on the same drive.
 
So even though you can shrink the C:\ partition and create a new partition for OS X on OEM Win8.x UEFI installs it is still better to do a clean install from scratch of Win8.x.

If you don't have much there and you don't want to preserve the existing OEM install. Certainly, you have to go through some pain to get a properly working system without a fresh install. So it really depends on what is the less pain. Less pain fresh install or less pain time spent in diskpart fixing stuff...

I have succesfully taken my OEM install from my Lenovo U430 cloned the whole thing to an SSD (switching out "hybrid" SSHD for SSD), and installed OS X on it all booting with Clover. And the Lenovo "onekey Recovery" works too. I even managed to get EFI into the first position, MSR is gone, so OS X likes the disk ok.

Making things like the recovery partition work on OEM installs is even more trouble. They use special GUID types for the partitions (the BIOS looks for these special partitions by GUID and boots them). So you have to copy the GUIDs too. Programs like gparted don't do this, so I restored the IDs from the original disk using diskpart ("detail part" and "setid id=<guid>").

Windows 7 doesn't have the WinRE Tools and WinRecovery partitions at start and end of the drive and is quite happy to allow the shrink of C:\ and creation of the new partition and OS X disk utility is quite happy to erase it to Mac OS X Extended (Journaled) IF and ONLY IF the EFI partition is 200Mb or larger (verified by fresh install of Win7 Ultimate - had to create EFI in OS X disk utility as the default is 100Mb) You can also create the partition with Windows diskpart prior to the installation of Win7, so Win7 still takes a clean install before you can install OS X on the same drive.

In the case of an OEM Win7 UEFI install with too small EFI partition, you'd need to sacrifice the MSR partition in order to enlarge the EFI partition. You don't really need the MSR partition, so no big deal... Of course, most Win7 installs are not usually UEFI... they are legacy, which means converting to GPT/UEFI first (possible because of the "System Reserved" partition is large enough usually to leave room for at least the EFI partition.

And you can always shuffle things around via cloning to temporary devices, cloning back, as long as you're mindful of the need to fix BCD (BCDEDIT) and are aware of the special partition GUIDs that may be used for OEM "restore" partitions (if you care to keep the OEM restore functionality).
 
In the case of an OEM Win7 UEFI install with too small EFI partition, you'd need to sacrifice the MSR partition in order to enlarge the EFI partition. You don't really need the MSR partition, so no big deal... Of course, most Win7 installs are not usually UEFI... they are legacy, which means converting to GPT/UEFI first (possible because of the "System Reserved" partition is large enough usually to leave room for at least the EFI partition.
Is the UEFI installed MSR partition not the same thing as the System Reserved partition seen in Legacy mode install which contains the boot files? I do notice in the disk management tool that the MSR partition is hidden in the bottom pane unless you select it in the top pane where the System Reserved was always visible in the bottom pane.
 
Is the UEFI installed MSR partition not the same thing as the System Reserved partition seen in Legacy mode install which contains the boot files?

Not the same.

The 'System Reserved' partition in a legacy setup is used to store the bootloader files. The separation is required for bitlocker, although I'm not certain of how as I've never used bitlocker.

MSR is only a place holder to reserve space for future partitions for certain kinds of volume configurations you might use. See: http://en.wikipedia.org/wiki/Microsoft_Reserved_Partition. Not sure if it is involved with bitlocker or not... I suspect not since we have EFI partition for bootloader stuff.

I do notice in the disk management tool that the MSR partition is hidden in the bottom pane unless you select it in the top pane where the System Reserved was always visible in the bottom pane.

Neat.
 
Status
Not open for further replies.
Back
Top