Need help creating the APFS partition to install

I want to install alongside Windows. Traditionally, what I did was:

  • Shrink my NTFS partition from Windows, leaving an empty space for the APFS container
  • Boot the installer
  • Create a new HFS partition in the empty space using the gpt command from Terminal (just a partition, not a filesystem)
  • Use Disk Utility and its "Erase" command to remove that partition and create an APFS partition and filesystem in its place

That worked in Success' href='/2020/12/install-macos-mojave-on-supported-pc.html'>Mojave but now in Success' href='/2020/12/install-macos-catalina-on-supported-pc.html'>Catalina I get an error: "Media Kit reports not enough space on device for requested operation"

Perhaps there's a workaround or a more proper way of doing this?

Author: @n0change