Prepare the OSX USB Boot

Create OSX USB Boot

Check Disk/ Format Disk HSJ+

diskutil list
sudo diskutil eraseVolume jhfs+ MyVolume disk0s4

Create USB Boot

https://hackintosher.com/guides/make-macos-flash-drive-installer/

sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --applicationpath /Applications/Install\ macOS\ High\ Sierra.app --volume /Volumes/Hackintosher/

remove all partitions (recommended)

diskutil list
diskutil unmount /dev/disk0s4
gpt destroy /dev/diskY

Disk Command


Others

diskutil list

In my case I wanted to format the parition as NTFS for installing Windows 7 on it. The last parameter is the partition 4 on first disk.

diskutil eraseVolume "Tuxera NTFS" my-ntfs disk0s4

To list available filesystems

diskutil listFilesystems

For those of you looking to format an entire disk and remove all partitions here is the command:

diskutil eraseDisk free itsfree /dev/disk6

Partitioning a Disk

diskutil partitionDisk /dev/disk2 GPT JHFS+ New 0b
sudo diskutil eraseVolume jhfs+ MyVolume disk0s4

https://tobywf.com/2017/01/diskutil/

App for Create USB Boot

http://diskmakerx.com/

Command Line

https://9to5mac.com/2017/08/02/how-to-create-bootable-macos-high-sierra-usb-install-drive-video/