MacOS – Clear free space in Disk Utility

bootcampcore-storagedisk-utilitymacospartition

So I recently removed Windows 7 from my iMac, but Bootcamp didn't let me do it. I used Disk Utility instead. The old Windows 7 partition now shows up as free space. I want to reinstall Windows 7 again on my iMac, how do I set it up? Can I use the free space again? I want to give the Windows partition a bigger size than what the free space currently holds.

Disk Utility screenshot

diskutil list command:

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage                         801.3 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           *801.0 GB   disk1
                                 Logical Volume on disk0s2
                                 54E92188-CDD5-44AE-9D58-EF6A5B69D707
                                 Unencrypted

diskutil cs list command:

CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group 25AF6969-0B3A-4C2C-BE38-29864C233F66
    =========================================================
    Name:         Macintosh HD
    Status:       Online
    Size:         801345126400 B (801.3 GB)
    Free Space:   18907136 B (18.9 MB)
    |
    +-< Physical Volume 21095CB1-4D76-44F5-B438-0B84A06AB0E8
    |   ----------------------------------------------------
    |   Index:    0
    |   Disk:     disk0s2
    |   Status:   Online
    |   Size:     801345126400 B (801.3 GB)
    |
    +-> Logical Volume Family 2DDF1B89-E73A-45E7-96CD-5FA1DC9CA275
        ----------------------------------------------------------
        Encryption Status:       Unlocked
        Encryption Type:         None
        Conversion Status:       NoConversion
        Conversion Direction:    -none-
        Has Encrypted Extents:   No
        Fully Secure:            No
        Passphrase Required:     No
        |
        +-> Logical Volume 54E92188-CDD5-44AE-9D58-EF6A5B69D707
            ---------------------------------------------------
            Disk:                  disk1
            Status:                Online
            Size (Total):          800973897728 B (801.0 GB)
            Conversion Progress:   -none-
            Revertible:            Yes (no decryption required)
            LV Name:               Macintosh HD
            Volume Name:           Macintosh HD
            Content Hint:          Apple_HFS

sudo gpt -r -vvv show -l /dev/disk0 command:

gpt show: /dev/disk0: mediasize=1000204886016; sectorsize=512; blocks=1953525168
gpt show: /dev/disk0: PMBR at sector 0
gpt show: /dev/disk0: Pri GPT at sector 1
gpt show: /dev/disk0: GPT partition: type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, start=40, size=409600
gpt show: /dev/disk0: GPT partition: type=53746F72-6167-11AA-AA11-00306543ECAC, start=409640, size=1565127200
gpt show: /dev/disk0: GPT partition: type=426F6F74-0000-11AA-AA11-00306543ECAC, start=1565536840, size=1269536
gpt show: /dev/disk0: Sec GPT at sector 1953525167
       start        size  index  contents
           0           1         PMBR
           1           1         Pri GPT header
           2          32         Pri GPT table
          34           6         
          40      409600      1  GPT part - "EFI system partition"
      409640  1565127200      2  GPT part - "Macintosh HD"
  1565536840     1269536      3  GPT part - "Recovery HD"
  1566806376   386718759         
  1953525135          32         Sec GPT table
  1953525167           1         Sec GPT header

Specs:

  • iMac11,2 3.2 GHZ
  • 1 TB HDD
  • OS X Yosemite version 10.10 (14a389)
  • EFI Boot ROM-Version IM112.0057.B01 (the latest)

Best Answer

Preparation:

  • Backup 'Macintosh HD'
  • Start another computer or smartphone and access this page here to follow the instructions.
  • Detach any external drive (especially an external Time Machine backup drive)
  • Restart to Internet Recovery Mode by pressing alt cmd R at startup.
    The prerequisites are the latest firmware update installed, either ethernet or WLAN (WPA/WPA2) and a router with DHCP activated.
    On a 50 Mbps-line it takes about 4 min (presenting a small animated globe) to boot into a recovery netboot image which usually is loaded from an apple/akamai server.

    I recommend ethernet because it's more reliable. If you are restricted to WIFI and the boot process fails, just restart your Mac until you succeed booting.

    Alternatively you may start from a bootable installer thumb drive (Mavericks or Yosemite) or a thumb drive containing a full system (Mavericks or Yosemite).

Revert CoreStorage Volume

  • Check the volume 'Macintosh HD' with Disk Utility and repair it if necessary. If the volume is corrupted beyond any repair consider a reinstall of Mac OS X.
  • If the volume is OK quit Disk Utility
  • Open Terminal from the menubar (Utilities/Terminal) and enter diskutil cs list. The output will be this:

    CoreStorage logical volume groups (1 found)
    |
    +-- Logical Volume Group 25AF6969-0B3A-4C2C-BE38-29864C233F66
        =========================================================
        Name:         Macintosh HD
        Status:       Online
        Size:         801345126400 B (801.3 GB)
        Free Space:   18907136 B (18.9 MB)
        |
        +-< Physical Volume 21095CB1-4D76-44F5-B438-0B84A06AB0E8
        |   ----------------------------------------------------
        |   Index:    0
        |   Disk:     disk0s2
        |   Status:   Online
        |   Size:     801345126400 B (801.3 GB)
        |
        +-> Logical Volume Family 2DDF1B89-E73A-45E7-96CD-5FA1DC9CA275
            ----------------------------------------------------------
            Encryption Status:       Unlocked
            Encryption Type:         None
            Conversion Status:       NoConversion
            Conversion Direction:    -none-
            Has Encrypted Extents:   No
            Fully Secure:            No
            Passphrase Required:     No
            |
            +-> Logical Volume 54E92188-CDD5-44AE-9D58-EF6A5B69D707
                ---------------------------------------------------
                Disk:                  disk1
                Status:                Online
                Size (Total):          800973897728 B (801.0 GB)
                Conversion Progress:   -none-
                Revertible:            Yes (no decryption required)
                LV Name:               Macintosh HD
                Volume Name:           Macintosh HD
                Content Hint:          Apple_HFS
    
  • Copy the UUID of the Logical Volume (lvUUID). It's the fourth listed.
  • Your Logical Volume is revertible, so enter:
    diskutil coreStorage revert lvUUID to revert your CoreStorage Volume to a standard volume. In your case this is:
    diskutil coreStorage revert 54E92188-CDD5-44AE-9D58-EF6A5B69D707
    This will take a few seconds.
  • After a successfull conversion enter 'exit' and quit Terminal.
  • Open 'Disk Utility', hightlight the volume 'Macintosh HD' and check it for errors
  • Highlight the HDD and expand the volume 'Macintosh HD' to the full possible size (~1 TB)
  • Quit 'Disk Utility' and reboot to your standard boot volume ('Macintosh HD')