1

This is continuation from my previous question "I installed Xubuntu without installing rEFind. Is it safe to remove the Linux partition at this point?", where I now have removed the Linux partition.

My mac won't boot. When it tries to, I get the screen that shows 'support.apple.com/mac/startup' with the circle with a line thought it. Basically, I messed everything up because I was dual booting Linux and I removed the Linux partition. There were errors in Disk Utility when I removed the partition, and I didn't manage to fix it fully before rebooting and now I can't boot to my Mac.

I am trying to reinstall macOS from Internet Recovery. When I try to install Catalina (before I was using Big Sur) there are no available drives to select to install it on. It shows 'Bootcamp' but says it's locked. Obviously, I wouldn't install it there anyway. It doesn't show any Mac drive.

In Disk Utility there are two things I think are wrong when I use 'Show All Devices'. I have a fusion drive so I have a 28 GB SSD drive, and also a 1 TB SATA HDD. The SSD has one 'child' (do we call them children?), disk0s2, but it's not mounted. This SSD is where macOS is normally installed, is that correct?

The second strange thing is that my HDD top-level shows two partitions: disk1s2 - 842.95 GB, and BOOTCAMP - 121.99 GB. But only BOOTCAMP shows up as a child. The disk1s2 slice, that is my main Mac storage drive, just isn't there.

All this is better demonstrated by these photos.

1a 2 3a 4a

I have run 'First Aid' on all the available partitions and they all said they were OK. But then again, it's only let's me run it on the ones that are OK, or even show up in the first place.

Ideally, I don't want to lose my Bootcamp partition, but if I have to, it will be fine. I'm just a little confused which I need to erase or if there's anything I need to do or repair first.

I have found videos on YouTube of people erasing the disk to reinstall macOS, but I can't find anyone doing it with a fusion drive.

My output for diskutil list is:

-bash-3.2# diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *28.0 GB    disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS                         27.6 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 843.0 GB disk1s2 3: Microsoft Basic Data BOOTCAMP 122.0 GB disk1s3

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

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

/dev/disk5 (disk image): #: TYPE NAME SIZE IDENTIFIER 0: untitled +10.5 MB 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 +524.3 KB disk8

/dev/disk9 (disk image): #: TYPE NAME SIZE IDENTIFIER 0: untitled +2.1 MB 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 +524.3 KB disk11

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

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

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

/dev/disk15 (disk image): #: TYPE NAME SIZE IDENTIFIER 0: untitled +2.1 MB 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 +2.1 MB disk17

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

/dev/disk19 (disk image): #: TYPE NAME SIZE IDENTIFIER 0: untitled +1.0 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 +6.3 MB disk21

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

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

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

-bash-3.2#

I am using a 2019 iMac which was running macOS 11.6.1.

Any help with this would be amazing!

EDIT (added information):

Output of gpt -r show /dev/disk1

gpt show: /dev/disk1: Suspicious MBR at sector 0
       start        size  index  contents
           0           1         MBR
           1           1         Pri GPT header
           2          32         Pri GPT table
          34           6         
          40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
      409640  1646394736      2  GPT part - FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
  1646804376    68450920         
  1715255296   238268416      3  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  1953523712        1423         
  1953525135          32         Sec GPT table
  1953525167           1         Sec GPT header
  • Can you give us the output of diskutil cs list ? (note the cs.) I'm not convinced that the SSD and HDD are 'fused'. – benwiggy Apr 20 '22 at 13:05
  • @benwiggy The output is No CoreStorage logical volume groups found. When the mac was working I'm pretty sure Disk Utility had all partitions in a single 'Fusion Drive' container, but now it seems different and I don't know which I need to erase/fix. – Alfie Stoppani Apr 20 '22 at 14:20
  • 1
    There is no need to wipe the HDD as suggested. This question has been asked many times in the past here a Ask Different. You need to change the partition type GUID in the GUID Partition Table (GPT) for the internal HDD from FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF to 7C3457EF-0000-11AA-AA11-00306543ECAC. It would be irresponsible to suggest wiping an entire drive because one 128 byte integer was set to -1. – David Anderson Apr 20 '22 at 17:38
  • @DavidAnderson Thank you once again! I managed to do that. I followed the same as this answer because I had a suspicious MBR at sector 0. The answer goes on to say I probably want to resize the main volume to fill the whole disk. It says to run diskutil cs list. But as I already found, this returns No CoreStorage logical volume groups found. Am I ok to reboot without sorting this out? Or is there more I need to do regarding how the fusion drive should be configured? – Alfie Stoppani Apr 20 '22 at 19:10

1 Answers1

2

In order to fix this, I did not have to erase the drives.

As was suggested in the comments, reconfiguring the partition table was all that was needed (not that it was easy).

I followed this thread in order to change the GPT.

Specifically, these are the steps I took:

-bash-3.2# gpt -r show /dev/disk1
gpt show: /dev/disk1: Suspicious MBR at sector 0
       start        size  index  contents
           0           1         MBR
           1           1         Pri GPT header
           2          32         Pri GPT table
          34           6         
          40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
      409640  1646394736      2  GPT part - FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
  1646804376    68450920         
  1715255296   238268416      3  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  1953523712        1423         
  1953525135          32         Sec GPT table
  1953525167           1         Sec GPT header

-bash-3.2# diskutil unmountdisk /dev/disk1 Unmount of all volumes on disk1 was successful

