From: Philipp Hahn <hahn@univention.de>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] Add HybridISO support for PyGrub2
Date: Tue, 25 Oct 2011 12:33:41 +0200 [thread overview]
Message-ID: <201110251233.45315.hahn@univention.de> (raw)
In-Reply-To: <1319534259.3385.224.camel@zakaz.uk.xensource.com>
[-- Attachment #1.1: Type: text/plain, Size: 2597 bytes --]
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 the
first 512 byte sector. Since the HybridISO has a valid partition table, the
first partition starting at offset 512 is used instead of the full image
starting at offset 0.
> Or is it that the DOS partition table covers something other
> than the ISO9660 data?
As far as I understood it, the partition covers the same area of the iso to
protect it from accidently trashing the data on the stick. But since it has
different sector sizes (512 vs 2048) and offsets (512 vs. 0), the data
actually looks like garbage (at least "file" detects nothing)
> Where does the kernel we want to boot actually
> 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 seems
to be unaccessable.
<http://forum.avira.com/wbb/index.php?page=Thread&threadID=99493> has a short
summary.
> i.e. what is the significance on 0x8006?
It's what "file" does to detect ISO-Images. At offset 0x8000 the ISO 9660
Primary Volume Descriptor starts. From offset [2..6[ is the "id", which most
often is "CD001". See
<http://users.telenet.be/it3.consultants.bvba/handouts/ISO9960.html> for a
complete spec.
> What are the chances of false positives?
Existing, but small: 1:2^40.
As fas as I know many Linux distributions use the HybridISO trick. I've read
from Debian, Ubuntu, Arch Linux,Gentoo. But they don't seem to use PyGrub
with Xen for PV installations ;-)
Sincerely
Philipp
--
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/
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2011-10-25 10:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-25 8:56 [PATCH] Add HybridISO support for PyGrub2 Philipp Hahn
2011-10-25 9:17 ` Ian Campbell
2011-10-25 9:51 ` Tim Deegan
2011-10-25 10:33 ` Philipp Hahn [this message]
2011-10-27 10:21 ` Ian Campbell
2011-10-28 7:46 ` [PATCH v2] " Philipp Hahn
2011-10-28 11:54 ` Ian Campbell
2011-11-01 18:53 ` Ian Jackson
2011-11-01 19:04 ` Philipp Hahn
2011-11-02 16:29 ` Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201110251233.45315.hahn@univention.de \
--to=hahn@univention.de \
--cc=Ian.Campbell@citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.