1

Honestly I do not have enough reputation to comment on this post:

https://apple.stackexchange.com/a/307469/425311

Step two in the above link says:

Create empty space on a drive. This space needs to be outside any APFS or Core Storage containers.

His command diskutil list shows:

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *536.9 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Chicken                 150.0 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:                  Apple_HFS Turkey                  150.0 GB   disk0s4
   5:                 Apple_Boot Recovery HD             650.0 MB   disk0s5

Mine shows:

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *240.1 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         239.8 GB   disk0s2

/dev/disk1 (synthesized): #: TYPE NAME SIZE IDENTIFIER 0: APFS Container Scheme - +239.8 GB disk1 Physical Store disk0s2 1: APFS Volume JacOS 40.2 GB disk1s1 2: APFS Volume Preboot 22.5 MB disk1s2 3: APFS Volume Recovery 512.1 MB disk1s3 4: APFS Volume VM 2.1 GB disk1s4

What would it look like if the space was inside "any APFS or Core Storage containers"?

Continuing with the instruction will "absorb the free space" into a volume which is on an APFS container scheme, which defies the instruction.

Does it matter that the volume to "absorb the free space" is in an APFS type container?

Perhaps I should be trying to change the type to HFS as per the instruction example?

Should there be any other changes that you could make me aware of or shall I continue straight ahead and absorb the free space into JacOS?

I'm hesitant to experiment as there is only one OS.

I appreciate your answers.

