Skip to content

Hybrid ISO/IMG format

The Hybrid ISO/IMG format is a combination image file format that can work two ways.

  • An ISO image file ready to directly “burn” to CD or DVD optical media.
  • A raw sector (IMG) image file read to directly dd to flash media.

The creation of this format was motivated by difficulties with the unetbootin tool that installs an ISO format image file on flash media. However, unetbootin can still be used with the hybrid format if it is desired to retain the existing FAT32 format of the flash media.

Future releases of Easy Peasy will be using this new format.

Recording to CD or DVD

To record a Hybrid ISO/IMG format file to CD or DVD optical media, use exactly the same program and method you would use for a regular ISO image format file. In some cases it may be necessary to first rename the file you wish to record so that the name ends in “.iso” or “.ISO” instead of the ending that was downloaded. If the file browser in your ISO/CD/DVD recording program cannot find the Hybrid ISO/IMG format file you downloaded, try changing the file type or file extension so it looks for “.img” or “.IMG”. If that option is not available, then rename the file where it was downloaded to. Consult the instructions or help system of your ISO/CD/DVD recording program for instructions on how to use it.

Easy Peasy images require DVD media, but may be able to fit on special high capacity CD media. Check the size capacity of your media and compare it to the size of the downloaded image file.

Recording to flash media on Windows

Use Image Writer for Windows (GUI based tool)

Download the tool

User guide to the Image Writer

Recording to flash media on Macintosh

You can help improve the Easy Peasy Wiki by editing this section.

Recording to flash media on Linux

In order to record the downloaded Hybrid ISO/IMG file to the flash media, you need to determine which device name the flash media has when it is inserted in the appropriate interface on the computer. It is very important to determine this correctly since these instructions will erase the contents of the specified device. You do not want to do that to any other devices on your computer since that can result in massive data loss and failure to reboot.

root permissions

To perform these commands, you will need to open a terminal or shell window, or switch the screen into the text mode. Then you will need to switch or login to user root to have the permission to access the device to record the image to. The underlined text in the example boxes shows the part to type in.

user@mycomputer:~$ su –
root@mycomputer:~# _

Alternatively, you can use the sudo command to run a shell. If you are running a Live CD in test mode (such as Easy Peasy or Ubuntu), this is the best way to get root access.

ubuntu@ubuntu:~$ sudo /bin/sh
# _

find media device

If you have any doubt about the name of the flash media device, you should verify it carefully. On Linux, the following command will show a list of block devices and partitions. Do this command once before inserting the media and note which devices are present. Then insert the media, wait about 15 seconds for the hardware and drivers to scan for the device, and repeat the command. The difference should show which device is the flash media.

cat /proc/partitions

The flash device will be named /dev/sdb or /dev/sdc on most computers. If your computer only has IDE built-in drives and they are named beginning with /dev/hda, then the flash device is likely to be named /dev/sda.

Do not use the device names that end with numbers. These represent the partitions of the device. If you record an image on a partition, the device will not boot and it will be necessary to repeat the recording steps with the correct device name.

WARNING: These steps will erase/destroy all data from the specified device

recording the flash media

The following command shows how to write the hybrid file for Easy Peasy 1.5 release candidate 1 (filename easypeasy-1.5rc1.iso.img) onto the device /dev/sdc. Use the name of your flash media device in place of /dev/sdc if it is different. Use the name of the hybrid file you downloaded and saved in place of easypeasy-1.5rc1.iso.img if it is different.

dd if=easypeasy-1.5rc1.iso.img of=/dev/sdc oflag=direct bs=1048576

If the computer you are using does not support the oflag= option, then try again leaving it out. Without it, the computer could run a little slower. This recording could take 2 to 10 minutes depending on the speed of your computer, its USB bus, and the flash media class.

The dd command will output statistics when it is complete. If there are no errors, you can remove the flash media after a few seconds. If your media has a busy indicator light, be sure to wait until it is no longer busy.

If all goes well, your flash media should be ready to boot in your netbook or other target computer. Be sure to follow the instructions for your computer to select the flash media device for booting. For example, on the ASUS EEE PC, press the ESC key during the initial BIOS POST to request a boot device menu. If you do not see the BIOS messages, consult the instructions that come with the computer to disable quick boot.

How the Hybrid ISO/IMG works

The Hybrid ISO/IMG format is a modification of the standard ISO format to make the image compatible with the expectations of hard drive booting

A standard ISO image typically includes the ISOLINUX boot loader which is loaded by the BIOS using the El Torito booting standard. The Hybrid image replaces the first 512 bytes of the ISO format (which is all binary zeros) with a PC hard drive Master Boot Record (MBR) containing: The stage 1 loader image from GRUB version 0.97, and a partition table with 1 partition that ends at the end of the hybrid image. The remainder of the ISO image is not modified.

Additional sectors are added at the end of the ISO image. These are:

  1. A copy of the kernel extracted from the ISO filesystem
  2. A copy of the initial ramdisk (initrd) from the ISO filesystem
  3. A copy of the memory test program from the ISO filesystem
  4. The GRUB stage 2 loader image

The script that builds the Hybrid ISO/IMG file applies a modification to the GRUB source code to including the menu and configuration inside GRUB itself. This is included in the stage 2 part. The stage 1 part is also modified to know the starting sector for the stage 2 part. The configuration includes sector lists for the kernel, initrd, and memory test programs.

Linux supports mounting filesystems of any type on any media. This means it can mount an ISO filesystem not only from a CD or DVD drive device, but also from a hard drive, either for the while drive or a partition. This ability is often used to mount an ISO image file via a loopback device bound to that file. The Casper initialization system in the Ubuntu distribution ISO image scans all devices to look for the root device. It finds the filesystem on the whole hard drive being emulated by the flash media.

The first sector of the Hybrid ISO/IMG format is also the first sector of the ISO image it uses. This allows the same image to be used either as an ISO format for optical media, or as an IMG format for hard/flash drive media.

You can further modify the Hybrid ISO/IMG data once it is recorded on the flash media to use the remainder of the flash media space for an additional partition. Use any partition program tool for this. This allows you to include your own data files on the same flash media as the installation image.

5/5 - (1 vote)

Leave a Reply

Your email address will not be published. Required fields are marked *