| name | iso-generation |
| description | Create bootable ISO images using xorriso, genisoimage, or mkisofs. Use when building live CDs, installation media, rescue disks, or custom Linux distributions. |
Bootable ISO Generation
Create bootable ISO images for CD/DVD/USB distribution.
Directory Structure
Standard ISO layout:
iso/
├── boot/
│ ├── grub/
│ │ └── grub.cfg
│ └── isolinux/
│ ├── isolinux.bin
│ ├── isolinux.cfg
│ └── ldlinux.c32
├── EFI/
│ └── BOOT/
│ └── BOOTX64.EFI
├── live/
│ ├── vmlinuz
│ ├── initrd.img
│ └── filesystem.squashfs
└── .disk/
└── info
Basic ISO Creation with xorriso
xorriso -as mkisofs \
-o output.iso \
-isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
-c boot/isolinux/boot.cat \
-b boot/isolinux/isolinux.bin \
-no-emul-boot \
-boot-load-size 4 \
-boot-info-table \
iso/
BIOS + UEFI Hybrid ISO
xorriso -as mkisofs \
-o output.iso \
-isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
-c boot/isolinux/boot.cat \
-b boot/isolinux/isolinux.bin \
-no-emul-boot \
-boot-load-size 4 \
-boot-info-table \
-eltorito-alt-boot \
-e EFI/efiboot.img \
-no-emul-boot \
-isohybrid-gpt-basdat \
iso/
Using genisoimage
genisoimage \
-o output.iso \
-b boot/isolinux/isolinux.bin \
-c boot/isolinux/boot.cat \
-no-emul-boot \
-boot-load-size 4 \
-boot-info-table \
-J -R -V "MyLiveCD" \
iso/
ISO Options
| Option | Description |
|---|---|
-o |
Output filename |
-b |
Boot image (El Torito) |
-c |
Boot catalog |
-no-emul-boot |
No disk emulation |
-boot-load-size 4 |
Load 4 sectors |
-boot-info-table |
Patch boot image |
-J |
Joliet extensions |
-R |
Rock Ridge extensions |
-V |
Volume label |
Make ISO Bootable from USB
# Using isohybrid
isohybrid output.iso
# Or with xorriso (use -isohybrid-mbr flag)
Testing ISO
# Test with QEMU (BIOS)
qemu-system-x86_64 -cdrom output.iso -boot d
# Test with QEMU (UEFI)
qemu-system-x86_64 -cdrom output.iso -boot d \
-bios /usr/share/OVMF/OVMF_CODE.fd
Creating EFI Boot Image
# Create FAT image for EFI
dd if=/dev/zero of=efiboot.img bs=1M count=10
mkfs.vfat efiboot.img
mmd -i efiboot.img ::/EFI ::/EFI/BOOT
mcopy -i efiboot.img bootx64.efi ::/EFI/BOOT/