pygrub: Add HybridISO support for PyGrub2
authorPhilipp Hahn <hahn@univention.de>
Wed, 2 Nov 2011 16:28:57 +0000 (16:28 +0000)
committerPhilipp Hahn <hahn@univention.de>
Wed, 2 Nov 2011 16:28:57 +0000 (16:28 +0000)
commit93bf609a7782a612706e452a71913807ba28d22e
tree732650626d324daafb8fbd93427f4af0f582a80c
parent70e7871d0f8fef6271e3ec3d19ecbaa78eb98d9f
pygrub: Add HybridISO support for PyGrub2

grub-mkrescue internally uses xorriso, which generates a so-called
"Hybrid ISO": The ISO images also contains a DOS partition table,
which allows the identical ISO file to be stored on an USB stick for
booting from it. This breaks PyGrub, since it (wrongly) detects only
the DOS partition table and uses the first partition instead of the
complete ISO file.

Add a check to detect HybridISO files and use offset 0 in addition to
partition table parsing.

Signed-off-by: Philipp Hahn <hahn@univention.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/pygrub/src/pygrub