How To Convert Pkg To Iso

.pkg

Converting a file to an .iso can mean a few different things depending on what you're working with.

  • What You’ll Need:

    1. Extract:
      mkdir ~/pkg_extract
      xar -xf MyApp.pkg -C ~/pkg_extract
      cd ~/pkg_extract
      cat Payload | gunzip -dc | cpio -i
      
    2. Build ISO:
      mkdir ~/iso_source
      mv [extracted_files] ~/iso_source/
      hdiutil makehybrid -o ~/MyApp.cdr ~/iso_source -iso -joliet
      hdiutil convert ~/MyApp.cdr -format UDTO -o ~/MyApp.iso
      mv ~/MyApp.iso.cdr ~/MyApp.iso
      
    3. Test by mounting the ISO.

    : Unmount the volume and convert the DMG to a CDR/ISO format: hdiutil detach /Volumes/Install\ macOS\ [Name] how to convert pkg to iso