Boot ISO from USB Stick

Many Linux distribution builders like Devuan and Debian produce hybrid ISO image that work on discs and USB sticks. You can make bootable USB sticks by simply copying the image to the USB device with this command

dd if=isoimage of=/dev/sdX bs=10240

You can find the device name (X) by looking into dmesg oder lsscsi, and looking for newly plugged scsi/block devices.

But some companies still don’t know about hybrid images and provide ISO images the need to be on disk. (like samsung SSD updater).

Workarround: You can use SysLinux to make an USB stick that can boot an ISO image

Install SysLinux using standard procedures, in my case: aptitude install syslinux (currently 3:6.03-dfsg-5-deb8u1)

Do the following steps:

  1. (optional) wipe the USB stick:  dd if=/dev/zero of=/dev/sdX
  2. make a bootable vfat partition: eg with fdisk /dev/sdX  (“n”), set the partition type to VFAT (“t” “c”) and make it active (“a”)
  3. format the partition to vfat: mkfs.vfat /dev/sdX1
  4. install SysLinux on it: syslinux /dev/sdX1
  5. mount the newly created partition: mount /dev/sdX1 /mnt/usb
  6. copy the memdisk feature to syslinux: cp /usr/lib/syslinux/memdisk /mnt/usb/
  7. make a syslinux.cfg file on the USB stick: vi /mnt/usb/syslinux.cfg
    LABEL iso
        LINUX memdisk
        INITRD image.iso
        APPEND iso
    
  8. copy the iso image to the usbstick: cp isoimage.iso /mnt/usb/image.iso
  9. unmount the USB strick: umount /mnt/usb

You can even put different ISO images to one stick by copying multiple ISO images and making multiple entries in syslinux.cfg.