Contribute
Register

[Guide] Solving Media Kit reports not enough space on device for requested operation error!

Status
Not open for further replies.
Have to say Thank You! Took some work, but this allowed me to do the format :) What worked for me was the following:
Using DiskPart, shrank my windows partition and created a new system (efi) partition immediately after it, 400MB in size.
formatted new efi partition as fat32
assigned drive letter to new efi partition
using bcdboot, made new boot files collection
rebooted to verify that 2 windows boot manager entries existed, and both worked.
back in windows (booting from second entry) went into disk part and deleted old efi - dangerous step here
rebooted back into windows - I get "checking media" message briefly before booting, but it works.
On windows 10 machine installing Yosemite now thanks to you!
Jim
This will create your EFI partition after the Windows partition... Shouldn't the EFI partition be in front of the Windows partition as described in http://www.rojtberg.net/1032/converting-a-ubuntu-and-windows-dual-boot-installation-to-uefi/ ?

Under the prerequisites sections you can read "250MB space in front of first partition"

I'm quite worried because I just followed that guide, which allowed convert my Windows10+Ubuntu disk from MBR to GPT, but created a 100MB EFI partition as suggested in that guide, and now tried to create an HFS+ Journaled partition in the 5TB of spare space (running OS X on my primary drive), and I get the infamous MediaKit not space enough error... Googling I found this thread...

My current drive partitioning is like this:

Primary: Samsung EVO 850 500GB -> Only for OS X and Clover
Secondary 6TB WD HDD:
-100 MB EFI
-100 MB Reserved for Microsoft
-200 GB for Windows 10
-250 GB for Ubuntu
-64 GB swap for Ubuntu
-5 TB free (which I like to use as a 5TB HFS+ partition for storage in OS X)

Can I create a copy of the 100 MB EFI partition to a new 400 MB EFI after Windows and Ubuntu, and just before the 5 TB space?
Shouldn't it before the Windows partition as said in that guide?
 
This will create your EFI partition after the Windows partition... Shouldn't the EFI partition be in front of the Windows partition as described in http://www.rojtberg.net/1032/converting-a-ubuntu-and-windows-dual-boot-installation-to-uefi/ ?

Under the prerequisites sections you can read "250MB space in front of first partition"

I'm quite worried because I just followed that guide, which allowed convert my Windows10+Ubuntu disk from MBR to GPT, but created a 100MB EFI partition as suggested in that guide, and now tried to create an HFS+ Journaled partition in the 5TB of spare space (running OS X on my primary drive), and I get the infamous MediaKit not space enough error... Googling I found this thread...

My current drive partitioning is like this:

Primary: Samsung EVO 850 500GB -> Only for OS X and Clover
Secondary 6TB WD HDD:
-100 MB EFI
-100 MB Reserved for Microsoft
-200 GB for Windows 10
-250 GB for Ubuntu
-64 GB swap for Ubuntu
-5 TB free (which I like to use as a 5TB HFS+ partition for storage in OS X)

Can I create a copy of the 100 MB EFI partition to a new 400 MB EFI after Windows and Ubuntu, and just before the 5 TB space?
Shouldn't it before the Windows partition as said in that guide?

Remove 100mb MSR. Re-create EFI to take up the 200mb space at the beginning.
 
Remove 100mb MSR. Re-create EFI to take up the 200mb space at the beginning.
Thanks a lot for the advice (I just googled and found that the MSR is safe to remove). BTW, can I try to "automagically" resize the EFI partition with gparted (it just needs to be enlarged after deleting the MSR) and it would work right away without the bcdboot & co commands, or is there something within the EFI partition that gets invalidated when the partition size changes?
 
Thanks a lot for the advice (I just googled and found that the MSR is safe to remove). BTW, can I try to "automagically" resize the EFI partition with gparted (it just needs to be enlarged after deleting the MSR) and it would work right away without the bcdboot & co commands, or is there something within the EFI partition that gets invalidated when the partition size changes?

The GUID for EFI might get changed when you resize with gparted (per UEFI spec, the ESP has a well known partition GUID). Don't know really... never tried. I always resize by making a backup of the content, deleting it, then re-creating in the same position with diskpart.exe, then restoring the content.

See here: http://www.tonymacx86.com/multi-booting/133940-mavericks-windows-8-same-drive-without-erasing.html

I guess you can try a resize with gparted and see what happens.
 
The GUID for EFI might get changed when you resize with gparted (per UEFI spec, the ESP has a well known partition GUID). Don't know really... never tried. I always resize by making a backup of the content, deleting it, then re-creating in the same position with diskpart.exe, then restoring the content.

See here: http://www.tonymacx86.com/multi-booting/133940-mavericks-windows-8-same-drive-without-erasing.html

I guess you can try a resize with gparted and see what happens.
Thanks a lot, RehabMan. I finally had to delete the partition because gparted doesn't support resizing fat32 partitions smaller than 200MB. I copied the files from the old EFI to the new EFI (using tar, as suggested in the ubuntu forums), and this was indeed fine for booting Ubuntu, but the Windows 10 boot got broken (seeing stuff like this I wonder how MS developers manage to make things so complicated and non-standard). So I began the EFI partition from scratch, this time Windows10 booted fine, then I booted into Ubuntu from the USB installer, mount entry points, chroot, and update grub. This turned my EFI partition again working for Windows+Ubuntu.