-bash-3.2# gpt remove -i 2 /dev/disk1 gpt remove: /dev/disk1: Suspicious MBR at sector 0 /dev/disk1s2 removed

-bash-3.2# diskutil unmountdisk /dev/disk1 Unmount of all volumes on disk1 was successful

-bash-3.2# gpt add -i 2 -b 409640 -s 1646394736 -t 7C3457EF-0000-11AA-AA11-00306543ECAC /dev/disk1 gpt add: /dev/disk1: Suspicious MBR at sector 0 gpt add: /dev/disk1: error: no space available on device

-bash-3.2# gpt -r show /dev/disk1 gpt show: /dev/disk1: Suspicious MBR at sector 0 start size index contents 0 1 MBR 1 1 Pri GPT header 2 32 Pri GPT table 34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B 409640 1646394736 2 MBR part 218 1646804376 68450920
1715255296 238268416 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 1953523712 1423
1953525135 32 Sec GPT table 1953525167 1 Sec GPT header

-bash-3.2# diskutil unmountdisk /dev/disk1 Unmount of all volumes on disk1 was successful

-bash-3.2# gpt destroy /dev/disk1 gpt destroy: /dev/disk1: Suspicious MBR at sector 0

-bash-3.2# gpt -r show /dev/disk1 gpt show: /dev/disk1: Suspicious MBR at sector 0 start size index contents 0 1 MBR 1 409639
409640 1646394736 2 MBR part 218 1646804376 68450920
1715255296 238268416 3 MBR part 12 1953523712 1456

-bash-3.2# gpt create /dev/disk1 gpt create: /dev/disk1: Suspicious MBR at sector 0 gpt create: /dev/disk1: error: device contains a MBR

-bash-3.2# fdisk -i -a hfs /dev/disk1 fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory

-----------------------------------------------------
------ ATTENTION - UPDATING MASTER BOOT RECORD ------
-----------------------------------------------------

Do you wish to write new MBR and partition table? [n] yes

-bash-3.2# gpt -r show /dev/disk1 start size index contents 0 1 MBR 1 62
63 1953525105 1 MBR part 175

-bash-3.2# gpt create -fp /dev/disk1 gpt create: /dev/disk1: error: no room for the backup header

-bash-3.2# gpt -r show /dev/disk1 start size index contents 0 1 PMBR 1 1953525167

-bash-3.2# gpt create -f /dev/disk1

-bash-3.2# gpt add -b 40 -s 409600 -i 1 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B /dev/disk1 /dev/disk1s1 added

-bash-3.2# gpt add -b 1715255296 -s 238268416 -i 3 -t EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 /dev/disk1 /dev/disk1s3 added

-bash-3.2# diskutil unmountdisk /dev/disk1 Unmount of all volumes on disk1 was successful

-bash-3.2# gpt add -b 409640 -s 1646394736 -i 2 -t 7C3457EF-0000-11AA-AA11-00306543ECAC /dev/disk1 /dev/disk1s2 added

-bash-3.2# gpt -r show /dev/disk1 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 1646394736 2 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC 1646804376 68450920
1715255296 238268416 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 1953523712 1423
1953525135 32 Sec GPT table 1953525167 1 Sec GPT header

-bash-3.2# diskutil list /dev/disk0 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *28.0 GB disk0 1: EFI EFI 314.6 MB disk0s1 2: Apple_APFS Container disk4 27.6 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: Apple_APFS Container disk4 843.0 GB disk1s2 3: Microsoft Basic Data BOOTCAMP 122.0 GB disk1s3

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

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

/dev/disk4 (synthesized): #: TYPE NAME SIZE IDENTIFIER 0: APFS Container Scheme - +870.5 GB disk4 Physical Stores disk0s2, disk1s2 1: APFS Volume 15.3 GB disk4s1 2: APFS Volume Macintosh HD - Data 639.9 GB disk4s2 3: APFS Volume Preboot 424.6 MB disk4s3

I won't explain it too much, the question I linked has it all there. I just wanted to post the specific commands I used for my system, which might be useful to someone.

In essentially the same way as the question I linked above, I removed the original partition table for disk1s2 and rebuilt it to change the GUID of disk1s2 to the correct GUID for APFS partitions, using the block numbers from the original gpt -r show /dev/disk1. This was also to remove the 'Suspicious MBR at sector 0'.

Afterwards, diskutil cs list returned No CoreStorage logical volume groups found. I figured this meant my fusion drive had become separated but when I rebooted the mac, Disk Utility showed exactly the same partition structure as it had done before; with the 'Fusion Drive' as the top-level drive. Although, I don't actually know if that means it's really fused.

  • Core Storage (CS) Fusion drives have been superseded by Apple with APFS Fusion drives. Your Mac is new enough that installing macOS in a Core Storage Fusion drive either is not possible or should not be attempted. At the time your referenced answer was posted, APFS had not yet been released by Apple. – David Anderson Apr 21 '22 at 13:59
  • I would recommend using the command dd if=/dev/zero count=1 of=/dev/disk1, which erases the entire MBR, instead of using fdisk -i -a hfs /dev/disk1 followed by gpt create -fp /dev/disk1, which relies on undocumented behavior. – David Anderson Apr 21 '22 at 16:55
  • @DavidAnderson If running dd instead, what do you follow it with to create the MBR/PMBR? – davemyron Jan 13 '23 at 00:03
  • When you create a new GPT, a new PMBR will be created. – David Anderson Jan 13 '23 at 00:14