Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MakeIso.ps1 - PowerShell ISO Creator

Create bootable ISO images with a single click - no installation, no dependencies, just PowerShell.

What is MakeIso?

MakeIso is a pure PowerShell script that creates bootable ISO images from folders or modifies existing ISOs. It's designed for maximum simplicity:

  • One-Click Mode: Place a companion ISO (MakeIso.iso) next to the script, run it, and get a bootable ISO with your files merged in
  • Embedded ISOs: Embed a base ISO directly into the script for portable, self-contained distribution
  • No Installation: Just download and run - no external tools, no dependencies
  • Cross-Platform: Works on Windows (PowerShell 5.1+) and any OS with PowerShell 7+

Why Use MakeIso?

Feature Benefit
Zero Setup No installation required - just download MakeIso.ps1 and run
One-Click Bootable ISOs Drop files in a folder, run script, get bootable ISO
Companion ISO Mode Keep MakeIso.iso next to script for instant bootable ISOs
Embedded ISO Mode Distribute self-contained scripts with built-in boot images
Preserve Boot Config Modify existing ISOs without breaking boot functionality
Windows + Linux Joliet for Windows, Rock Ridge for Linux - both enabled by default

The Simplest Way to Create Bootable ISOs

your_project/
├── MakeIso.ps1           # The script
├── MakeIso_FreeDOS.iso   # Companion ISO (auto-detected!)
└── my_files/             # Your files to add
    ├── document.pdf
    └── setup.exe
# That's it! Just run the script:
./MakeIso.ps1
# → Creates bootable ISO with your files merged in

Features

  • ISO 9660 Compliance: Level 1 (8.3 filenames) and Level 2 (31 character filenames)
  • Joliet Extension: Unicode filenames with case preservation for Windows compatibility
  • Rock Ridge Extension: POSIX file attributes and long filenames for Linux compatibility
  • El Torito Boot Support: Create bootable ISOs with multiple boot modes
    • ISOLINUX/SYSLINUX no-emulation boot
    • FreeDOS floppy emulation (1.2MB, 1.44MB, 2.88MB)
    • Custom boot images
  • SourceIso Mode: Modify existing ISOs while preserving boot configuration
  • Embedded ISO: Embed a base ISO directly into the script for portable distribution
  • Companion ISO: Auto-detect MakeIso*.iso in the script directory
  • Large File Support: Streaming architecture handles files >2GB
  • Filename Collision Resolution: Automatic mangling for ISO 9660 name conflicts

Requirements

  • PowerShell: Version 5.1 or later (PowerShell 7 recommended)
  • Operating System: Windows 10/11, Windows Server 2016+, or any OS with PowerShell 7+
  • .NET Framework: 4.5+ (for System.IO.Compression)

Installation

No installation required. Simply download MakeIso.ps1 to your project directory.

# Download directly
Invoke-WebRequest -Uri "https://your-source/MakeIso.ps1" -OutFile "MakeIso.ps1"

Usage

Basic Syntax

./MakeIso.ps1 [-SystemFolder <path>] [-DataFolder <path>] [-Destination <path>] [options]

Parameters

Parameter Description
-SystemFolder Folder containing bootable system files (boot loader, kernel, etc.)
-DataFolder Additional data folder to merge into the ISO
-Destination Output ISO file path (default: parent folder of source)
-VolumeName Volume label (max 32 characters, default: "ISO")
-BootImage External boot image file path (floppy or hard disk image)
-BootFile Boot loader file inside the ISO (e.g., boot/isolinux/isolinux.bin)
-BootEmulation Boot emulation mode: Auto, None, Floppy144, Floppy288, Floppy12
-SourceIso Source ISO to modify (preserves existing boot configuration)
-PreferData On file collision, prefer DataFolder over SystemFolder
-NoJoliet Disable Joliet extension (Unicode filenames)
-NoRockRidge Disable Rock Ridge extension (POSIX attributes)
-Level1 Use ISO 9660 Level 1 (8.3 filenames) instead of Level 2
-NoSystem Create non-bootable ISO from DataFolder only
-EmbedIso Embed an ISO file into a copy of the script
-NoWait Skip "Press any key to continue" prompt (for automated scripts)

Usage Examples

1. Basic Usage with Companion ISO

