OSX ghosting - need to reformat HDD

0

I have an OSX partition that does not take up the whole drive. Somehow, I managed to damage the unallocated space in a way that disk utility does not let me use it even though it is labeled "free space" in diskutility.

When I try and format my partition that I intended to use as windows, i get this message:

Partition failed with the error:

MediaKit reports not enough space on device for requested operation.

enter image description here My goal is to have a windows partition alongside my current OSX one.

Option 1:

What tools should I use and what should I try to format that partition without touching my OSX one?

Option 2: Should I instead try to create an image of the disk and clean everything then restore the partition after i install windows? How would I do that?

stackOverFlew

Posted 2013-05-11T19:32:39.943

Reputation: 331

Is this on a mac? – Autumnal – 2013-05-11T19:51:52.870

yes its on mac . – stackOverFlew – 2013-05-11T19:52:49.690

Do not think of installing windows before osx at all then. – Autumnal – 2013-05-11T19:53:19.097

hm ok. what should I do then? – stackOverFlew – 2013-05-11T20:01:37.663

Does Disk Utility let you create any other kind of partition in the free space? Can you create a JHFS+ ("Mac OS Extended, Journaled") in that space? What if you set it to just 100 GB instead of the full 107? – Spiff – 2013-05-11T22:31:35.387

wont that corrupt my other partition? – stackOverFlew – 2013-05-11T22:46:43.667

Partition failed with the error:

Couldn’t modify partition map because file system verification failed. – stackOverFlew – 2013-05-11T22:51:06.747

This may have the answer to that problem: Here

– HelpingHand – 2013-05-15T19:20:54.697

Answers

1

First, back up all your important data! Partitioning operations in general are inherently risky, and an error message that seems strange could be a sign of a serious problem lurking somewhere that will jump out and bite you.

With that done, I recommend the following:

  1. Boot a Linux live CD, such as Parted Magic or System Rescue CD.
  2. In the Linux live CD, open a Terminal window.
  3. Launch gdisk on the disk, as in gdisk /dev/sda.
  4. In gdisk, type v to verify the disk structures. This is a precautionary diagnostic. If gdisk reports any errors, please add its output to your original post and do not continue with this procedure! I'll assume that gdisk won't find errors....
  5. Exit from gdisk by typing q.
  6. Launch GParted on the disk by typing gparted /dev/sda or by launching GParted from a menu.
  7. Using GParted, create an NTFS partition in your free space, but leave at least 128MiB of unpartitioned space between it and your OS X partition.
  8. Exit from GParted.
  9. Launch gdisk on the disk again.
  10. In gdisk, type p to view your partition table. Chances are you'll have three partitions: an EFI System Partition (ESP), a Windows (NTFS) partition, and an OS X partition. If they're out of order, you can optionally type s to sort them; be sure to type p again to verify the change if you do this.
  11. In gdisk, type r to enter the recovery & transformation menu.
  12. In gdisk, type h to create a new hybrid MBR. gdisk will ask for partition numbers. Enter the numbers for the NTFS and OS X partitions. It will ask a number of other questions. For the most part, you can use the defaults. I recommend setting the boot flag on the NTFS partition, though. See the gdisk documentation on hybrid MBRs for more information.
  13. in gdisk, type w to save your changes and exit.

At this point, you should be able to install Windows.

Rod Smith

Posted 2013-05-11T19:32:39.943

Reputation: 18 427

wow. this is the post i have been looking for. I will report back to you after i finish the backup. (creating an image of my hdd) – stackOverFlew – 2013-05-12T04:01:31.790

this worked great. thank you so much. i dont know why someone minus one'd you – stackOverFlew – 2013-05-17T04:38:57.380

0

You can try to edit the partitions in a free OS like ubuntu using a tool named GParted Partition Editor (it should already be included with ubuntu. Use the first link below to find out how to start it). This may eliminate your issue. You can then change your partitions by booting up a LiveUSB of ubuntu into your mac.

This link may help you (its for dual-boot with windows/ubuntu but you can probably fill in the blanks)

I don't have a mac and I don't know if you tried this, but this link may help as well.

I hope that this helps (if it does, please confirm or at least vote up my answer)

HelpingHand

Posted 2013-05-11T19:32:39.943

Reputation: 351

-1

In Disk Utility, you can repair the partition table itself by selecting the drive itself (i.e. NOT an indented partition) and doing a first aid repair on that.

If that doesn't work, consider growing or shrinking your working JHFS+ partition slightly (this is a non-destructive procedure) to force the partition table to get rewritten.

Update: One last thought, Boot Camp used to have a restriction where the Windows partition had to be the last of the first 5 (or was it 3?) partitions on the drive, or something like that. Maybe it still has that restriction. It could be that something's giving the wrong error code or misinterpreting the error code and giving an incorrect/unhelpful error.

Spiff

Posted 2013-05-11T19:32:39.943

Reputation: 84 656

here is what happened when i clicked first aid:Checking prerequisites Checking the partition list Adjusting partition map to fit whole disk as required Checking for an EFI system partition Checking the EFI system partition’s size Checking the EFI system partition’s file system Checking all HFS data partition loader spaces Reviewing boot support loaders Checking Core Storage Physical Volume partitions Updating Windows boot.ini files as required The partition map appears to be OK – stackOverFlew – 2013-05-11T20:22:51.760

looks like the everything is fine with the disk. I am now shrinking the partition a couple gigs like you said. do you know if i can solve tihs issue by using gparted booted from a live cd? – stackOverFlew – 2013-05-11T20:23:40.340

@stack You left out a detail here. Did you try making a partition again after repairing the partition table? – Spiff – 2013-05-11T20:48:01.170

yes i did. nothing has changed so far – stackOverFlew – 2013-05-11T21:57:50.480

-1

You will have to free up enough disk space in order for the requested partitions to hold what they do.

Make sure that you are giving enough room for OSX.

HelpingHand

Posted 2013-05-11T19:32:39.943

Reputation: 351

He added a picture showing he has over 100 GB of free space there. – Spiff – 2013-05-11T20:23:16.833

As the memory required for the new partition increases, the memory supplied to the other partition (OSX) decreases. – HelpingHand – 2013-05-11T20:30:48.373

If my answer showed your problem, please confirm it. Thank you. – HelpingHand – 2013-05-11T23:35:32.497