New -boot_image bootspec appended_part_as=apm, part_like_isohybrid=on

This commit is contained in:
Thomas Schmitt 2016-02-05 10:06:25 +00:00
parent 38f391b5ff
commit cea8a57b2e
10 changed files with 154 additions and 67 deletions

View File

@ -3,7 +3,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2015 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2016 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -287,6 +287,8 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->appended_part_types[i]= 0;
}
m->appended_as_gpt= 0;
m->appended_as_apm= 0;
m->part_like_isohybrid= 0;
m->ascii_disc_label[0]= 0;
m->grub2_sparc_core[0]= 0;
memset(m->hfsp_serial_number, 0, 8);

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2015 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2016 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -1068,9 +1068,20 @@ treatment_patch:;
xorriso->appended_as_gpt = 1;
} else if(strcmp(treatpt + 17, "mbr") == 0) {
xorriso->appended_as_gpt = 0;
xorriso->appended_as_apm = 0;
} else if(strcmp(treatpt + 17, "apm") == 0) {
xorriso->appended_as_apm = 1;
} else
was_ok= 0;
} else if(strncmp(treatpt, "part_like_isohybrid=", 20) == 0) {
if(strcmp(treatpt + 20, "on") == 0)
xorriso->part_like_isohybrid= 1;
else if(strcmp(treatpt + 20, "off") == 0)
xorriso->part_like_isohybrid= 0;
else
was_ok= 0;
} else if(strncmp(treatpt, "partition_hd_cyl=", 17)==0) {
u= 0;
sscanf(treatpt + 17, "%u", &u);

View File

@ -1826,6 +1826,7 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" |\"partition_cyl_align=\"|\"mbr_force_bootable=\"",
" |\"system_area=\"|\"partition_table=on|off\"",
" |\"partition_entry=\"|\"appended_part_as=\"",
" |\"part_like_isohybrid=\"",
" |\"chrp_boot_part=on|off=\"|\"prep_boot_part=\"",
" |\"efi_boot_part=\"|\"efi_boot_part=--efi-boot-image\"",
" |\"mips_path=\"|\"mipsel_path=\"|\"mips_discard\"",

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2015 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2016 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -3042,6 +3042,28 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= (xorriso->appended_as_gpt == 0 && xorriso->appended_as_apm == 0);
if(is_default) {
sprintf(line, "-boot_image any appended_part_as=mbr\n");
if(!no_defaults)
Xorriso_status_result(xorriso,filter,fp,flag&2);
} else {
if(xorriso->appended_as_gpt) {
sprintf(line, "-boot_image any appended_part_as=gpt\n");
Xorriso_status_result(xorriso,filter,fp,flag&2);
}
if(xorriso->appended_as_apm) {
sprintf(line, "-boot_image any appended_part_as=apm\n");
Xorriso_status_result(xorriso,filter,fp,flag&2);
}
}
is_default= (xorriso->part_like_isohybrid == 0);
sprintf(line, "-boot_image any part_like_isohybrid=%s\n",
xorriso->part_like_isohybrid ? "on" : "off");
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
ret= ((xorriso->system_area_options & 0x3cfc) == 0x400);
is_default= (ret == 0);
sprintf(line, "-boot_image any chrp_boot_part=%s\n",

View File

@ -951,6 +951,8 @@ int Xorriso_make_iso_write_opts(struct XorrisO *xorriso, IsoImage *image,
isoburn_igopt_set_part_flag(sopts, i + 1, intvl_string);
}
isoburn_igopt_set_appended_as_gpt(sopts, xorriso->appended_as_gpt);
isoburn_igopt_set_appended_as_apm(sopts, xorriso->appended_as_apm);
isoburn_igopt_set_part_like_isohybrid(sopts, xorriso->part_like_isohybrid);
isoburn_igopt_set_disc_label(sopts, xorriso->ascii_disc_label);
isoburn_igopt_set_hfsp_serial_number(sopts, xorriso->hfsp_serial_number);
isoburn_igopt_set_hfsp_block_size(sopts, xorriso->hfsp_block_size,

View File

@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH XORRISO 1 "Version 1.4.3, Dec 30, 2015"
.TH XORRISO 1 "Version 1.4.3, Jan 26, 2016"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -3301,6 +3301,13 @@ a disk file but nevertheless causes adjustments in the
loaded system area data. Such adjustments may get ordered by \-boot_image
commands.
.br
\fB\-boot_image any part_like_isohybrid=on\fR enables
\-boot_image isolinux partition_entry= even if no
\-boot_image isolinux system_area= is given.
No MBR partition of type 0xee emerges, even if GPT gets produced.
Gaps between GPT and APM partitions will not be filled by more partitions.
Appended partitions get mentioned in APM if other APM partitions emerge.
.br
\fBgrub2_mbr=\fRdisk_path works like "any" system_area= with additional
patching for modern GRUB MBRs. The content start address of the first boot
image is converted to a count of 512 byte blocks, and an offset of 4 is added.
@ -3339,6 +3346,14 @@ of type 0xee which covers the whole output data.
.br
\fBappended_part_as=mbr\fR is the default. Appended partitions get
marked in GPT only if GPT is produced because of other settings.
If given explicitely, this clears setting "gpt" and "apm". Nevertheless "apm"
may be added to "mbr".
.br
\fBappended_part_as=apm\fR marks partitions from \-append_partition in APM
additionally to "mbr" or "gpt".
.br
By default, appended partitions get marked in APM only if APM is
produced because of other options together with part_like_isohybrid="on".
.br
\fBchrp_boot_part=on\fR causes a single partition in MBR which covers
the whole ISO image and has type 0x96. This is not compatible with any
@ -5943,7 +5958,7 @@ Thomas Schmitt <scdbackup@gmx.net>
.br
for libburnia\-project.org
.SH COPYRIGHT
Copyright (c) 2007 \- 2015 Thomas Schmitt
Copyright (c) 2007 \- 2016 Thomas Schmitt
.br
Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of \fBxorriso\fR.

View File

@ -4,7 +4,7 @@ xorriso.texi.
xorriso - creates, loads, manipulates and writes ISO 9660 filesystem
images with Rock Ridge extensions.
Copyright (C) 2007 - 2015 Thomas Schmitt
Copyright (C) 2007 - 2016 Thomas Schmitt
Permission is granted to distrubute this text freely.
INFO-DIR-SECTION Archiving
@ -2776,6 +2776,12 @@ Examples:
reading of a disk file but nevertheless causes adjustments in the
loaded system area data. Such adjustments may get ordered by
-boot_image commands.
*-boot_image any part_like_isohybrid=on* enables -boot_image
isolinux partition_entry= even if no -boot_image isolinux
system_area= is given. No MBR partition of type 0xee emerges, even
if GPT gets produced. Gaps between GPT and APM partitions will not
be filled by more partitions. Appended partitions get mentioned in
APM if other APM partitions emerge.
*grub2_mbr=*disk_path works like "any" system_area= with additional
patching for modern GRUB MBRs. The content start address of the
first boot image is converted to a count of 512 byte blocks, and an
@ -2807,6 +2813,13 @@ Examples:
partition of type 0xee which covers the whole output data.
*appended_part_as=mbr* is the default. Appended partitions get
marked in GPT only if GPT is produced because of other settings.
If given explicitely, this clears setting "gpt" and "apm".
Nevertheless "apm" may be added to "mbr".
*appended_part_as=apm* marks partitions from -append_partition in
APM additionally to "mbr" or "gpt".
By default, appended partitions get marked in APM only if APM is
produced because of other options together with
part_like_isohybrid="on".
*chrp_boot_part=on* causes a single partition in MBR which covers
the whole ISO image and has type 0x96. This is not compatible with
any other feature that produces MBR partition entries. It makes
@ -5021,7 +5034,7 @@ for libburnia-project.org
14.2 Copyright
==============
Copyright (c) 2007 - 2015 Thomas Schmitt
Copyright (c) 2007 - 2016 Thomas Schmitt
Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of 'xorriso'. If you
make use of the license to derive modified versions of 'xorriso' then
@ -5056,7 +5069,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -alter_date sets timestamps in ISO image: Manip. (line 136)
* -alter_date_r sets timestamps in ISO image: Manip. (line 168)
* -append_partition adds arbitrary file after image end: Bootable.
(line 362)
(line 375)
* -application_id sets application id: SetWrite. (line 191)
* -application_use sets application use field: SetWrite. (line 250)
* -as emulates mkisofs or cdrecord: Emulation. (line 13)
@ -5296,11 +5309,12 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* ACL, show in ISO image, -getfacl: Navigate. (line 60)
* ACL, show in ISO image, -getfacl_r: Navigate. (line 66)
* ACL, _definition: Extras. (line 50)
* APM block size: Bootable. (line 353)
* APM block size: Bootable. (line 366)
* APM, _definition: Extras. (line 42)
* Appendable media, _definition: Media. (line 38)
* Appended Filesystem Image, -append_partition: Bootable. (line 362)
* Appended partition, in MBR or GPT: Bootable. (line 233)
* Appended Filesystem Image, -append_partition: Bootable. (line 375)
* Appended partition, in APM: Bootable. (line 246)
* Appended partition, in MBR or GPT: Bootable. (line 239)
* Automatic execution order, of arguments, -x: ArgSort. (line 16)
* Backslash Interpretation, _definition: Processing. (line 53)
* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 226)
@ -5317,15 +5331,15 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Character set, learn from image, -auto_charset: Loading. (line 123)
* Character Set, of terminal, -local_charset: Charset. (line 57)
* Character Set, _definition: Charset. (line 6)
* CHRP partition, _definition: Bootable. (line 238)
* CHRP partition, _definition: Bootable. (line 251)
* Closed media, _definition: Media. (line 44)
* Comment, #: Scripting. (line 156)
* Control, signal handling, -signal_handling: Exception. (line 66)
* Create, new ISO image, _definition: Methods. (line 7)
* Cylinder alignment, _definition: Bootable. (line 282)
* Cylinder size, _definition: Bootable. (line 267)
* Cylinder alignment, _definition: Bootable. (line 295)
* Cylinder size, _definition: Bootable. (line 280)
* Damaged track and session, close, -close_damaged: Writing. (line 164)
* DEC Alpha SRM boot sector, production: Bootable. (line 339)
* DEC Alpha SRM boot sector, production: Bootable. (line 352)
* Delete, from ISO image, -rm: Manip. (line 20)
* Delete, from ISO image, -rm_r: Manip. (line 26)
* Delete, ISO directory, -rmdir: Manip. (line 29)
@ -5356,7 +5370,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Drive, _definition: Drives. (line 6)
* EA, _definition: Extras. (line 66)
* ECMA-119, _definition: Model. (line 6)
* EFI system partition, _definition: Bootable. (line 247)
* EFI system partition, _definition: Bootable. (line 260)
* El Torito, _definition: Extras. (line 19)
* Emulation, -as: Emulation. (line 13)
* Emulation, .mkisofsrc, -read_mkisofsrc: Emulation. (line 155)
@ -5385,10 +5399,10 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Group, in ISO image, -chgrp_r: Manip. (line 53)
* Growing, _definition: Methods. (line 20)
* Hard links, control handling, -hardlinks: Loading. (line 134)
* HFS+ allocation block size: Bootable. (line 350)
* HFS+ serial number: Bootable. (line 347)
* HFS+ allocation block size: Bootable. (line 363)
* HFS+ serial number: Bootable. (line 360)
* hidden, set in ISO image, -hide: Manip. (line 171)
* HP-PA boot sector, production: Bootable. (line 322)
* HP-PA boot sector, production: Bootable. (line 335)
* Image reading, cache size, -data_cache_size: Loading. (line 332)
* Image, demand volume ID, -assert_volid: Loading. (line 111)
* Image, discard pending changes, -rollback: Writing. (line 9)
@ -5441,7 +5455,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* LBA, _definition: Drives. (line 17)
* List delimiter, _definition: Processing. (line 9)
* Local Character Set, _definition: Charset. (line 11)
* MBR bootable/active flag, enforce: Bootable. (line 293)
* MBR bootable/active flag, enforce: Bootable. (line 306)
* MBR, set, -boot_image system_area=: Bootable. (line 184)
* MBR, _definition: Extras. (line 27)
* MD5, control handling, -md5: Loading. (line 182)
@ -5449,7 +5463,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Media, format, -format: Writing. (line 87)
* Media, list formats, -list_formats: Writing. (line 129)
* Media, list write speeds, -list_speeds: Writing. (line 140)
* MIPS boot file, activation: Bootable. (line 301)
* MIPS boot file, activation: Bootable. (line 314)
* mkisofs, Emulation: Emulation. (line 17)
* Modifying, _definition: Methods. (line 28)
* Multi-session media, _definition: Media. (line 7)
@ -5476,15 +5490,15 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Ownership, global in ISO image, -uid: SetWrite. (line 268)
* Ownership, in ISO image, -chown: Manip. (line 43)
* Ownership, in ISO image, -chown_r: Manip. (line 47)
* Partition offset, _definition: Bootable. (line 257)
* Partition table, _definition: Bootable. (line 214)
* Partition offset, _definition: Bootable. (line 270)
* Partition table, _definition: Bootable. (line 220)
* Pathspec, _definition: SetInsert. (line 117)
* Pattern expansion, for disk paths, -disk_pattern: Insert. (line 34)
* Pattern expansion, for ISO paths, -iso_rr_pattern: Manip. (line 10)
* Pattern expansion, _definition: Processing. (line 25)
* Permissions, in ISO image, -chmod: Manip. (line 55)
* Permissions, in ISO image, -chmod_r: Manip. (line 66)
* PReP partition, _definition: Bootable. (line 242)
* PReP partition, _definition: Bootable. (line 255)
* Problems, reporting: Bugreport. (line 6)
* Process, consolidate text output, -pkt_output: Frontend. (line 7)
* Process, control abort on error, -abort_on: Exception. (line 27)
@ -5544,8 +5558,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Session, select as input, -load: Loading. (line 33)
* Session, _definition: Model. (line 6)
* Sorting order, for -x, -list_arg_sorting: ArgSort. (line 26)
* SUN Disk Label, production: Bootable. (line 312)
* SUN SPARC boot images, activation: Bootable. (line 385)
* SUN Disk Label, production: Bootable. (line 325)
* SUN SPARC boot images, activation: Bootable. (line 398)
* Symbolic link, create, -lns: Insert. (line 166)
* System area, _definition: Bootable. (line 184)
* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 278)
@ -5614,39 +5628,39 @@ Node: Filter99272
Node: Writing103894
Node: SetWrite114049
Node: Bootable136994
Node: Jigdo160022
Node: Charset164281
Node: Exception167608
Node: DialogCtl173737
Node: Inquiry176339
Node: Navigate184789
Node: Verify193084
Node: Restore202961
Node: Emulation211574
Node: Scripting221984
Node: Frontend229766
Node: Examples239401
Node: ExDevices240579
Node: ExCreate241240
Node: ExDialog242540
Node: ExGrowing243811
Node: ExModifying244620
Node: ExBootable245130
Node: ExCharset245685
Node: ExPseudo246581
Node: ExCdrecord247508
Node: ExMkisofs247828
Node: ExGrowisofs249185
Node: ExException250339
Node: ExTime250797
Node: ExIncBackup251255
Node: ExRestore255281
Node: ExRecovery256227
Node: Files256799
Node: Seealso258133
Node: Bugreport258848
Node: Legal259439
Node: CommandIdx260451
Node: ConceptIdx277493
Node: Jigdo160788
Node: Charset165047
Node: Exception168374
Node: DialogCtl174503
Node: Inquiry177105
Node: Navigate185555
Node: Verify193850
Node: Restore203727
Node: Emulation212340
Node: Scripting222750
Node: Frontend230532
Node: Examples240167
Node: ExDevices241345
Node: ExCreate242006
Node: ExDialog243306
Node: ExGrowing244577
Node: ExModifying245386
Node: ExBootable245896
Node: ExCharset246451
Node: ExPseudo247347
Node: ExCdrecord248274
Node: ExMkisofs248594
Node: ExGrowisofs249951
Node: ExException251105
Node: ExTime251563
Node: ExIncBackup252021
Node: ExRestore256047
Node: ExRecovery256993
Node: Files257565
Node: Seealso258899
Node: Bugreport259614
Node: Legal260205
Node: CommandIdx261217
Node: ConceptIdx278259

End Tag Table

View File

@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
@c man .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISO 1 "Version 1.4.3, Dec 30, 2015"
@c man .TH XORRISO 1 "Version 1.4.3, Jan 26, 2016"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -69,7 +69,7 @@
xorriso - creates, loads, manipulates and writes ISO 9660 filesystem images
with Rock Ridge extensions.
Copyright @copyright{} 2007 - 2015 Thomas Schmitt
Copyright @copyright{} 2007 - 2016 Thomas Schmitt
@quotation
Permission is granted to distrubute this text freely.
@ -3836,6 +3836,13 @@ a disk file but nevertheless causes adjustments in the
loaded system area data. Such adjustments may get ordered by -boot_image
commands.
@*
@strong{-boot_image any part_like_isohybrid=on} enables
-boot_image isolinux partition_entry= even if no
-boot_image isolinux system_area= is given.
No MBR partition of type 0xee emerges, even if GPT gets produced.
Gaps between GPT and APM partitions will not be filled by more partitions.
Appended partitions get mentioned in APM if other APM partitions emerge.
@*
@strong{grub2_mbr=}disk_path works like "any" system_area= with additional
patching for modern GRUB MBRs. The content start address of the first boot
image is converted to a count of 512 byte blocks, and an offset of 4 is added.
@ -3876,6 +3883,15 @@ of type 0xee which covers the whole output data.
@*
@strong{appended_part_as=mbr} is the default. Appended partitions get
marked in GPT only if GPT is produced because of other settings.
If given explicitely, this clears setting "gpt" and "apm". Nevertheless "apm"
may be added to "mbr".
@*
@cindex Appended partition, in APM
@strong{appended_part_as=apm} marks partitions from -append_partition in APM
additionally to "mbr" or "gpt".
@*
By default, appended partitions get marked in APM only if APM is
produced because of other options together with part_like_isohybrid="on".
@*
@cindex CHRP partition, _definition
@strong{chrp_boot_part=on} causes a single partition in MBR which covers
@ -6980,7 +6996,7 @@ Thomas Schmitt <scdbackup@@gmx.net>
for libburnia-project.org
@c man .SH COPYRIGHT
@section Copyright
Copyright (c) 2007 - 2015 Thomas Schmitt
Copyright (c) 2007 - 2016 Thomas Schmitt
@*
Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of @command{xorriso}.

View File

@ -2,7 +2,7 @@
/* Command line oriented batch and dialog tool which creates, loads,
manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2015 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2016 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -483,7 +483,11 @@ struct XorrisO { /* the global context of xorriso */
uint8_t appended_part_types[Xorriso_max_appended_partitionS];
/* If 1: With appended partitions: create protective MBR and mark by GPT */
int appended_as_gpt;
/* If 1: With appended partitions: mark by APM */
int appended_as_apm;
/* If 1: Apply isohybrid gestures to non-isohybrid situations */
int part_like_isohybrid;
/* Eventual name of the non-ISO aspect of the image. E.g. SUN ASCII label.
*/

View File

@ -1 +1 @@
#define Xorriso_timestamP "2016.02.05.095140"
#define Xorriso_timestamP "2016.02.05.100719"