2

Firstly - I know this has been answered, but I am hoping for a more broken down answer, as I am not quite so technically minded, but I can follow instructions!

So in summary I have tried to install windows with bootcamp. Something failed and I ended up using Disk utility to try and remove the partition created by bootcamp.

Big, silly error I know!

I have followed the threads about backing up then booting to Recovery Mode (Cmd+R) and effectively wiping my SSD then re-installing Yosemite from internet recovery and then restore from my Time Machine back up. (Seems like it will be a late night!)

(The thread I am working off is the question and the answer here.)

However, in the description by @Klanomath, which seems to be a solution there are some blanks in my knowledge as to what exactly to do.... Which command lines do I use as an example.

Here is an abstract of his solution.

And here is the output of my diskutil cs list:

Last login: Wed Mar 4 23:29:13 on console 
christophersmbp:~ ChrisMacBookPro$ diskutil cs list 
CoreStorage logical volume groups (1 found)
|
+—- Logical Volume Group F4507310-A4BE-400D-A4F9-C2D6248A216C
    =========================================================
    Name:          Macintosh HD
    Status:        Online
    Size:          449686106112 B (449.7 GB)
    Free Space:    6381568 B (6.4 MB)
    |
    +-< Physical Volume 161E9D0A-9DC4-43C4-821F-8333FD14CEBB
    |   ----------------------------------------------------
    |   Index:    0
    |   Disk:     disk0s2
    |   Status:   Online
    |   Size:     449686106112 B (449.7 GB)
    |
    +-> Logical Volume Family 5D38BA94-6BFC-415D-A9F1-D443422CA876
        ==========================================================
        Encryption Status:         Unlocked
        Encryption Type:           None
        Conversion Status:         NoConversion
        Conversion Direction:      -none-
        Has Encrypted Extents:     No
        Fully Secure:              No
        Passphrase Required:       No
        |
        +-> Logical Volume DC2473AF-0833-4DBD-BF8F-D5D60063554A
            ---------------------------------------------------
            Disk:                  disk1
            Status:                Online
            Size (Total):          449327398912 B (449.3 GB)
            Conversion Progress:   -none-
            Revertible:            No
            LV Name:               Macintosh HD
            Volume Name:           Macintosh HD
            Content Hint:          Apple_HFS

as well as the output of my diskutil list:

christophersmbp:~ ChrisMacBookPro$ diskutil list                        
/dev/disk0                                                              
   #                      TYPE NAME                    SIZE    IDENTIFIER 
   0     GUID_partition_scheme                       *500.3 GB disk0      
   1                       EFI EFI                    209.7 MB disk0sl    
   2         Apple_CoreStorage                        449.7 GB disk0s2    
   3                Apple_Boot Recovery HD            650.0 MB disk0s3    
   4                       EFI NO NAME                104.9 MB disk0s4    
/dev/diskl                                                              
   #:                     TYPE NAME                    SIZE    IDENTIFIER 
   0:                Apple_HFS Macintosh HD          *449.3 GB diskl      
                               Logical Volume on     disk0s2              
                               DC2473AF-0833-4DBD-BF8F-D5D60063554A   
                               Unencrypted                                
/dev/disk2                                                              
   #                      TYPE NAME                  SIZE      IDENTIFIER 
   0     GUID_partition_scheme                       *62.9 GB  disk2      
   1                       EFI EFI                   209.7 MB  disk2sl    
   2                 Apple_HFS Nifty SD              62.5 GB   disk2s2    

and my Disk Utility GUI:

Disk Utility

the output of sudo gpt -r -vv show /dev/disk0

gpt show: /dev/disk0: mediasize=500277790720; sectorsize=512; blocks=977105060
gpt show: /dev/disk0: PMBR at sector 0
gpt show: /dev/disk0: Pri GPT at sector 1
gpt show: /dev/disk0: Sec GPT at sector 977105059
          start          size      index   contents
          0                 1            PMBR
          1                 1            Pri GPT header
          2                32            Pri GPT table
          34                6
          40           409600        1   GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
          409640    878293176        2   GPT part - 53746F72-6167-11AA-AA11-00306543ECAC
          878702816   1269536        3   GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
          879972352    204800        4   GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
          880177152  96927875
          977105027        32            Sec GPT table
          977105059         1            Sec GPT header

To summarize - I'd like to get a thickos guide to achieving the resolution, with the info I have provided.

I would also be interested to know if there is an alternative solution that doesn't require wiping my whole system. IF there are other command lines in terminal that may let me regain control of my hard drive and rejoin them.

I do not have a fusion drive, but I have a 500Gb SSD. You may also see "Nifty Drive" in the CS list, that is just a memory card.

Also my first time on a forum, so hello!

  • Do you have a reliable & fast internet connection? – klanomath Mar 5 '15 at 17:48
  • i do this evening....but tomorrow i have a reliable slow one...lol – Christopher Heyworth Mar 5 '15 at 18:55
1

This should be one way to regain your unused space. There might be a better (or more elegant) solution, but since i don't have a spare Mac at the moment (and it doesn't work in a virtual environment) i can't figure that out.

The solution outlined here removes any partition which obstructs the expansion of the CoreStorage Volume Group. Then the physical (CoreStorage) volume and afterwards the logical (CoreStorage) volume will be expanded non-destructively to almost full size. At the end the Recovery HD deleted previously will be restored by reinstalling the current system.

