1

I have my OSX install on a seperate AFPS partion, my home folder on another (HFS). In order to enlarge it I deleted a Linux partition following it, and now I get an error that it is not an AFPS device when I try to enlarge it. Given some other users problems with rebooting when they have this unknown partition I'm wondering if I should be concerned. The output of diskutil list follows:

Last login: Thu Mar 19 15:22:12 on ttys000
User-MBP:~ username$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF               51.7 GB    disk0s2
   3:                  Apple_HFS Untitled                47.8 GB    disk0s3
   4:                  Apple_HFS Untitled                900.0 GB   disk0s4

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +51.7 GB    disk1
                                 Physical Store disk0s2
   1:                APFS Volume OS                      39.6 GB    disk1s1
   2:                APFS Volume Preboot                 21.6 MB    disk1s2
   3:                APFS Volume Recovery                512.0 MB   disk1s3
   4:                APFS Volume VM                      4.3 GB     disk1s4

Here is the output of diskutil info disk0s2 | grep -e Offset -e Size:

User-MBP:etc username$ diskutil info disk0s2 | grep -e Offset -e Size
   Partition Offset:         209735680 Bytes (409640 512-Byte-Device-Blocks)
   Disk Size:                51.7 GB (51722964992 Bytes) (exactly 101021416 512-Byte-Units)
   Device Block Size:        512 Bytes
  • If it is still possible, add the output from the command diskutil info disk0s2 | grep -e Offset -e Size to your question. – David Anderson Mar 20 at 10:01
  • Thanks David, edited above. – Pierre Raynard Mar 20 at 12:44
  • Is disk0s4 the partition you want to remove? is disk0s3 the partition you want to enlarge? – David Anderson Mar 20 at 13:02
  • I am running out of room for the OS, on disk0s2, so is the one I want to enlarge. Disk0s3 was formerly a Linux partition. – Pierre Raynard Mar 20 at 13:05
1

You need to boot to macOS Recovery. Instructions for booting to macOS Recovery over the internet can be found here. Once booted to macOS Recovery, open a Terminal application window and enter the following commands.

diskutil unmountdisk disk0
gpt remove -i 2 /dev/disk0
diskutil unmountdisk disk0
gpt add -i 2 -b 409640 -s 101021416 -t 7C3457EF-0000-11AA-AA11-00306543ECAC /dev/disk0

After booting back to macOS, the commands given below will add the space formally used by linux to the partition where macOS is installed.

diskutil eraseVolume free none disk0s3
diskutil apfs resizecontainer disk0s2 0

 

| improve this answer | |

You must log in to answer this question.

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