I am using MacOS High-Sierra 10.13.6 with an intel CPU and SSD drive.

  • 2
    "I'm hesitant to experiment… " and so you should be. You don't tackle anything like this without a known-good backup in place. – Tetsujin Jul 24 '21 at 18:13
  • @Tetsujin Thank you but I trust that a way will be shown. – Jacques Retief Jul 24 '21 at 18:25
  • 2
    Never trust anything that could potentially lose your entire work. Backups are vital in this day & age when people's entire lives are entrusted to one storage location… their computer. The adage is, "Any data stored in fewer than three distinct locations ought to be considered temporary." – Tetsujin Jul 24 '21 at 18:28
  • @Tetsujin I believe that with a clear enough instruction there will be left no doubt as to the outcome desired. – Jacques Retief Jul 24 '21 at 18:32
  • Wish you luck... – Tetsujin Jul 24 '21 at 18:58
  • The disk1 should have been disk0. I made the correction. Can edit your question and remove the references to this error. – David Anderson Jul 24 '21 at 19:10
  • @DavidAnderson thank you, that instantly cleared a heap of confusion. Are you aware your thread is copy-pasted in numerous other places around the web? :`D – Jacques Retief Jul 24 '21 at 19:26
  • I believe some questions are posted by users who then use submitted answers to make a profit. Of course, Ask Different uses both the submitted questions and answers to earn income. – David Anderson Jul 24 '21 at 21:30

1 Answers1

1
  • What would it look like if the space was inside "any APFS or Core Storage containers"?

    The free space must be contiguous. This generally does not occur in APFS and Core Storage containers.

  • Continuing with the instruction will "absorb the free space" into a volume which is on an APFS container scheme, which defies the instruction.

    Does it matter that the volume to "absorb the free space" is in an APFS type container?

    The free space needs to be absorbed into a partition. In the answer, disk0s4 is a partition with an JHFS+ formatted volume. You can not "absorb the free space" in to a APFS volume. APFS volumes reside in APFS containers. APFS containers span one or two partitions.

  • Perhaps I should be trying to change the type to HFS as per the instruction example?

    You can not do this without destroying the existing data. You should resize the container instead. This will also resize the partition. The proper command is given below. However in your case, you do not need to execute any commands because the drive has no free space to absorb.

     diskutil apfs resizecontainer disk0s2 0 
    
  • Should there be any other changes that you could make me aware of or shall I continue straight ahead and absorb the free space into JacOS?

    The answer is for a 2013 iMac. You have not stated the model/year of your Mac. You should do this before proceeding.

How to Hybrid Partition the SSD Internal Drive for iMac mid 2011

Below is the output from diskutil list internal.

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *240.1 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         239.8 GB   disk0s2

/dev/disk1 (synthesized): #: TYPE NAME SIZE IDENTIFIER 0: APFS Container Scheme - +239.8 GB disk1 Physical Store disk0s2 1: APFS Volume JacOS 40.2 GB disk1s1 2: APFS Volume Preboot 22.5 MB disk1s2 3: APFS Volume Recovery 512.1 MB disk1s3 4: APFS Volume VM 2.1 GB disk1s4

Below is the command to reduce the APFS container to 160 GB and create a partition for Windows. You may wish to choose a different size value.

diskutil apfs resizecontainer disk0s2 160G exfat BOOTCAMP 0

The output from diskutil list internal should now appear similar to what is shown below.

/dev/disk0 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *240.1 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk4         160.0 GB   disk0s2
   3:       Microsoft Basic Data BOOTCAMP                79.9 GB    disk0s3

/dev/disk1 (synthesized): #: TYPE NAME SIZE IDENTIFIER 0: APFS Container Scheme - +160.0 GB disk1 Physical Store disk0s2 1: APFS Volume JacOS 40.2 GB disk1s1 2: APFS Volume Preboot 22.5 MB disk1s2 3: APFS Volume Recovery 512.1 MB disk1s3 4: APFS Volume VM 2.1 GB disk1s4

If you have gdisk installed, then you can boot to macOS Recovery to finish hybrid partitioning the drive.

Enter the command below to confirm disk0 is the identifier for the internal drive. If a different identifier is shown, then make the appropriate substitutions below.

diskutil list internal

Enter the command below to start gdisk.

/Volumes/JacOS/usr/local/bin/gdisk /dev/disk0

The gdisk command takes interactive input. Below is the functions and data to enter.

r
h
2 3
y
ff
n
07
y
n
w
y

Below is an example using version 1.0.5 of gdisk. Your output should be similar.

GPT fdisk (gdisk) version 1.0.5

Warning: Devices opened with shared lock will not have their partition table automatically reloaded! Partition table scan: MBR: protective BSD: not present APM: not present GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): r

Recovery/transformation command (? for help): h

WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one, just hit the Enter key at the below prompt and your MBR partition table will be untouched.

Type from one to three GPT partition numbers, separated by spaces, to be added to the hybrid MBR, in sequence: 2 3 Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): y

Creating entry for GPT partition #2 (MBR partition #2) Enter an MBR hex code (default AF): ff Set the bootable flag? (Y/N): n

Creating entry for GPT partition #3 (MBR partition #3) Enter an MBR hex code (default 07): 07 Set the bootable flag? (Y/N): y

Unused partition space(s) found. Use one to protect more partitions? (Y/N): n

Recovery/transformation command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!!

Do you want to proceed? (Y/N): y OK; writing new GUID partition table (GPT) to /dev/disk0. Warning: Devices opened with shared lock will not have their partition table automatically reloaded! Warning: The kernel may continue to use old or deleted partitions. You should reboot or remove the drive. The operation has completed successfully.

Finally, boot back to macOS.

  • Thanks for your answer. The last point is irrelevant as it pertains to installing windows on an APFS type.

    I think the solution will be to shrink the existing APFS to create free space which can then be used for the creation of a new partition on disk0 in FAT format.

    Please could you break down and explain the following:

    diskutil resizevolume disk0s4 150G 3 "Free Space" "dummy" 224800M FAT32 "WINSTALL" 10G %DE94BBA4-06D1-4D40-A16A-BFD50179D6AC% %noformat% 600M. I understand that you resized turkey back to 150g, created two partitions, but what is the "3" and "224800M"?

    – Jacques Retief Jul 24 '21 at 21:59
  • After some reading in terminal, I see that you designated three partitions to be created after shrinking turkey, beginning with creating an order of free space to allocate to the proceeding WINSTALL and WRE volumes. – Jacques Retief Jul 24 '21 at 23:45
  • I tried this diskutil apfs resizecontainer disk0s2 160G 3 "free space" "dummy" 224800M FAT32 "WINSTALL" 10G %DE94BBA4-06D1-4D40-A16A-BFD50179D6AC% %noformat% 600M The %noformat% option is not supported for this operation and this diskutil partitiondisk /dev/disk0 3 GPT "Free Space" "dummy" 224800M FAT32 "WINSTALL" 10G %DE94BBA4-06D1-4D40-A16A-BFD50179D6AC% %noformat% 600M Started partitioning on disk0 Unmounting disk Error: -69877: Couldn't open device (Is a disk in use by a storage system such as AppleRAID, CoreStorage, or APFS?) – Jacques Retief Jul 25 '21 at 00:56
  • 1
    Enter diskutil apfs resizecontainer disk0s2 160G ExFAT "dummy" 69200M ExFAT "WINSTALL" 10G %DE94BBA4-06D1-4D40-A16A-BFD50179D6AC% "dummy" 600M. If successful, then enter diskutil erasevolume free none disk0s3. Finally, restart the Mac. – David Anderson Jul 25 '21 at 02:21
  • Thank you for that wisdom, David. That did it! I may now proceed to the next step :) – Jacques Retief Jul 25 '21 at 14:33
  • The last point is completely relevant as 2013 Macs are made different to what I have: iMac mid 2011 – Jacques Retief Oct 20 '21 at 18:40
  • I just installed Windows 10 version 21H1 on an iMac (21.5-inch, Mid 2011) two days ago. See this answer. – David Anderson Oct 20 '21 at 19:18
  • David, how do you "Create a ExFAT formatted volume labeled "BOOTCAMP" on the 2nd, 3rd or 4th partition of the primary disk. If this volume already exists, then erase the contents." when I have an APFS disk structure?

    from this post: https://apple.stackexchange.com/questions/308743/how-to-install-windows-10-into-a-2011-imac-without-using-the-boot-camp-assistant

    ?

    – Jacques Retief Oct 23 '21 at 06:32
  • Edit your question and add the current output from diskutil list. – David Anderson Oct 23 '21 at 21:42
  • It is as is above. – Jacques Retief Oct 24 '21 at 17:45
  • It is shown above. – Jacques Retief Oct 26 '21 at 04:20
  • Enter diskutil apfs resizecontainer disk0s2 160G exfat BOOTCAMP 0. – David Anderson Oct 26 '21 at 05:05
  • 1
    I updated my answer to include specific instructions to hybrid partition your Mac for a Windows 10 installation. – David Anderson Oct 26 '21 at 07:56