Place a companion ISO file named MakeIso.iso or MakeIso_*.iso in the same directory as the script:

project/
├── MakeIso.ps1
├── MakeIso_FreeDOS.iso    # Companion ISO (auto-detected)
└── data/
    └── myfiles/
# Uses companion ISO as base, merges current folder, waits for keypress
./MakeIso.ps1

# Same but skip the keypress wait (for automated scripts)
./MakeIso.ps1 -NoWait

# Specify data folder explicitly
./MakeIso.ps1 -DataFolder ./data

Note: When running without parameters, the script waits for a keypress before exiting. Use -NoWait to skip this for automated scripts.

2. Embedded ISO Mode

Embed a base ISO into the script for portable distribution:

# Create a self-contained script with embedded ISO
./MakeIso.ps1 -EmbedIso boot.iso
# Creates a copy of MakeIso.ps1 with the ISO embedded

# The embedded script can then be distributed and used:
./MakeIso_Embedded.ps1 -DataFolder ./patches -Destination output.iso

Note: Embedded ISOs larger than 700MB are not recommended due to memory and performance impact.

3. SystemFolder Mode (Create from Boot Files)

Create a bootable ISO from a folder containing boot files:

# Basic bootable ISO
./MakeIso.ps1 -SystemFolder ./boot -Destination boot.iso

# With additional data
./MakeIso.ps1 -SystemFolder ./boot -DataFolder ./data -Destination output.iso

# With custom volume name
./MakeIso.ps1 -SystemFolder ./boot -VolumeName "MY_BOOT_DISK" -Destination boot.iso

4. SourceIso Mode (Modify Existing ISO)

Modify an existing ISO while preserving its boot configuration:

# Add files to existing bootable ISO
./MakeIso.ps1 -SourceIso original.iso -DataFolder ./updates -Destination modified.iso

# Replace files in existing ISO (prefer data folder versions)
./MakeIso.ps1 -SourceIso original.iso -DataFolder ./updates -PreferData -Destination modified.iso

# Inherit volume name from source
./MakeIso.ps1 -SourceIso original.iso -DataFolder ./data -Destination modified.iso

5. Boot Configuration Examples

ISOLINUX Boot (No-Emulation)

# Auto-detect isolinux.bin in system folder
./MakeIso.ps1 -SystemFolder ./isolinux -Destination boot.iso

# Explicit boot file specification
./MakeIso.ps1 -SystemFolder ./boot -BootFile isolinux/isolinux.bin -Destination boot.iso

FreeDOS Floppy Emulation

# 1.44MB floppy emulation
./MakeIso.ps1 -SystemFolder ./freedos -BootImage freedos.img -BootEmulation Floppy144 -Destination freedos.iso

# 2.88MB floppy emulation
./MakeIso.ps1 -SystemFolder ./freedos -BootImage floppy288.img -BootEmulation Floppy288 -Destination freedos.iso

Custom Boot Image

# No-emulation boot with custom boot loader
./MakeIso.ps1 -SystemFolder ./boot -BootImage bootloader.bin -BootEmulation None -Destination custom.iso

6. ISO Extension Options

# Disable Joliet (for maximum compatibility)
./MakeIso.ps1 -SystemFolder ./boot -NoJoliet -Destination boot.iso

# Disable Rock Ridge (for Windows-only ISOs)
./MakeIso.ps1 -SystemFolder ./boot -NoRockRidge -Destination boot.iso

# ISO 9660 Level 1 (8.3 filenames for legacy systems)
./MakeIso.ps1 -SystemFolder ./boot -Level1 -Destination legacy.iso

# Non-bootable data ISO
./MakeIso.ps1 -DataFolder ./documents -NoSystem -Destination data.iso

Companion ISO Naming Convention

The script automatically detects companion ISO files in the same directory:

  • MakeIso.iso - Default companion ISO
  • MakeIso_*.iso - Named companion ISOs (e.g., MakeIso_FreeDOS.iso, MakeIso_Linux.iso)

When no parameters are specified and a companion ISO exists, it will be used as the base ISO.

Embedded ISO Size Recommendation

Embedded ISOs are compressed with gzip and stored as base64 comments in the script. For optimal performance:

  • Recommended maximum: 700MB (CD-ROM size)
  • Works well: Up to 50MB (fast extraction)
  • Avoid: ISOs larger than 700MB (memory/performance impact)

