Enabled use of libisofs interval reader in xorriso

This commit is contained in:
2015-04-23 14:23:45 +00:00
parent 811cbd8b80
commit 8fbd7bbf69
8 changed files with 674 additions and 216 deletions

View File

@ -1003,6 +1003,45 @@ boot code. All three do not hamper El Torito booting from CDROM.
MIPS Little Endian (DEC), SUN SPARC, HP-PA, DEC Alpha. Those are
mutually not combinable and also not combinable with MBR, GPT, or APM.
Several of the following options expect disk paths as input but also
accept description strings for the libisofs interval reader, which is
able to cut out data from disk files or -indev and to zeroize parts of
the content: -G, -generic-boot, --embedded-boot, --grub2-mbr,
-isohybrid-mbr, -efi-boot-part, -prep-boot-part, -B, -sparc-boot,
-append_partition.
The description string consists of the following components, separated
by colon ':'
"--interval:"Flags":"Interval":"Zeroizers":"Source
The component "--interval" states that this is not a plain disk path
but rather a interval reader description string.
The component Flags modifies the further interpretation:
"local_fs" demands to read from a file depicted by the path in Source.
"imported_iso" demands to read from the -indev. This works only if
-outdev is not the same as -indev. The Source component is ignored.
The component Interval consists of two byte address numbers separated
by a "-" character. E.g. "0-429" means to read bytes 0 to 429.
The component Zeroizers consists of zero or more comma separated
strings. They define which part of the read data to zeroize. Byte
number 0 means the byte read from the Interval start address. Each
string may be one of:
"zero_mbrpt" demands to zeroize the MBR partition table if bytes 510
and 511 bear the MBR signature 0x55 0xaa.
"zero_gpt" demands to check for a GPT header in bytes 512 to 1023, to
zeroize it and its partition table blocks.
"zero_apm" demands to check for an APM block 0 and to zeroize its
partition table blocks.
Start_byte"-"End_byte demands to zeroize the read-in bytes beginning
with number Start_byte and ending after End_byte.
The component Source is the file path with flag "local_fs", and ignored
with flag "imported_iso".
Byte numbers may be scaled by a suffix out of {k,m,g,t,s,d} meaning
multiplication by {1024, 1024k, 1024m, 1024g, 2048, 512}. A scaled value
end number depicts the last byte of the scaled range.
E.g. "0d-0d" is "0-511".
Examples:
"local_fs:0-32767:zero_mbrpt,zero_gpt,440-443:/tmp/template.iso"
"imported_iso:45056d-47103d::"
-G disk_path
Copy at most 32768 bytes from the given disk file to the very
start of the ISO image.
@ -1082,27 +1121,29 @@ mutually not combinable and also not combinable with MBR, GPT, or APM.
effect if a new ISO image gets written.
-partition_hd_cyl number
Set the number of heads per cylinder for the partition table. 0
chooses a default value. Maximum is 255.
Set the number of heads per cylinder for the MBR partition table.
0 chooses a default value. Maximum is 255.
-partition_sec_hd number
Set the number of sectors per head for the partition table. 0
Set the number of sectors per head for the MBR partition table. 0
chooses a default value. Maximum is 63.
The product partition_sec_hd * partition_hd_cyl * 512 is the
cylinder size. It should be divisible by 2048 in order to allow
exact alignment. If it is too small to describe the image size by
at most 1024 cylinders, then appropriate values of
partition_hd_cyl are chosen with partition_sec_hd 32 or 63. If the
image is larger than 8,422,686,720 bytes, then the cylinder size
constraints cannot be fulfilled. They seem not overly important
anyway. Flat block addresses in partition tables are good for 1
TiB.
exact alignment. With appended partitions and
-appended_part_as_gpt there is no limit for the number of
cylinders. Else there may be at most 1024 of them. If the
cylinder size is too small to stay below the limit, then
appropriate values of partition_hd_cyl are chosen with
partition_sec_hd 32 or 63. If the image is larger than
8,422,686,720 bytes, then the cylinder size constraints cannot be
fulfilled for MBR. They seem not overly important anyway. Flat
block addresses in partition tables are good for 1 TiB.
-partition_cyl_align mode
Control image size alignment to an integer number of cylinders.
It is prescribed by isohybrid specs and it seems to please program
fdisk. Cylinder size must be divisible by 2048. Images larger
than 8,323,596,288 bytes cannot be aligned.
than 8,323,596,288 bytes cannot be aligned in MBR partition table.
Mode "auto" is default. Alignment by padding happens only if
option -isohybrid-mbr is given.
Mode "on" causes alignment by padding with option
@ -1120,14 +1161,16 @@ mutually not combinable and also not combinable with MBR, GPT, or APM.
will get overwritten.
partition_number may be 1 to 4. Number 1 will put the whole ISO
image into the unclaimed space before partition 1. So together
with most xorriso MBR features, number 2 would be the most natural
choice.
with most xorriso MBR or GPT features, number 2 would be the most
natural choice.
The type_code may be "FAT12", "FAT16", "Linux", or a hexadecimal
number between 0x00 and 0xff. Not all those numbers will yield
usable results. For a list of codes search the Internet for
"Partition Types" or run fdisk command "L".
"Partition Types" or run fdisk command "L". This code matters
only with MBR, not with GPT.
If some other command causes the production of GPT, then the
appended partitions will be mentioned there too.
appended partitions will be mentioned there too, even if not
-appended_part_as_gpt is given.
-appended_part_as_gpt
Marks partitions from -append_partition in GPT rather than in MBR.
@ -1840,12 +1883,12 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* --boot-catalog-hide Hide El Torito boot catalog: Bootable.
(line 116)
* --efi-boot El Torito EFI boot image: Bootable. (line 58)
* --embedded-boot Fill System Area e.g. by MBR: SystemArea. (line 38)
* --embedded-boot Fill System Area e.g. by MBR: SystemArea. (line 77)
* --emul-toc enable table-of-content emulation: SetProduct. (line 37)
* --for_backup Enable backup fidelity: SetExtras. (line 67)
* --grub2-boot-info Patch El Torito boot image: Bootable. (line 101)
* --grub2-mbr Install modern GRUB2 MBR: SystemArea. (line 41)
* --grub2-sparc-core SUN SPARC core file: SystemArea. (line 219)
* --grub2-mbr Install modern GRUB2 MBR: SystemArea. (line 80)
* --grub2-sparc-core SUN SPARC core file: SystemArea. (line 262)
* --hardlinks Recording of hardlink relations: SetExtras. (line 92)
* --md5 Recording of MD5 checksums: SetExtras. (line 84)
* --modification-date set ISO image timestamps: ImageId. (line 82)
@ -1860,7 +1903,7 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
(line 84)
* --old-root-no-md5 disable MD5 with -old-root: SetInsert. (line 105)
* --protective-msdos-label Patch System Area partition table: SystemArea.
(line 86)
(line 125)
* --quoted_path_list read pathspecs from disk file: SetInsert.
(line 13)
* --scdbackup_tag Recording of MD5 checksum: SetExtras. (line 101)
@ -1876,14 +1919,14 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -A set Application Id: ImageId. (line 38)
* -abstract set Abstract File path: ImageId. (line 66)
* -allow-lowercase lowercase in ISO file names: SetCompl. (line 46)
* -alpha-boot DEC Alpha SRM bootloader: SystemArea. (line 249)
* -append_partition Append MBR partition after image: SystemArea.
(line 132)
* -alpha-boot DEC Alpha SRM bootloader: SystemArea. (line 292)
* -append_partition Append MBR or GPT partition after image: SystemArea.
(line 173)
* -appended_part_as_gpt Appended partitions in GPT: SystemArea.
(line 151)
(line 194)
* -appid set Application Id: ImageId. (line 46)
* -b El Torito PC-BIOS boot image: Bootable. (line 32)
* -B SUN SPARC boot images: SystemArea. (line 201)
* -B SUN SPARC boot images: SystemArea. (line 244)
* -biblio set Biblio File path: ImageId. (line 72)
* -boot-info-table Patch El Torito boot image: Bootable. (line 95)
* -boot-load-size El Torito boot image load size: Bootable. (line 63)
@ -1894,8 +1937,8 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -checksum_algorithm_iso choose .jigdo checksums: Jigdo. (line 80)
* -checksum_algorithm_template choose .template checksums: Jigdo.
(line 87)
* -chrp-boot CHRP partition: SystemArea. (line 179)
* -chrp-boot-part CHRP partition: SystemArea. (line 169)
* -chrp-boot CHRP partition: SystemArea. (line 222)
* -chrp-boot-part CHRP partition: SystemArea. (line 212)
* -copyright set Copyright File path: ImageId. (line 77)
* -D allow deep directory hierachies: SetExtras. (line 31)
* -d omit trailing dot in ISO file names: SetCompl. (line 56)
@ -1906,7 +1949,7 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -disallow_dir_id_ext enforce ISO level 1 directory names: SetCompl.
(line 24)
* -e El Torito EFI boot image: Bootable. (line 50)
* -efi-boot-part EFI boot partition: SystemArea. (line 158)
* -efi-boot-part EFI boot partition: SystemArea. (line 201)
* -eltorito-alt-boot begin next boot catalog entry: Bootable.
(line 43)
* -eltorito-boot El Torito PC-BIOS boot image: Bootable. (line 40)
@ -1922,8 +1965,8 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -follow-links follow symbolic links on disk: SetInsert. (line 28)
* -full-iso9660-filenames allow 31 characters in ISO file names: SetCompl.
(line 66)
* -G Fill System Area e.g. by MBR: SystemArea. (line 25)
* -generic-boot Fill System Area e.g. by MBR: SystemArea. (line 35)
* -G Fill System Area e.g. by MBR: SystemArea. (line 64)
* -generic-boot Fill System Area e.g. by MBR: SystemArea. (line 74)
* -graft-points enable target=source pathspecs: SetInsert. (line 31)
* -gui increase frequency of pacifier messages: Miscellaneous.
(line 31)
@ -1951,22 +1994,22 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
(line 16)
* -hide-rr-moved set deep directory relocation target: SetExtras.
(line 64)
* -hppa-bootloader HP-PA bootloader file: SystemArea. (line 233)
* -hppa-cmdline HP-PA PALO command line: SystemArea. (line 226)
* -hppa-hdrversion HP-PA PALO header version: SystemArea. (line 245)
* -hppa-kernel_32 HP-PA kernel_32 file: SystemArea. (line 236)
* -hppa-kernel_64 HP-PA kernel_64 file: SystemArea. (line 239)
* -hppa-ramdisk HP-PA ramdisk file: SystemArea. (line 242)
* -hppa-bootloader HP-PA bootloader file: SystemArea. (line 276)
* -hppa-cmdline HP-PA PALO command line: SystemArea. (line 269)
* -hppa-hdrversion HP-PA PALO header version: SystemArea. (line 288)
* -hppa-kernel_32 HP-PA kernel_32 file: SystemArea. (line 279)
* -hppa-kernel_64 HP-PA kernel_64 file: SystemArea. (line 282)
* -hppa-ramdisk HP-PA ramdisk file: SystemArea. (line 285)
* -input-charset set character set of disk file names: Charset.
(line 17)
* -iso-level define ISO 9660 limitations: SetCompl. (line 7)
* -isohybrid-apm-hfsplus Mark boot image in APM: SystemArea.
(line 77)
* -isohybrid-gpt-basdat Mark boot image in GPT: SystemArea. (line 60)
(line 116)
* -isohybrid-gpt-basdat Mark boot image in GPT: SystemArea. (line 99)
* -isohybrid-gpt-hfsplus Mark boot image in GPT: SystemArea.
(line 72)
(line 111)
* -isohybrid-mbr Install ISOLINUX isohybrid MBR: SystemArea.
(line 48)
(line 87)
* -J enable production of Joliet directory tree: SetExtras. (line 110)
* -jigdo-exclude add exclusion pattern for .md5: Jigdo. (line 59)
* -jigdo-force-md5 add check pattern for .md5: Jigdo. (line 52)
@ -1987,8 +2030,8 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -max-iso9660-filenames allow 37 characters in ISO file names: SetCompl.
(line 69)
* -md5-list set path of readable .md5: Jigdo. (line 73)
* -mips-boot MIPS Big Endian boot image: SystemArea. (line 188)
* -mipsel-boot MIPS Little Endian boot image: SystemArea. (line 195)
* -mips-boot MIPS Big Endian boot image: SystemArea. (line 231)
* -mipsel-boot MIPS Little Endian boot image: SystemArea. (line 238)
* -N omit version number in ISO file names: SetCompl. (line 73)
* -no-emul-boot El Torito boot image emulation: Bootable. (line 74)
* -no-pad do not add zeros to ISO tree: SetProduct. (line 104)
@ -2006,13 +2049,13 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -p set Preparer Id: ImageId. (line 54)
* -P set Publisher Id: ImageId. (line 30)
* -pad add 300 KiB of zeros to ISO tree: SetProduct. (line 97)
* -partition_cyl_align Image size alignment: SystemArea. (line 120)
* -partition_hd_cyl MBR heads per cylinder: SystemArea. (line 103)
* -partition_cyl_align Image size alignment: SystemArea. (line 161)
* -partition_hd_cyl MBR heads per cylinder: SystemArea. (line 142)
* -partition_offset Make mountable by partition 1: SystemArea.
(line 91)
* -partition_sec_hd MBR sectors per head: SystemArea. (line 107)
(line 130)
* -partition_sec_hd MBR sectors per head: SystemArea. (line 146)
* -path-list read pathspecs from disk file: SetInsert. (line 8)
* -prep-boot-part PReP partition: SystemArea. (line 182)
* -prep-boot-part PReP partition: SystemArea. (line 225)
* -preparer set Preparer Id: ImageId. (line 63)
* -prev-session set path for loading existing ISO image: Loading.
(line 22)
@ -2030,8 +2073,8 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -root redirect ISO root directory: SetInsert. (line 64)
* -rr_reloc_dir set deep directory relocation target: SetExtras.
(line 47)
* -sparc-boot SUN SPARC boot images: SystemArea. (line 213)
* -sparc-label SUN Disk Label text: SystemArea. (line 216)
* -sparc-boot SUN SPARC boot images: SystemArea. (line 256)
* -sparc-label SUN Disk Label text: SystemArea. (line 259)
* -sysid set System Id: ImageId. (line 49)
* -transparent-compression enable recognition of zisofs files: SetInsert.
(line 61)
@ -2081,45 +2124,45 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
(line 101)
* Bootability, boot image patching, -boot-info-table: Bootable.
(line 95)
* Bootability, control, --grub2-sparc-core: SystemArea. (line 219)
* Bootability, control, --grub2-sparc-core: SystemArea. (line 262)
* Bootability, control, --efi-boot: Bootable. (line 58)
* Bootability, control, -alpha-boot: SystemArea. (line 249)
* Bootability, control, -alpha-boot: SystemArea. (line 292)
* Bootability, control, -b, -eltorito-boot: Bootable. (line 32)
* Bootability, control, -B, -sparc-boot: SystemArea. (line 201)
* Bootability, control, -B, -sparc-boot: SystemArea. (line 244)
* Bootability, control, -e: Bootable. (line 50)
* Bootability, control, -hppa-bootloader: SystemArea. (line 233)
* Bootability, control, -hppa-cmdline: SystemArea. (line 226)
* Bootability, control, -hppa-hdrversion: SystemArea. (line 245)
* Bootability, control, -hppa-kernel_32: SystemArea. (line 236)
* Bootability, control, -hppa-kernel_64: SystemArea. (line 239)
* Bootability, control, -hppa-ramdisk: SystemArea. (line 242)
* Bootability, control, -mips-boot: SystemArea. (line 188)
* Bootability, control, -mipsel-boot: SystemArea. (line 195)
* Bootability, control, -hppa-bootloader: SystemArea. (line 276)
* Bootability, control, -hppa-cmdline: SystemArea. (line 269)
* Bootability, control, -hppa-hdrversion: SystemArea. (line 288)
* Bootability, control, -hppa-kernel_32: SystemArea. (line 279)
* Bootability, control, -hppa-kernel_64: SystemArea. (line 282)
* Bootability, control, -hppa-ramdisk: SystemArea. (line 285)
* Bootability, control, -mips-boot: SystemArea. (line 231)
* Bootability, control, -mipsel-boot: SystemArea. (line 238)
* Bootability, El Torito section id string, -eltorito-id: Bootable.
(line 82)
* Bootability, El Torito selection criteria, -eltorito-selcrit: Bootable.
(line 90)
* Bootability, fill System Area e.g. by MBR, -G, --embedded-boot, -generic-boot: SystemArea.
(line 25)
* Bootability, for CHRP, -chrp-boot-part: SystemArea. (line 169)
* Bootability, for EFI, -efi-boot-part: SystemArea. (line 158)
* Bootability, for PReP, -prep-boot-part: SystemArea. (line 182)
(line 64)
* Bootability, for CHRP, -chrp-boot-part: SystemArea. (line 212)
* Bootability, for EFI, -efi-boot-part: SystemArea. (line 201)
* Bootability, for PReP, -prep-boot-part: SystemArea. (line 225)
* Bootability, install ISOLINUX isohybrid MBR, -isohybrid-mbr: SystemArea.
(line 48)
(line 87)
* Bootability, install modern GRUB2 MBR, --grub2-mbr: SystemArea.
(line 41)
(line 80)
* Bootability, mark boot image in APM, -isohybrid-apm-hfsplus: SystemArea.
(line 77)
(line 116)
* Bootability, mark boot image in GPT, -isohybrid-gpt-basdat: SystemArea.
(line 60)
(line 99)
* Bootability, mark boot image in GPT, -isohybrid-gpt-hfsplus: SystemArea.
(line 72)
(line 111)
* Bootability, next entry, -eltorito-alt-boot: Bootable. (line 43)
* Bootability, no boot image emulation, -no-emul-boot: Bootable.
(line 74)
* Bootability, patch System Area partition table, --protective-msdos-label: SystemArea.
(line 86)
* Bootability, SUN Disk Label text, -sparc-label: SystemArea. (line 216)
(line 125)
* Bootability, SUN Disk Label text, -sparc-label: SystemArea. (line 259)
* Bugs, reporting: Bugreport. (line 6)
* Character Set, for disk file names, -input-charset: Charset.
(line 17)
@ -2143,7 +2186,7 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Forced output, control, --stdio_sync: SetProduct. (line 25)
* GPT, _definition: SystemArea. (line 13)
* GPT, mark appended partitions, -appended_part_as_gpt: SystemArea.
(line 151)
(line 194)
* HFS+, _definition: Standards. (line 32)
* HFS+, enables production: SetExtras. (line 130)
* HFS+, issue blessing ppc_bootdir, -hfs-bless: SetExtras. (line 188)
@ -2159,7 +2202,7 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Hiding, from ISO and Rock Ridge, -hide-list: SetHide. (line 16)
* Hiding, from Joliet, -hide-joliet: SetHide. (line 20)
* Hiding, from Joliet, -hide-joliet-list: SetHide. (line 25)
* Image size, alignment, -partition_cyl_align: SystemArea. (line 120)
* Image size, alignment, -partition_cyl_align: SystemArea. (line 161)
* Incremental insertion, disable disk ino, --old-root-no-ino: SetInsert.
(line 84)
* Incremental insertion, disable MD5, --old-root-no-md5: SetInsert.
@ -2167,6 +2210,7 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Incremental insertion, enable disk devno, --old-root-devno: SetInsert.
(line 97)
* Incremental insertion, enable, -old-root: SetInsert. (line 70)
* Interval reader for system area and partitions: SystemArea. (line 24)
* ISO 9660, _definition: Standards. (line 6)
* ISO 9660:1999, _definition: Standards. (line 26)
* ISO file names, 7-bit special characters, -relaxed-filenames: SetCompl.
@ -2212,14 +2256,14 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Links, follow on disk, -f, -follow-links: SetInsert. (line 24)
* Links, record and load hard links, --hardlinks: SetExtras. (line 92)
* MBR, _definition: SystemArea. (line 9)
* MBR, append partition, -append_partition: SystemArea. (line 132)
* MBR, sectors per head, -partition_sec_hd: SystemArea. (line 103)
* MBR, GPT, append partition, -append_partition: SystemArea. (line 173)
* MBR, sectors per head, -partition_sec_hd: SystemArea. (line 142)
* MD5, record and load, --md5: SetExtras. (line 84)
* Message output, increase frequency, -gui: Miscellaneous. (line 31)
* Message output, redirect stderr, -log-file: Miscellaneous. (line 35)
* Message output, suppress, -quiet: Miscellaneous. (line 27)
* Mountability, by non-trivial partition 1, -partition_offset: SystemArea.
(line 91)
(line 130)
* Options, list, -help: Miscellaneous. (line 23)
* Output file, set address, -o, -output: SetProduct. (line 8)
* Padding, 300 KiB, -pad: SetProduct. (line 97)
@ -2277,22 +2321,22 @@ Node: SetHide30591
Node: ImageId31899
Node: Bootable36067
Node: SystemArea41247
Node: Charset53438
Node: Jigdo54464
Node: Miscellaneous58731
Node: Examples60375
Node: ExSimple60861
Node: ExGraft61340
Node: ExMkisofs62587
Node: ExGrowisofs63840
Node: ExIncBackup65012
Node: ExIncBckAcc68130
Node: ExBootable69806
Node: Files71898
Node: Seealso72972
Node: Bugreport73628
Node: Legal74209
Node: CommandIdx75104
Node: ConceptIdx90529
Node: Charset55811
Node: Jigdo56837
Node: Miscellaneous61104
Node: Examples62748
Node: ExSimple63234
Node: ExGraft63713
Node: ExMkisofs64960
Node: ExGrowisofs66213
Node: ExIncBackup67385
Node: ExIncBckAcc70503
Node: ExBootable72179
Node: Files74271
Node: Seealso75345
Node: Bugreport76001
Node: Legal76582
Node: CommandIdx77477
Node: ConceptIdx92909

End Tag Table