Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Merge Partitions disk0s2 and disk0s4 (leaving disk0s3)

Dear all,


As the title says, I need to merge disk0s2 and disk0s4 without touching disk0s3 as the latter is my recovery partition. I have not dared to try, but I guess I cannot use this command in terminal since it also merges disk0s3:


diskutil mergePartitions JHFS+ NewName disk0s2 disk0s4


right now when I type the "diskutil list" command I get this:


asger$ diskutil list

/dev/disk0 (internal, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *320.1 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_HFS Macintosh HD 278.5 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Apple_HFS BOOTCAMP 40.6 GB disk0s4

As I am using El Capitan, disk utility does not work either because apple changed it to a useless poor beta like program on El Capitan.


I have considered just typing the above merge command and then somehow reinstall the Apple_Boot Recovery HD, But I really don't want to go down that road if possible.


And no, Bootcamp assistant can't do it since the Bootcamp partition is already erased and formatted into JHFS+.


Any suggestions?

MacBook Pro, OS X El Capitan (10.11.1), early 2011

Posted on Feb 24, 2016 4:01 AM

Reply
Question marked as Top-ranking reply

Posted on Feb 24, 2016 10:01 AM

If you have the Install OS X El Capitan.app file hang onto it. Otherwise download it but don't install it. Quit the installer instead. Download the Recreate Recovery Creator 3.8 utility. This will recreate your Recovery HD from the Install OS X El Capitan.app file. Note - this utility does not work with Fusion drives or Corestorage volumes.


Back up your system first!


You can try to erase both disk0s3 and disk0s4 with Terminal.

diskutil eraseVolume JHFS+ ErasedDisk1 disk0s3

diskutil eraseVolume JHFS+ ErasedDisk2 disk0s4


Then merge the partitions with Terminal.

diskutil mergePartitions JHFS+ ErasedDisk3 disk0s3 disk0s4 <---- this should show ErasedDisk3 as disk0s3 afterwards. Do a diskutil list afterwards to confirm.

diskutil mergePartitions JHFS+ "Macintosh HD" disk0s2 disk0s3


Last, run the Recreate Recovery Creator utility using your Install OS X El Capitan.app file. This utility will ask where you want to create the Recovery HD - select the Macintosh HD and ask where the installer app is. You will also see some buttons to click 10.7 10.8 button and 10.9 button. Click the 10.9 button. The developer has never updated the 10.9 button to include 10.10 and 10.11. After you run this utility and Quit it do a diskutil list again and hopefully you see your Macintosh HD and Recovery HD without the Bootcamp partition.

18 replies
Question marked as Top-ranking reply

Feb 24, 2016 10:01 AM in response to asgerssc

If you have the Install OS X El Capitan.app file hang onto it. Otherwise download it but don't install it. Quit the installer instead. Download the Recreate Recovery Creator 3.8 utility. This will recreate your Recovery HD from the Install OS X El Capitan.app file. Note - this utility does not work with Fusion drives or Corestorage volumes.


Back up your system first!


You can try to erase both disk0s3 and disk0s4 with Terminal.

diskutil eraseVolume JHFS+ ErasedDisk1 disk0s3

diskutil eraseVolume JHFS+ ErasedDisk2 disk0s4


Then merge the partitions with Terminal.

diskutil mergePartitions JHFS+ ErasedDisk3 disk0s3 disk0s4 <---- this should show ErasedDisk3 as disk0s3 afterwards. Do a diskutil list afterwards to confirm.

diskutil mergePartitions JHFS+ "Macintosh HD" disk0s2 disk0s3


Last, run the Recreate Recovery Creator utility using your Install OS X El Capitan.app file. This utility will ask where you want to create the Recovery HD - select the Macintosh HD and ask where the installer app is. You will also see some buttons to click 10.7 10.8 button and 10.9 button. Click the 10.9 button. The developer has never updated the 10.9 button to include 10.10 and 10.11. After you run this utility and Quit it do a diskutil list again and hopefully you see your Macintosh HD and Recovery HD without the Bootcamp partition.

Feb 24, 2016 5:06 AM in response to asgerssc

backup your computer with Time Machine


boot into recovery mode

OS X: About OS X Recovery - Apple Support


reformat the drive

reinstall the OS from recovery mode which will restore the OS that shipped with your computer or use an bootable installer of OS 10.11

https://support.apple.com/en-us/HT201372


either way your recovery partition will be recreated if it is not destroyed.

Feb 24, 2016 5:58 AM in response to asgerssc

asgerssc wrote:


Thank you! Is Install OS X El Capitan.app necessary for recreate recovery creator 3.8 to work? I get another thought: If I delete the recovery HD and then update from 10.11.1 to 10.11.3 will maybe create a new one?

Yes, the installer app is required for the utility to work.


If you update from 10.11.1 to 10.11.3 using the Install OS X El Capitan.app file, then yes, it will recreate the Recovery HD for you without having to use the utility. The FULL OS X installers always create or rewrite the Recovery HD. BUT if you UPDATE using the 10.11.3 Update or Combo Update, the Recovery HD will not be recreated.

Feb 24, 2016 6:38 AM in response to asgerssc

So, Is what you say that should not press "update" in app store but go to the el capitan page and press download, and then run the Install OS X El Capitan.app file. And that this will recreate the recovery partition whereas the update option will not?

Correct.


But, also BEFORE you run the app file, save it somewhere so you have it for the future if needed. After it downloads and you see the installer screen, don't click Continue yet. Instead, go into your /Applications folder and copy the Install OS X El Capitan.app file to some other folder like your /Downloads folder. After the copy, click the Continue button on the installer screen.

Feb 24, 2016 10:00 AM in response to keg55

Thank you so much! This worked flawlessly. Look at this:


diskutil list

/dev/disk0 (internal, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *320.1 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_CoreStorage Macintosh HD 319.2 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

Thanks to all of you!

Feb 24, 2016 10:59 AM in response to asgerssc

Cool. Good for you!


Try to remember now that you have a Corestorage volume. You can see this by looking at your diskutil list for # 2: (Apple_CoreStorage Macintosh HD). Or by doing diskutil cs list from Terminal. What does this mean? It means to restart into your Recovery HD, you will need to always use Command+R because your Recovery HD will never show up when you restart pressing Alt/Option anymore. Not a big deal. The Recovery HD is still there, just hidden from the Startup Manager.

Feb 24, 2016 11:47 AM in response to asgerssc

So I would actually not be able to use "recreate recovery creator 3.8" Anymore?

Sort of.


You could revert your Corestorage volume if you want to. Then you could use the utility. If you don't revert it, then you would have to use a FULL installer like you just did to recreate the Recovery HD.


To revert Corestorage to the native file type, open Terminal and type: diskutil cs list. You will see results like below.


$ diskutil cs list

CoreStorage logical volume groups (1 found)

|

+-- Logical Volume Group 5F74311B-C542-4AAA-8699-25D5D555EAC9

=========================================================

Name: Macintosh HD

Status: Online

Size: 250140434432 B (250.1 GB)

Free Space: 18882560 B (18.9 MB)

|

+-< Physical Volume B71D9E01-2F87-468E-BE90-B07E9DDFC776

| ----------------------------------------------------

| Index: 0

| Disk: disk0s2

| Status: Online

| Size: 250140434432 B (250.1 GB)

|

+-> Logical Volume Family F75A7EB5-171A-497C-8953-EEE8D0C0FAF8

----------------------------------------------------------

Encryption Type: None

|

+-> Logical Volume 7E3907BC-A632-409B-8CBC-6C4A2C405913

---------------------------------------------------

Disk: disk1

Status: Online

Size (Total): 249769230336 B (249.8 GB)

Revertible: Yes (no decryption required)

LV Name: Macintosh HD

Volume Name: Macintosh HD

Content Hint: Apple_HFS



If you see on the Revertible: line a 'YES' then you can revert it. You would use the value on the Disk: line with the following:

diskutil cs revert disk1

Feb 24, 2016 12:51 PM in response to asgerssc

I may be late to this game .... but from what i'm seeing is you have a partition in between 2 which you want to span across and connect .....


you do not (or did not) need to delete any partitions. I sucessfully used a tool called Hard Disk Manager for mac (Paragon) that allowed me to reconfigure (resize and reorder) partitions in recovery mode. I was able to move them to any position I wanted and it successfully updates the GPT (and MBR if you have one). the only drawback to this "preview" version of software was that i was not able to create a new partition after allocating space, so i had to use gdisk and disk utility for that.


just another option in case you chose to try this.

Merge Partitions disk0s2 and disk0s4 (leaving disk0s3)

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