Can't boot back into macOS after extending my Fusion Drive in Linux

by Rudi Kelly   Last Updated June 19, 2018 19:12 PM

I'm having a lot of trouble trying to boot macOS on my iMac after an extrememly shitty attempt at cleaning up my Fusion Drive. Here's what I've done leading up to this point:

  1. Installed rEFInd, worked fine.
  2. dd'd Kali Linux onto my USB drive.
  3. Partitioned my fusion drive to allow room for Kali to be installed. 100% sure that at this point these partitions are safe and functioning as intended.
  4. Installed Kali Linux, which I believe worked fine. I have done this countless times before, altough only ever on Windows machines, as this is my first time usign Apple hardware.
  5. After a few days I found a better device for Kali to be installed to. Installed there successfully, leaving the install on my mac redundant, so I thought I would remove it. I opened Disk Utility and erased the 2 partitions associated with Kali, the main FS partition and the swap region. I then attempted to use this free space to extend my main, macOS partition, however Disk Utility would not allow me to edit the currently booted partition.
  6. Hey, easy fix, i thought. Booted from my live Kali USB and used gparted to extend the partition. Done. Note that my main partition is formatted as APFS, which I believe doesn't play nice outside of macOS (in this case inside Linux). I believe this is the cause of my problem.
  7. Removed my Kali USB and rebooted, the rEFInd menu shows up, but has no entries. Fuck.
  8. At this point I realised my Recovery partition has disappeared. I hope you are able to see the magnitude of this fuck up by now.
  9. Discovered Internet Recovery mode, which saved my ass (or so I thought). I attempted to use the 'Reinstall macOS' feature, but when I am prompted to select a disk, the list is empty. My Fusion Drive is also listed in Disk Utility, however it has been split into the HDD and SSD, both of which are unmountable (tried in Linux too, also canot mount).

The output of diskutil list is:

-bash-3.2# diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         28.0 GB    disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS                         27.7 GB    disk0s2

/dev/disk1 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk1
   1:                        EFI EFI                     209.7 MB   disk1s1
   2: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF               1000.0 GB  disk1s2

/dev/disk2 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        +2.1 GB     disk2
   1:                  Apple_HFS OS X Base System        2.0 GB     disk2s1

/dev/disk3 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            untitled               +5.2 MB     disk3

/dev/disk4 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *16.6 GB    disk4
   1:                       0x17                         2.9 GB     disk4s1
   2:                 DOS_FAT_12 NO NAME                 720.9 KB   disk4s2

/dev/disk5 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            untitled               +524.3 KB   disk5

/dev/disk6 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            untitled               +524.3 KB   disk6

/dev/disk7 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            untitled               +524.3 KB   disk7

/dev/disk8 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            untitled               +2.1 MB     disk8

/dev/disk9 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            untitled               +524.3 KB   disk9

/dev/disk10 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            untitled               +524.3 KB   disk10

/dev/disk11 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            untitled               +12.6 MB    disk11

/dev/disk12 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            untitled               +4.2 MB     disk12

/dev/disk13 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            untitled               +1.0 MB     disk13

/dev/disk14 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            untitled               +2.1 MB     disk14

/dev/disk15 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            untitled               +524.3 KB   disk15

/dev/disk16 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            untitled               +524.3 KB   disk16

/dev/disk17 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            untitled               +1.0 MB     disk17

/dev/disk18 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            untitled               +6.3 MB     disk18

/dev/disk19 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            untitled               +6.3 MB     disk19

/dev/disk20 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            untitled               +524.3 KB   disk20

/dev/disk21 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            untitled               +2.1 MB     disk21

My HDD is 1TB and my SSD is 28GB, if that helps.

My goal here is to be able to boot back into macOS, preferably while keeping all my data. I'm happy to provide any needed data, thanks in advance to anyone that can help!



Related Questions



How to examine disks and their partitions via terminal?

Updated February 05, 2017 14:05 PM