How to make a bootable partition from scratch?
What makes it bootable? This has change slightly over time. I will assume you are not going to use encryption. Below are some basic examples. This is not a complete list.


The original OS X operating system.


The partition should be type 48465300-0000-11AA-AA11-00306543ECAC.
The partition should be JHFS+ formatted. If you are using the Disk Utility, you would select Mac OS Extended (Journaled).
The boot file boot.efi needs to be in the System/Library/CoreServices folder.
There used to be a requirement that a file named mach_kernal exist in the root folder. The file can be empty.

The macOS operating system stored in an APFS volume. This became available starting with High Sierra. This volume resides in a APFS container. The container can be comprised of a single APFS partition or two APFS partitions on separate drives.


The partition(s) should be type 7C3457EF-0000-11AA-AA11-00306543ECAC.
The container should be APFS formatted. If you are using the Disk Utility, you would select APFS.
The boot file boot.efi needs to be in the System/Library/CoreServices folder in a APFS volume with no specific role.
The mach_kernal file can be omitted.

A generic operating system stored in a FAT or ExFAT formatted volume. This works on Macs where High Sierra or a newer version of macOS has been installed. 


The partition(s) should be type EBD0A0A2-B9E5-4433-87C0-68B6B72699C7.
The container should be FAT32 or ExFAT formatted. If you are using the Disk Utility, you would select MS-DOS (FAT) or ExFAT.
The boot file BOOTX64.EFI needs to be in the EFI/BOOT folder.

Operating system stored in partitions not recognized by the firmware. For example, partitions with NTFS (Windows) or EXT4 (Linux) volumes. Basically, the boot files go in a small EFI partition. The boot files are responsible for transferring control to the partition(s) containing the operating system.


The partition(s) should be type C12A7328-F81F-11D2-BA4B-00A0C93EC93B.
The container should be FAT32 formatted. If you are using the Disk Utility, you would select MS-DOS (FAT).
The boot file BOOTX64.EFI needs to be in the EFI/BOOT folder.