From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philipp Hahn Subject: Re: [PATCH] Add HybridISO support for PyGrub2 Date: Tue, 25 Oct 2011 12:33:41 +0200 Message-ID: <201110251233.45315.hahn@univention.de> References: <201110251057.06774.hahn@univention.de> <1319534259.3385.224.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0968419898==" Return-path: In-Reply-To: <1319534259.3385.224.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --===============0968419898== Content-Type: multipart/signed; boundary="nextPart11695233.mM0l5UuBvS"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart11695233.mM0l5UuBvS Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello Ian, Am Dienstag 25 Oktober 2011 11:17:38 schrieb Ian Campbell: > On Tue, 2011-10-25 at 09:56 +0100, Philipp Hahn wrote: > > 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 the > > DOS partition table and uses the first partition instead of the complete > > ISO file. > > Is the problem here that, having detected a DOS partition, pygrub is > then unwilling to accept that the partition contains an ISO9660 file > system? PyGrub chcks for the DOS partition table by reading the last two bytes of t= he=20 first 512 byte sector. Since the HybridISO has a valid partition table, the= =20 first partition starting at offset 512 is used instead of the full image=20 starting at offset 0. > Or is it that the DOS partition table covers something other=20 > than the ISO9660 data? As far as I understood it, the partition covers the same area of the iso to= =20 protect it from accidently trashing the data on the stick. But since it has= =20 different sector sizes (512 vs 2048) and offsets (512 vs. 0), the data=20 actually looks like garbage (at least "file" detects nothing) > Where does the kernel we want to boot actually=20 > live? In the ISO starting at offset 0. > Is there some reference to the layout of an hybridiso? You might want to take a look at syslinux from hpa; his web-page still seem= s=20 to be unaccessable. has a= short=20 summary. > i.e. what is the significance on 0x8006? It's what "file" does to detect ISO-Images. At offset 0x8000 the ISO 9660=20 Primary Volume Descriptor starts. From offset [2..6[ is the "id", which mos= t=20 often is "CD001". See=20 for a= =20 complete spec. > What are the chances of false positives?=20 Existing, but small: 1:2^40. As fas as I know many Linux distributions use the HybridISO trick. I've rea= d=20 from Debian, Ubuntu, Arch Linux,Gentoo. But they don't seem to use PyGrub=20 with Xen for PV installations ;-) Sincerely Philipp =2D-=20 Philipp Hahn Open Source Software Engineer hahn@univention.de Univention GmbH Linux for Your Business fon: +49 421 22 232- 0 Mary-Somerville-Str.1 D-28359 Bremen fax: +49 421 22 232-99 http://www.univention.de/ --nextPart11695233.mM0l5UuBvS Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAk6mkIUACgkQYPlgoZpUDjlmPACgvq8S/gJ1Pd6rIds2E2vkn+om VFMAniPRYkUqYPgmgbGjVx/ZrUq5lpUp =gK/X -----END PGP SIGNATURE----- --nextPart11695233.mM0l5UuBvS-- --===============0968419898== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0968419898==--