How do I determine if an ISO is a hybrid?

19

6

According to this: http://en.wikipedia.org/wiki/ISO_image#Description

"A more recent example is the release of hybrid ISO files that can be booted or started from both BD or DVD and USB flash drive devices when the image is written to any of these storage devices."

How do I use standard Linux tools to determine if the ISO I have downloaded (edit: or created via genisoimage) is a hybrid?

Thanks!

cat pants

Posted 2013-12-02T22:45:32.443

Reputation: 635

1Check for the battery pack? – Daniel R Hicks – 2013-12-02T22:50:28.000

Answers

11

Run fdisk on the file. If it shows anything meaningful, it is hybrid.

ssmy

Posted 2013-12-02T22:45:32.443

Reputation: 1 250

3

What do you mean by "anything meaningful"? If I run fdisk on my win7.iso, I get four lines about sector size, etc. I still don't think it's hybrid. https://paste.ee/p/r60ZR. Could you be more explicit please?

– Mads Skjern – 2018-05-13T01:22:16.900

8

Run the file command on the ISO image in question. The output from running this command on a non-hybrid ISO will look something like this

image.iso: ISO 9660 CD-ROM filesystem data 'foo' (bootable)

while the output from running this command on a hybrid ISO will look something like this

image.iso: DOS/MBR boot sector ISO 9660 CD-ROM filesystem data (DOS/MBR boot sector) 'foo' (bootable); partition 1 : ID=0x17, active, start-CHS (0x0,0,1), end-CHS (0x288,63,32), startsector 0, 1329152 sectors

chaosape

Posted 2013-12-02T22:45:32.443

Reputation: 131

3

You can use this script to check the ISO image (-i flag for "inspect")

https://github.com/jsamr/bootiso

bootiso -i "your iso image"

Create a USB bootable device from an ISO image easily and securely.

Don't want to messup the system with dd command? Create a bootable USB from an ISO in one line [see it in action].

Works seamlessly with hybrid and non-hybrid ISOs (SYSLINUX or UEFI compliant) such as any linux ISO, Windows ISO or rescue live-cds like UltimateBootCD. You don't have to tweak anything: bootiso inspects the ISO file and chooses the best method to make your USB bootable.

msadek

Posted 2013-12-02T22:45:32.443

Reputation: 31

1

You can run head -c 512 thefile.iso > bytes.txt.

In a proper non-hybrid ISO the bytes should all be zeros (maybe not visible by default in your text editor). Though in theory they could contain any random garbage, so in a non-zero case it is harder to confirm if it is a hybrid without more in-depth analysis of the bytes.

For Windows users you can install the gnuwin32 coreutils package to get that command.

jiggunjer

Posted 2013-12-02T22:45:32.443

Reputation: 831

1

This detects a partition table, not present at non-hybrid ROM media:

cat romdisk.iso 2>/dev/null | head -c 512 | tail -c 2 | xxd -p | grep -ie '55aa$'

What I don't know how to determine is between hybrid-ISO and harddisk image:

cat disk.img 2>/dev/null | head -c 512 | hexdump -vC

Narcis Garcia

Posted 2013-12-02T22:45:32.443

Reputation: 11

0

@chaosape's answer should be the accepted solution.

After using file, if the ISO turns out not to be a hybrid and you need it to be (eg. to create a bootable USB), just use isohybrid to convert it:

isohybrid [PATH_TO_ISO]

You can also use flags such as -u to make it UEFI bootable.

https://www.mankier.com/1/isohybrid

adatum

Posted 2013-12-02T22:45:32.443

Reputation: 101