Initial state (disk0 is your physical device and disk1 is a "virtual" CoreStorage device - the disk identifier may vary depending on your setup):

enter image description here

Final state:

enter image description here

Preparation:

  • Backup your data.
  • Detach any external drive (especially your 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).

    Below I assume that the disk identifier of your Internet Recovery HD (OS X Base System) or thumb drive is disk1, disk0 is your SSD, and disk2 your CoreStorage Logical Volume. Disk3 - ~ disk14 are used by Internet Recovery Mode. Don't mess around with them.
    LVUUID: UUID of the logical volume. PVUUID: UUID of the physical volume
    LVG: Logical Volume Group

'Repair':

  • First try to check the volume 'Macintosh HD' with Disk Utility. If the volume is corrupted consider a backup - if not already done previously - and a reinstall of Mac OS X.

  • If the volume is OK quit Disk Utility

  • Open Terminal and enter diskutil list, diskutil cs list, gpt -r -vvv show /dev/disk0 to get a clue of your disk layout and the sizes, UUIDs and names of the different partitions and volumes.
  • with the informations found in the different listings enter diskutil unmountDisk /dev/LogicalVolumeIdentifier and diskutil unmountDisk /dev/DiskContainingApple_CoreStorageIdentifier to first unmount the CoreStorage Volume and then the physical disk.

    In your case: first enter diskutil unmountDisk /dev/disk2, then diskutil unmountDisk /dev/disk0

  • remove the EFI NO NAME partition with gpt remove -i IndexNumberOfEFINoName DiskIdentifier:

    In your case: gpt remove -i 4 disk0

  • Remount the CoreStorage disk and then the Logical Volume:

    In your case: first diskutil mountDisk /dev/disk0 and then diskutil mountDisk /dev/disk2.

  • Now try diskutil cs resizeStack DC2473AF-0833-4DBD-BF8F-D5D60063554A 0g
    This command is undocumented but´usually works (check the size with diskutil list: Apple_CoreStorage should have ~500 GB instead of 450 GB now).

    If the command succeeds you are already done here and you may quit Terminal, open Disk Utility, check the volume for errors and then restart to your main OS.

    If the command fails you have to expand the whole stack manually.

  • Unmount the two disks again with diskutil unmountDisk /dev/disk2, then diskutil unmountDisk /dev/disk0
  • remove the Recovery HD partition with gpt remove -i IndexNumberOfRecoveryHD DiskIdentifier:

    In your case: gpt remove -i 3 disk0

  • Remount the CoreStorage disk and then the Logical Volume:

    In your case: first diskutil mountDisk /dev/disk0 and diskutil mountDisk /dev/disk2.

  • enter gpt -r -vvv show /dev/SSDApple_CoreStorageIdentfier to get verbose partition data of your SSD CoreStorage disk.

    In your case: gpt -r -vvv show /dev/disk0
    It should look similar (or equal) to the example below:

    gpt show: /dev/disk0: mediasize=500277790720; sectorsize=512; blocks=977105060
    gpt show: /dev/disk0: PMBR at sector 0
    gpt show: /dev/disk0: Pri GPT at sector 1
    gpt show: /dev/disk0: Sec GPT at sector 977105059
              start          size      index   contents
              0                 1            PMBR
              1                 1            Pri GPT header
              2                32            Pri GPT table
              34                6
              40           409600        1   GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
              409640    878293176        2   GPT part - 53746F72-6167-11AA-AA11-00306543ECAC
              878702816  98402211
              977105027        32            Sec GPT table
              977105059         1            Sec GPT header 
    
  • The free space consists of 98402211 blocks here.

    Calculate the biggest block number dividable through 8. That are 98402208 blocks (à 512 bytes) which equals 50381930496 B or ~50.4 GB.
    Add the size of your SSD CoreStorage Physical Volume (449686106112 B in your case).

    The result is 50381930496 B + 449686106112 B = 500068036608 B

  • Resize your SSD CoreStorage physical volume with diskutil cs resizeDisk PVUUID newsize

    In your case: diskutil cs resizeDisk 161E9D0A-9DC4-43C4-821F-8333FD14CEBB 500068036608b

  • Check the size of your Logical Volume Group. It should have an approx. size of 500068036608b (= ~500 GB)
  • Resize your Logical Volume with diskutil cs resizeVolume LVUUID LVGSize-128 MB.

    In your case that's diskutil cs resizeVolume DC2473AF-0833-4DBD-BF8F-D5D60063554A 499940036608b. If you get an error (There is not enough free space...) choose a smaller size like 499876036608b (=LVGSize-192 MB).

    Magical numbers like diskutil cs resizeVolume LVUUID 100% or diskutil cs resizeVolume LVUUID 0g sadly don't work here - at least for me.

  • Quit Terminal and open Disk Utility.
  • Check your expanded CoreStorage Volume for errors.
  • Quit Disk Utility, choose your now expanded CoreStorage volume as startup disk and restart your Mac
  • Reinstall your current system by downloading the appropriate installer from Apple to restore the Recovery HD deleted previously (e.g. if you are using 10.10.2 now download 10.10.2). Afterwards install all updates published later. You will NOT lose your personal data.
  • Comments are not for extended discussion; this conversation has been moved to chat. – Ian C. Mar 6 '15 at 0:59
1

I found another solution. It may take time though. You need to try reinstalling windows by using bootcamp and then uninstall it. When you ask bootcamp to delete the partition used for windows, it will also "delete" the free space. It worked for me.

You must log in to answer this question.

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