Luciano Miguel Ferreira Rocha
2009-May-14 15:27 UTC
[syslinux] [PATCH] isohybrid: user options
Allow the user to define the type of partition and its number from the command line. The following example creates partition numer 4 with type 1c (hidden FAT32 LBA): isohybrid -fstype=28 -pentry=4 hybrid.iso --- utils/isohybrid.in | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/utils/isohybrid.in b/utils/isohybrid.in index 83f9dc0..d67a2b5 100644 --- a/utils/isohybrid.in +++ b/utils/isohybrid.in @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/perl -s ## ----------------------------------------------------------------------- ## ## Copyright 2002-2008 H. Peter Anvin - All Rights Reserved @@ -19,6 +19,13 @@ use bytes; use Fcntl; +# Use Linux as default partition type (any better ideas?) +# e.g.: -fstype=28 (hidden FAT32 LBA) +our $fstype ||= 0x83; +# Use first partition slot +# e.g.: -pentry=4 (4th partition, as in original Zip discs) +our $pentry ||= 1; + # Use this fake geometry (zipdrive-style...) $h = 64; $s = 32; @@ -135,8 +142,6 @@ $bcyl = 0; $ehead = $h-1; $esect = $s + ((($cc-1) & 0x300) >> 2); $ecyl = ($cc-1) & 0xff; -$fstype = 0x83; # Linux (any better ideas?) -$pentry = 1; # First partition slot for ( $i = 1 ; $i <= 4 ; $i++ ) { if ( $i == $pentry ) { -- lfr 0/0
Luciano Miguel Ferreira Rocha wrote:> Allow the user to define the type of partition and its number from the > command line. > > The following example creates partition numer 4 with type 1c (hidden > FAT32 LBA): > isohybrid -fstype=28 -pentry=4 hybrid.isoAny way we could use more Unix-like options, without the = sign? -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.
Hi,> Luciano Miguel Ferreira Rocha wrote: > The following example creates partition numer 4 with type 1c (hidden > FAT32 LBA): > isohybrid -fstype=28 -pentry=4 hybrid.isoBecause i maintain an implementation of isohybrid inside libisofs i am curious about the importance, consequences, or benefits of above parameters. My implementation is just a C re-narration of isohybrid.in with the friendly permission of hpa. So i could need advise for dummies: Should i implement those two adjustable parameters in libisofs and xorriso ? If yes: what use cases could i mention in the documentation ? Have a nice day :) Thomas
Thomas Schmitt wrote:> Hi, > > hpa wrote: >> I honestly need to go back and look at all the traffic, > > To my counting the list of proposed variables is > now: > $pentry > $fstype > $h > $s > $id > plus your proposal about partition offset which i > cannot spot as variable in isohybrid.in. (The one > which would produce unmountable partition sd[a-z][1-4].) >Yes. I still suspect the only offset which really makes sense is 16 CD sectors = 32K, corresponding to the size of the system area. -hpa
Hi,> I still suspect the only offset which really makes sense is 16 CD > sectors = 32K, corresponding to the size of the system area.I cannot see any special advantage in 16 blocks offset. It would endanger mountablility as much as any other offset. There are image block addresses stored in the MBR and in the boot image. Which address space is in effect when those addresses are interpreted ? It appears possible to layout an ISO image that can be used from both addresses: Two superblocks, two directory trees, two boot images. Offset must be at least 64 kB. I am optimistic that this could be done if a real necessity emerges. But the effort will not be small. Have a nice day :) Thomas