how to restore a corrupt partition

Hello everybody!


I've had this problem for a while and posted it on multiples mac forum but nobody ever knew how to fix it.

Last year I tried to install window on my mac, but for some reason it didn't work and I am now stuck with a 100gb "untitled" partition. I am running out of space and I would really love to utilize these 100gb.

People told me to run bootcamp and to figure it out but when I run bootcamp, it says "The startup disk cannot be partitioned or restored to a single partition. The startup disk must be formatted as a single Mac OS Extended (Journaled) volume or already partitioned by Boot Camp Assistant for installing Windows." I have no idea what it means.

At this point I kinda gave up on installing windows (even if it would be nice), but all I want is get my 100gb back!



Thanks to anybody who can help!


Kevin

MacBook Pro with Retina display, OS X El Capitan (10.11.1)

Posted on Dec 30, 2015 7:35 AM

Reply
14 replies

Dec 30, 2015 9:05 AM in response to rastacaliboy

1. The BCA partitioning was executed when there was another external storage attached. This resulted in a Windows EFI being created.

2. The disk0s4-disk0s7 should be merged into a single Free Space chunk.

3. Run the following two procedures with all external storage disconnected.

Resetting the System Management Controller (SMC) on your Mac - Apple Support

How to Reset NVRAM on your Mac - Apple Support

4. Your Mac supports EFI Boot and the BCA-created USB Installer can be re-used. Shutdown your Mac, connect the USB installer, power up the Mac and hold the Option key and select EFI Boot from USB and point the installer to the Free Space chunk created in step 2.

5. Your USB installer should be on a USB Flash drive (preferably a USB2 flash drive).

Dec 30, 2015 9:30 AM in response to rastacaliboy

Step 2 implies running the following in OSX Terminal.


diskutil mergePartitions free Free disk0s4 disk0s7


This will coalesce disk0s4-disk0s7 into a single Free Space chunk that EFI Boot can re-use. This will not go back to your OSX partition.


Here is the help for syntax...


diskutil mergePartitions

Usage: diskutil mergePartitions [force] format name

DiskIdentifier|DeviceNode DiskIdentifier|DeviceNode


Merge two or more pre-existing partitions into one. The first disk parameter

is the starting partition; the second disk parameter is the ending partition;

this given range of two or more partitions will be merged into one.


All partitions in the range, except for the first one, must be unmountable.


All data on merged partitions other than the first will be lost; data on the

first partition will be lost as well if the "force" argument is given.


If "force" is not given, and the first partition has a resizable file system

(e.g. JHFS+), it will be grown in a data-preserving manner, even if a different

file system is specified (in fact, your file system and volume name parameters

are both ignored in this case). If "force" is not given, and the first

partition is not resizable, you will be prompted if you want to erase.


If "force" is given, the first partition is always formatted. You should

do this if you wish to reformat to a new file system type.


Merged partitions are required to be ordered sequentially on disk.

See diskutil list for the actual on-disk ordering; BSD slice identifiers

may in certain circumstances not always be in numerical order but the

top-to-bottom order given by diskutil list is always the on-disk order.


Ownership of the affected disk is required.


Example: diskutil mergePartitions JHFS+ NewName disk3s4 disk3s7

This example will merge all partitions *BETWEEN* disk3s4 and disk3s7,

preserving data on disk3s4 but destroying data on disk3s5, disk3s6,

disk3s7 and any invisible free space partitions between those disks;

disk3s4 will be grown to cover the full space if possible.


Dec 30, 2015 10:15 AM in response to rastacaliboy

If you do not want to install Windows, then the simplest and safest method to get your disk space back is


1. Backup OSX and all your files - Use Time Machine to back up or restore your Mac - Apple Support .

2. Boot into Internet Recovery (Command+Opt+R) - OS X: About OS X Recovery - Apple Support .

3. Click on Utilties -> Disk Utility and Erase your internal whole disk.

4. Restore OSX and your files - Use Time Machine to back up or restore your Mac - Apple Support .


This requires a separate external disk which can accommodate TM backup - Backup disks you can use with Time Machine - Apple Support .

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

how to restore a corrupt partition

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.