How to install a bootable ISO onto a single partition of a usb stick


Previous questions/answers dealt with the simple case of a single partition on the USB disk that was just overwritten with dd. Also it looks like the disk utility gui doesn't allow creation of multiple partitions on a usb drive now. Anyway:

I've created 3 partitions on my stick, with the command:
diskutil partitionDisk disk4 3 APM hfsx d1 1.35G ExFat d2 1.25G ExFat d3 13.0G.

This actually left me with 5 partitions:

Finished partitioning on disk4
/dev/disk4 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        *16.0 GB    disk4
   1:        Apple_partition_map                         32.3 KB    disk4s1
   2:                 Apple_Boot Boot OS X               134.2 MB   disk4s2
   3:                 Apple_HFSX d1                      1.2 GB     disk4s3
   4:               Windows_NTFS d2                      1.3 GB     disk4s4
   5:               Windows_NTFS d3                      13.4 GB    disk4s5

I've got a bootable linux ISO. Which device should I dd it to? The original target was supposed to be the 1.2Gb partition that is marked disk4s3. I don't know what the other stuff before it is. Should I just dd to /dev/disk4s1 and let it overwrite stuff after it?

Best Answer

You can use Unetbootin to copy the Linux ISO to 1.2GB partition(disk4s3).

If I were you though I would first rewrite the partition type as GPT instead of APM by running:

diskutil partitionDisk disk4 GPT fat32 Linux 10% ExFat d2 10% ExFat d3 80%

Then select the Linux partition on disk4 in UNetbootin to be the destination for the ISO copy.