And, the most important of all, now booting into OS X, I was allowed to reformat the 5TB partition as HFS+ Journaled. It was an adventure but I'm happy now :)
 
Hello,


This is a guide which I decided to make after solving the problem "Media Kit reports not enough space on device for requested operation" on my laptop.


Problem:
Try to format a partition for installing Mac on your laptop, but it reports the above problem.
Tried Deleting the partition and creating a new one, but the same error.
Tried formatting it in a different format, like exFat, Fat32, but the same error.
Tried reformatting an already created Mac OS Extended Volume(Journaled).
Tried formatting/reformatting/partitioning using Terminal but no success.
Tried formatting using Gparted but no success.


Cause:
The main cause of this error is because your EFI partition is below 200mb, Mac needs an EFI partition of at least 200mb(as said by RehabMan) to perform any Disk Utility function.


How did this happened?:
For me, this happened because I created partition using Windows, and first installed Windows 8 UEFI, and Windows 8 creates an EFI Partition of 100mb.


Solution:
The solution is simple, all we have to do is shrink any partition by 200mb or more.
Then, create a new EFI partition, and then add Microsoft Boot files.


What all will work after applying this solution?:
You could format and partition using Disk Utility.
Boot into Windows.
Boot into Mac OS.
Dual Boot both OS. (I am dual booting using Clover).


In the following procedure, I had my windows working, in case,if you can't boot your windows or have problem related to booting, probably the same solution can be applied, as it creates a new bootloader.


Steps:
1) The first thing is make a backup of your current EFI Partition, to do so, follow the steps below:


a) Open CMD using Admin rights.
b) Type the following code:


Code:
Diskpart


Code:
List Disk


Type the number of your HDD where windows is installed
Code:
Sel disk 0


Code:
List Vol


In my case, the EFI partition was volume 4 , under Label, "EFI" or "SYSTEM" would be named, it is in Fat32 format and around 100mb, select the volume according to what's shown in your system
Code:
Sel Vol 4


Code:
assign letter=z


Now you can see a new partition with letter Z in your windows explorer, but when you try to open it you will have an error. To solve this error, do the following:


Open Task Manager, Go to Details (In windows 8), select "explorer.exe" and end task.


Then go to File > New Task, and type "explorer.exe" and Check "Create this task with administrative privileges".


Now you can open the Z partition.


Make a Backup by copying all the files to a drive which can be accessible later. Certain files may show an error while copying, this can be resolve by applying the above procedure from a startup repair disk.


2)Now again Switch back to CMD - Diskpart. Now we have to shrink a partition by 200mb or more, if you already have unallocated space then no need to follow this step, skip it. In my case, I shrink my C: drive by 400 mb. To do so:


Select your C: partition, Volume 1 in my case.
Code:
Sel Vol 1


C:(Windows) Partition will get shrink by 400mb.
Code:
shrink desired=400




3) Now that we have 400mb of unallocated space, all we have to do is create a new EFI Partition.
To do so, type:


I made my efi partition of 400mb, minimum is 200mb to enable Disk Utility to perform functions.
Code:
create partition efi size=400


Now you have successfully created a new efi partition.
Code:
format quick fs=fat32 label="System"




4) All you have to do now is create bootloader, there are two methods,


i) Either copy the Backup files back into this drive by again selecting this volume and assigning a letter then reopening windows explorer with admin privileges.


ii) Create new bootloader using bootrec command, I recommend doing so using windows repair tool, type the following command:


C: is my windows drive, and I assigned letter V to my newly created EFI partition.
Code:
bcdboot c:\windows /s v: /f ALL


5) That's it, you have successfully created a new EFI Partition.


6) Now when you will restart, upon boot selection there will be two "Windows Boot Manager" , try booting in with both the Boot Options, if you face any error booting, just boot in windows repair and click "Start-up Repair" or if that does not work then try System Restore.
System Restore worked for me.


7) If everything is good, you could delete the older EFI Partition of 100 mb, by assigning letter then formatting it.


8) Now boot in Mac Installation Disc. TaDa! you can now successfully format your partition.

thanks for clear procedure. except
How can I see after boot which EFI is used? The 100 Mb one or the 400 Mb one.
 
Have to say Thank You! Took some work, but this allowed me to do the format :) What worked for me was the following:
Using DiskPart, shrank my windows partition and created a new system (efi) partition immediately after it, 400MB in size.
formatted new efi partition as fat32
assigned drive letter to new efi partition
using bcdboot, made new boot files collection
rebooted to verify that 2 windows boot manager entries existed, and both worked.
back in windows (booting from second entry) went into disk part and deleted old efi - dangerous step here
rebooted back into windows - I get "checking media" message briefly before booting, but it works.
On windows 10 machine installing Yosemite now thanks to you!
Jim

Hai jim,
How did you check or are you sure after boot that you booted from the 2nd Efi (400MB)?
 
Instead of doing so much, you can simply use the free tool, "Minitool Partition Wizard".
Correct me if I am wrong :)
 
When i copy files ffrom efi partition it says failed to copy bcd because its used by System any help? i need help very fast
 
Status
Not open for further replies.
Back
Top