To cut a long story short, I decided to dual boot macOS Monterey with Ubuntu 22.04 as I needed it for some tasks that were easier on Linux. I found Bluetooth support to be janky and had to use a wired USB keyboard and mouse to get my tasks done. So I decided I did not want to keep Ubuntu on my system long-term. The simplest solution I read online was to delete the Ubuntu partition from within macOS and remerge the volumes to recover the space. While this worked for swap, this did not work for the Ubuntu partition and I ended up with a FFFFFF on my macOS volume. Attaching the diskutil info below:
diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF 459.9 GB disk0s2
(free space) 8.1 GB -
3: Apple_HFS UNTITLED 31.6 GB disk0s4
(free space) 268.4 MB -
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +459.9 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD - Data 205.8 GB disk1s1
2: APFS Volume Preboot 231.3 MB disk1s2
3: APFS Volume Recovery 1.1 GB disk1s3
4: APFS Volume VM 1.1 GB disk1s4
5: APFS Volume Macintosh HD 15.4 GB disk1s5
6: APFS Snapshot com.apple.os.update-... 15.4 GB disk1s5s1
I have read some articles here about recovering the volume but am a touch unclear on the steps to take. The only thing I have done so far is make a bootable Monterey USB stick. I would appreciate it if someone would help me by creating a step-by-step guide that I can follow blindly to ensure that macOS boots normally when I restart the system. Kindly let me know if any more information is needed from my end.
PS: My data is backed up to iCloud so if needed I can reinstall macOS from scratch. However, I would prefer to use diskutil commands in recovery to solve the problem if possible.
Should I follow those instructions exactly or are there any changes in the intervening years that make them out of date?
– Hardik Panjwani Nov 29 '22 at 10:22sgdiskcommand to get the correct disk. – David Anderson Nov 29 '22 at 14:22Have now booted from a Ubuntu live USB and tried the command. Volumes are currently unmounted. Getting the following error.
Found invalid GPT and valid MBR; converting MBR to GPT format in memory
Warning! Main partition table overlaps the first partition by 32 blocks! You will need to delete this partition or resize in another utility.
Warning! Secondary partition table overlaps the last partition by 33 blocks! You will need to delete this partition or resize in another utility.
Could not change partition 2’s type code to 7C3457EF-0000-11AA-AA11-00306543ECAC! Error encounter, not saving changes.
Can you kindly guide me on what to do next?
– Hardik Panjwani Nov 30 '22 at 17:54