Boot Support Details

Supported Boot Modes

Mode Description Use Case
No-Emulation Boot loader loaded directly (default for ISOLINUX) Linux, modern boot loaders
Floppy 1.44MB 1.44MB floppy disk emulation FreeDOS, legacy DOS
Floppy 2.88MB 2.88MB floppy disk emulation Large DOS images
Floppy 1.2MB 1.2MB floppy disk emulation (5.25") Legacy systems

Auto-Detection

When -BootEmulation Auto is used (default), the script detects the appropriate mode:

  1. BootFile mode: Defaults to no-emulation for ISOLINUX-style boot loaders
  2. BootImage mode: Detects floppy image size and selects appropriate emulation

Boot Info Table Patching

The script automatically patches the ISOLINUX boot info table for proper boot loader operation. This ensures the boot loader can locate its files within the ISO.

ISO Extensions

Joliet

  • Unicode (UCS-2) filenames up to 64 characters
  • Preserves case sensitivity for Windows compatibility
  • Enabled by default (disable with -NoJoliet)

Rock Ridge

  • POSIX file attributes (permissions, timestamps)
  • Long filenames (up to 250 characters)
  • Symbolic links support
  • Enabled by default (disable with -NoRockRidge)

ISO 9660

  • Level 1: 8.3 filenames (8 characters + 3 character extension)
  • Level 2: Up to 31 character filenames (default)

File Collision Resolution

When merging folders, file collisions are resolved as follows:

  1. Default: SystemFolder files take priority (ensures bootability)
  2. With -PreferData: DataFolder files overwrite SystemFolder files
# SystemFolder wins on collision (default)
./MakeIso.ps1 -SystemFolder ./boot -DataFolder ./data -Destination output.iso

# DataFolder wins on collision
./MakeIso.ps1 -SystemFolder ./boot -DataFolder ./data -PreferData -Destination output.iso

Limitations

  • UEFI Boot: Does not create UEFI-bootable ISOs (BIOS/El Torito only)
  • Large Directories: Very large directories (>1000 files) may slow down processing
  • Memory: Large ISOs (>4GB) require sufficient memory for processing

Troubleshooting

Boot Issues

  1. "Image checksum error": The script automatically patches ISOLINUX boot info tables. If this error persists, verify the boot loader version.

  2. ISO doesn't boot: Ensure the boot file is correctly specified:

    # Check boot file location
    ./MakeIso.ps1 -SystemFolder ./boot -BootFile boot/isolinux/isolinux.bin -Destination boot.iso
  3. FreeDOS doesn't boot: Use the correct floppy emulation:

    ./MakeIso.ps1 -SystemFolder ./freedos -BootImage freedos.img -BootEmulation Floppy144 -Destination freedos.iso

File Issues

  1. Long filenames truncated: Use Joliet/Rock Ridge (enabled by default) or shorten filenames.

  2. Files missing from ISO: Check for filename collisions in the output log. The script reports resolved collisions.

  3. ISO too large: The script supports large ISOs, but verify sufficient disk space for the output.

License

Free for any use (personal, commercial, educational, etc.).

Author

Danila P Zinovyev

Warranty

NONE - Use at your own risk. No warranty expressed or implied.


Quick Reference

# Create bootable ISO from folder
./MakeIso.ps1 -SystemFolder ./boot -Destination output.iso

# Modify existing ISO
./MakeIso.ps1 -SourceIso original.iso -DataFolder ./updates -Destination modified.iso

# Use companion ISO (auto-detected as MakeIso*.iso)
./MakeIso.ps1                                    # Waits for keypress
./MakeIso.ps1 -NoWait                            # No keypress wait

# Use embedded ISO (when script has embedded ISO)
./MakeIso.ps1 -DataFolder ./data -Destination output.iso

# Embed ISO into script copy
./MakeIso.ps1 -EmbedIso base.iso

# Create non-bootable data ISO
./MakeIso.ps1 -DataFolder ./files -NoSystem -Destination data.iso

# FreeDOS bootable ISO
./MakeIso.ps1 -SystemFolder ./freedos -BootImage freedos.img -BootEmulation Floppy144 -Destination freedos.iso

About

PowerShell script for creating bootable ISO images

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages