3

A while ago, I dual booted with ubuntu linux and followed a tutorial on youtube to do so, but later I wanted all of my hard drive to be for osx, so I deleted the ubuntu partition, but now I am left with the following in diskutility:

enter image description here

The problem isnt the disk0s4 partition size, but rather the fact that it prevents me from accessing another 70 gb of hard drive space. This wasn't previously a problem as is reflected by my current data use, but I need to install alot of new software on the computer which exceeds the 180 gb on the current partition...is there any way I can delete disk0s4 and access the extra 70 gigabytes of data on my hardrive? Thanks alot!

  • So what happens when you click on the minus button when the unwanted partition is selected? Normally that should delete that partition. If you have not done that yet, try it. If it does not work check your Console (/Applications/Utilities) for entries relating to Disk Utility. – Steve Chambers Mar 3 '14 at 21:21
3

Two things come to mind - booting from recovery HD might let Disk Utility be more free in changing the filesystem where your OS resides. You could also try removing it using diskutil in terminal:

diskutil unmount disk0s4
diskutil mergePartitions ignored ignored disk0s2 disk0s4

You will want to have a backup or be familiar with command line and also verify that your Macintosh HD is really disk0s2 by reviewing diskutil list before making any changes.

Once the disk0s4 is subsumed by Macintosh HD you may need to expand that to fill the drive:

diskutil resizeVolume disk0s2 R

If done properly on a system with no issues, all the above commands are non-destructive to disk0s2 (presumably Macintosh HD) and the boot volume support. You will need to go in and set your startup disk to the resized volume using System Preferences to avoid a long delay each time you start your Mac as it looks for the old location of disk0s2 from which to boot. The bless command would work to set the boot destination as well.

  • In my experience, partitions given to mergePartitions (e.g. disk0s2 & disk0s4) describe a continuum, not a two single partitions. In other words, inputting disk0s2 and disk0s4 also nukes disk0s3 if present. Also—on El Capitan at least—the first option must be a real format diskutil can handle (see diskutil listFilesystems), albeit it is ignored when no force is present. – Jari Keinänen Nov 10 '15 at 12:17
  • @koiyu yes. In many cases you get an error when the filesystem is disjointed. In the case where this OP posted, the chance of success looks better than many. I'm a big fan of erasing the entire file system and starting cleanly most of the time. – bmike Nov 10 '15 at 12:23
  • 1
    Yes, judging by the screenshot OP's case looks ideal, although disk0s3 might still be present if it is a recovery partition. (Source: yesterday I successfully merged disk0s2–disk0s4 with recovery partition disk0s3 in-between. Didn't get any errors and mergePartitions automatically resized disk0s2 to new, bigger size. Didn't need bless either, probably as the start of disk0s2 stayed the same. (I also tested internet recovery afterwards and, as it works, decided not to worry about the missing recovery partition.)) – Jari Keinänen Nov 10 '15 at 12:35
0

Not sure this is applicable to your situation, but I somehow got mine resolved.

Story: I tried to manually install Windows 8.1 with bootcamp and it failed to auto install, so I manually partitioned some free space with disk utility. After I tried to install windows again the setup created this evil "disk0s4" partition that is protected with no user privilege to modify or remove.

Fix: I attempted many resolutions suggested on the web but none of them worked, then I thought to myself, if this partition was created by the MS windows installation boot disk would that be the place to remove it? So I ran the Windows setup procedures again (inserting the disk/bootable usb, and hold option when boot, then select "windows" or "windows setup" or however you name your installation source). When I reached the part where I can select which partition to install, I then delete the "disk0s4" partition from there. Restart your mac, launch disk utility again and its gone!

Steps:

  1. Insert OS installation disk/USB (Windows 8.1 for me)
  2. Boot holding option and select the source (Windows on a USB for me)
  3. Proceed with installation till you hit the part with several partitions
  4. Select and delete the "disk0s4"
  5. Remove the installation medium and reboot
  6. Launch disk utility again and it should be gone!

Hopefully this helps!

0

yeah I can get rid of it by enter to disk utility and then click at Grey bar of diskOs4, then go to Erase and Erase it, then go to Main macintosh HD and go to "Partition" and look at that space and delete it.

PS. I don't know you will success but I can.

-1

go to the partition, mine was named disks03, i then went to the ERASE tab, then select security options, here i raised it to the max option which said something about the standards of U.S department of defence.

once you've set the security option to max, hit erase, and it begins the purge!

Worked fine for me

  • 3
    Deleting the data is not the same as deleting the partition. – Tetsujin Feb 27 '15 at 17:27
-1

From Terminal:

diskutil eraseVolume exFAT AAA disk0s4

where AAA - name of the new exFat partition, which you can delete in Disk Utility

  • This command will only erase the partition, and does not detail how to remove the partition itself. – perhapsmaybeharry Apr 10 '16 at 9:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .