New option -append_partition, -as mkisofs -append_partition

This commit is contained in:
Thomas Schmitt 2010-10-18 21:22:23 +00:00
parent ac7374f858
commit 3657f55f96
13 changed files with 322 additions and 79 deletions

View File

@ -114,6 +114,7 @@ Xorriso_option_acl;
Xorriso_option_add;
Xorriso_option_add_plainly;
Xorriso_option_alter_date;
Xorriso_option_append_partition;
Xorriso_option_application_id;
Xorriso_option_as;
Xorriso_option_assert_volid;

View File

@ -225,6 +225,10 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->partition_offset= 0;
m->partition_secs_per_head= 0;
m->partition_heads_per_cyl= 0;
for(i= 0; i < 4; i++) {
m->appended_partitions[i][0]= 0;
m->appended_part_types[i]= 0;
}
m->vol_creation_time= 0;
m->vol_modification_time= 0;
m->vol_expiration_time= 0;

View File

@ -570,6 +570,10 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
"--scdbackup_tag", "--sort-weight",
""
};
static char arg3_options[][41]= {
"-append_partition",
""
};
static char final_options[][41]= {
"-find",
""
@ -591,6 +595,10 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
for(i=0; arg2_options[i][0]!=0; i++)
if(strcmp(arg2_options[i], cmd)==0)
return(1);
*count= 3;
for(i=0; arg3_options[i][0]!=0; i++)
if(strcmp(arg3_options[i], cmd)==0)
return(1);
*count= argc - 1;
for(i=0; final_options[i][0]!=0; i++)
if(strcmp(final_options[i], cmd)==0)
@ -746,6 +754,8 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
" -partition_sec_hd NUMBER Define number of sectors per head",
" -partition_hd_cyl NUMBER Define number of heads per cylinder",
" -mips-boot FILE Set mips boot image name (relative to image root)",
" -append_partition NUMBER TYPE FILE",
" Append FILE after image. TYPE is hex: 0x..",
" --modification-date=YYYYMMDDhhmmsscc",
" Override date of creation and modification",
" -isohybrid-mbr FILE Set SYSLINUX mbr/isohdp[fp]x*.bin for isohybrid",
@ -1343,6 +1353,13 @@ not_enough_args:;
ret= Xorriso_option_jigdo(xorriso, argv[i - 1], argv[i], 0);
if(ret <= 0)
goto problem_handler_2;
} else if(strcmp(argv[i], "-append_partition") == 0) {
i+= 3;
ret= Xorriso_option_append_partition(xorriso, argv[i - 2], argv[i - 1],
argv[i], 0);
if(ret <= 0)
goto problem_handler_2;
} else if(argv[i][0]=='-' && argv[i][1]!=0) {
ret= Xorriso_genisofs_count_args(xorriso, argc - i, argv + i, &count, 1);
if(ret > 0) {

View File

@ -455,6 +455,10 @@ int Xorriso_boot_item_status(struct XorrisO *xorriso, char *cat_path,
}
/*
bit0= do only report non-default settings
bit1= do only report to fp
*/
int Xorriso_boot_status_mips(struct XorrisO *xorriso, IsoImage *image,
char *filter, FILE *fp, int flag)
{
@ -480,6 +484,28 @@ int Xorriso_boot_status_mips(struct XorrisO *xorriso, IsoImage *image,
}
/*
bit0= do only report non-default settings
bit1= do only report to fp
*/
int Xorriso_append_part_status(struct XorrisO *xorriso, IsoImage *image,
char *filter, FILE *fp, int flag)
{
int i;
for(i= 0; i < 4; i++) {
if(xorriso->appended_partitions[i][0] == 0)
continue;
sprintf(xorriso->result_line, "-append_partition %d 0x%2.2x ",
i + 1, (unsigned int) xorriso->appended_part_types[i]);
Text_shellsafe(xorriso->appended_partitions[i], xorriso->result_line, 1);
strcat(xorriso->result_line, "\n");
Xorriso_status_result(xorriso, filter, fp, flag & 2);
}
return(1);
}
/*
bit0= do only report non-default settings
bit1= do only report to fp
@ -511,7 +537,7 @@ int Xorriso_boot_image_status(struct XorrisO *xorriso, char *filter, FILE *fp,
if(image == NULL)
goto no_image;
ret= Xorriso_boot_status_mips(xorriso, image, filter, fp, 0);
ret= Xorriso_boot_status_mips(xorriso, image, filter, fp, flag & 3);
if(ret < 0) /* == 0 is normal */
{ret= 0; goto ex;}
@ -530,7 +556,7 @@ no_image:;
}
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
ret= 1; goto ex;
ret= 1; goto after_el_torito;
}
@ -620,6 +646,11 @@ no_image:;
if(ret <= 0)
goto ex;
after_el_torito:;
ret = Xorriso_append_part_status(xorriso, image, filter, fp, flag & 3);
if(ret <= 0)
goto ex;
ret= 1;
ex:
if(boots != NULL)

View File

@ -255,6 +255,55 @@ ex:;
}
/* Option -append_partition */
int Xorriso_option_append_partition(struct XorrisO *xorriso, char *partno_text,
char *type_text, char *image_path, int flag)
{
int partno = 0, type_code= -1, i;
unsigned int unum;
char *tpt;
static char *part_type_names[] = {"FAT12", "FAT16", "Linux", NULL};
static int part_type_codes[] = { 0x01, 0x06, 0x83};
sscanf(partno_text, "%d", &partno);
if(partno < 1 || partno > 4) {
sprintf(xorriso->info_text,
"-append_partition: Partition number '%s' is out of range (1...4)",
partno_text);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
for(i= 0; part_type_names[i] != NULL; i++)
if(strcmp(part_type_names[i], type_text) == 0)
break;
if(part_type_names[i] != NULL)
type_code= part_type_codes[i];
if(type_code < 0) {
tpt= type_text;
if(strncmp(tpt, "0x", 2) == 0)
tpt+= 2;
else
goto bad_type;
unum= 0xffffffff;
sscanf(tpt, "%X", &unum);
if(unum > 0xff) {
bad_type:;
sprintf(xorriso->info_text,
"-append_partition: Partition type '%s' is out of range (0x00...0xff)",
type_text);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
type_code= unum;
}
if(Sfile_str(xorriso->appended_partitions[partno - 1], image_path, 0) <= 0)
return(-1);
xorriso->appended_part_types[partno - 1]= type_code;
return(1);
}
/* Option -application_id */
int Xorriso_option_application_id(struct XorrisO *xorriso, char *name,
int flag)

View File

@ -1403,6 +1403,9 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" mips_path= adds Big Endian MIPS boot files. mipsel_path=",
" sets one Little Endian MIPS boot file. Both are mutually",
" exclusive and exclusive to MBR production.",
" -append_partition partition_number type_code disk_path",
" Append a prepared filesystem image after the end of the",
" ISO image. Caution: Will be overwritten by multi-session.",
"",
" -uid uid User id to be used for the whole multi-session ISO image.",
" -gid gid Group id for the same purpose.",

View File

@ -483,6 +483,10 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv,
"scdbackup_tag","update","update_r","volume_date",
""
};
static char arg3_commands[][40]= {
"append_partition",
""
};
static char arg4_commands[][40]= {
"cut_out","extract_cut","mount","mount_cmd","paste_in","session_string",
""
@ -530,6 +534,10 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv,
for(i=0; arg2_commands[i][0]!=0; i++)
if(strcmp(arg2_commands[i], cmd)==0)
return(1);
*count= 3;
for(i=0; arg3_commands[i][0]!=0; i++)
if(strcmp(arg3_commands[i], cmd)==0)
return(1);
*count= 4;
for(i=0; arg4_commands[i][0]!=0; i++)
if(strcmp(arg4_commands[i], cmd)==0)
@ -648,6 +656,11 @@ next_command:;
ret= Xorriso_option_alter_date(xorriso, arg1, arg2, argc, argv, idx,
strlen(cmd)>10);
} else if(strcmp(cmd,"append_partition")==0) {
(*idx)+= 3;
ret= Xorriso_option_append_partition(xorriso, arg1, arg2, argv[*idx - 1],
0);
} else if(strcmp(cmd,"application_id")==0) {
(*idx)++;
ret= Xorriso_option_application_id(xorriso, arg1, 0);

View File

@ -27,8 +27,7 @@
#include <fcntl.h>
#include <stdint.h>
/* >>> later change this to Xorriso_standalonE */
#ifdef Xorriso_jte_standalonE
#ifdef Xorriso_standalonE
#ifdef Xorriso_with_libjtE
#include "../libjte/libjte.h"
@ -40,7 +39,7 @@
#include <libjte/libjte.h>
#endif
#endif /* ! Xorriso_jte_standalonE */
#endif /* ! Xorriso_standalonE */
#include "xorriso.h"
#include "xorriso_private.h"
@ -737,6 +736,12 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
isoburn_igopt_set_scdbackup_tag(sopts, xorriso->scdbackup_tag_name,
xorriso->scdbackup_tag_time,
xorriso->scdbackup_tag_written);
for(i= 0; i < 4; i++) {
if(xorriso->appended_partitions[i][0] == 0)
continue;
ret= isoburn_igopt_set_partition_img(sopts, i + 1,
xorriso->appended_part_types[i], xorriso->appended_partitions[i]);
}
if(image!=NULL && 12+strlen(Xorriso_timestamP)<80) {
strcpy(xorriso_id, xorriso->preparer_id);
img_id= (char *) iso_image_get_data_preparer_id(image);

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 "Oct 13, 2010"
.TH XORRISO 1 "Oct 18, 2010"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -2221,7 +2221,7 @@ xorriso adds the traditional 300k of padding by default to all images.
.br
For images which will never get to a CD it is safe to use -padding 0 .
.TP
.B El Torito bootable ISO images:
.B Bootable ISO images:
.PP
Contrary to published specifications many BIOSes will load an El Torito
record from the first session on media and not from the last one, which
@ -2238,6 +2238,14 @@ it is advised to patch it
when a follow-up session gets written. But one should not rely on the
capability to influence the bootability of the existing sessions, unless one
can assume overwriteable media.
.br
There are booting mechanisms which do not use an El Torito record but rather
start at the first bytes of the image: PC-BIOS MBR for hard-disk-like devices,
MIPS Volume Header for old SGI computers, DEC Boot Block for old DECstation.
.br
The boot firmware EFI may use programs which are located in a FAT filesystem
and announced by an MBR partition table entry.
.br
.TP
\fB\-boot_image\fR "any"|"isolinux"|"grub"
.br
@ -2411,13 +2419,42 @@ partition offset. 0 chooses a default value.
.br
\fBmips_path=\fRiso_rr_path declares a data file in the image to be a
MIPS Big Endian boot file. Enable production of a MIPS Big Endian Volume
Header. This is mutually exclusive with any MBR production. It will overwrite
the first 512 bytes of any data eventually provided by system_area=.
Header. This is mutually exclusive with MBR production and mipsel_path=.
It will overwrite the first 512 bytes of any data eventually provided by
system_area=.
Up to 15 boot files can be declared by mips_path=.
.br
\fBmipsel_path=\fRiso_rr_path declares a data file in the image to be the
MIPS Little Endian boot file. This is mutually exclusive with MBR production
and mips_path=. It will overwrite the first 512 bytes of any data eventually
provided by system_area=.
Only a single boot file can be declared by mipsel_path=.
.br
\fBmips_discard\fR revokes any boot file declarations made by mips_path=.
This removes the ban on MBR production.
.br
.br
.TP
\fB\-append_partition\fR partition_number type_code disk_path
Cause a prepared filesystem image to be appended to the ISO image and to be
described by a partition table entry in an MBR at the start of the emerging
ISO image. The partition entry will bear the size of the submitted file
rounded up to the next multiple of 2048 bytes.
.br
Beware of subsequent multi-session runs. The appended partition will get
overwritten.
.br
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.
.br
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".
.br
The disk_path must provide the necessary data bytes at commit time.
An empty disk_path disables this feature for the given partition number.
.TP
.B Jigdo Template Extraction:
.PP
@ -3417,6 +3454,8 @@ instead of -G to apply the effect of -boot_image isolinux partition_table=on.
-partition_offset number is
-boot_image any partition_offset=number.
.br
Option -append_partition is supported.
.br
The options of genisoimage Jigdo Template Extraction are recognized and
performed via xorriso option -jigdo. See the "Alias:" names there for the
meaning of the genisoimage options.

View File

@ -603,6 +603,10 @@ int Xorriso_option_alter_date(struct XorrisO *xorriso,
char *time_type, char *timestring,
int argc, char **argv, int *idx, int flag);
/* Option -append_partition */
int Xorriso_option_append_partition(struct XorrisO *xorriso, char *partno_text,
char *type_text, char *image_path, int flag);
/* Option -application_id */
int Xorriso_option_application_id(struct XorrisO *xorriso, char *name,
int flag);

View File

@ -502,7 +502,7 @@ inner dashes are interpreted as underscores.
* Filter:: Filters for data file content
* Writing:: Writing the result, drive control
* SetWrite:: Settings for result writing
* Bootable:: El Torito bootable ISO images
* Bootable:: Bootable ISO images
* Jigdo:: Jigdo Template Extraction
* Charset:: Character sets
* Exception:: Exception processing
@ -1991,8 +1991,8 @@ will be written according to the setting of option -acl.

File: xorriso.info, Node: Bootable, Next: Jigdo, Prev: SetWrite, Up: Options
9.10 El Torito bootable ISO images
==================================
9.10 Bootable ISO images
========================
Contrary to published specifications many BIOSes will load an El Torito
record from the first session on media and not from the last one, which
@ -2006,6 +2006,12 @@ If a boot image from ISOLINUX or GRUB is known to be present on media
then it is advised to patch it when a follow-up session gets written.
But one should not rely on the capability to influence the bootability
of the existing sessions, unless one can assume overwriteable media.
There are booting mechanisms which do not use an El Torito record but
rather start at the first bytes of the image: PC-BIOS MBR for
hard-disk-like devices, MIPS Volume Header for old SGI computers, DEC
Boot Block for old DECstation.
The boot firmware EFI may use programs which are located in a FAT
filesystem and announced by an MBR partition table entry.
-boot_image "any"|"isolinux"|"grub"
"discard"|"keep"|"patch"|"show_status"|bootspec|"next"
@ -2146,13 +2152,39 @@ of the existing sessions, unless one can assume overwriteable media.
for partition offset. 0 chooses a default value.
*mips_path=*iso_rr_path declares a data file in the image to be a
MIPS Big Endian boot file. Enable production of a MIPS Big Endian
Volume Header. This is mutually exclusive with any MBR production.
It will overwrite the first 512 bytes of any data eventually
provided by system_area=. Up to 15 boot files can be declared by
mips_path=.
Volume Header. This is mutually exclusive with MBR production and
mipsel_path=. It will overwrite the first 512 bytes of any data
eventually provided by system_area=. Up to 15 boot files can be
declared by mips_path=.
*mipsel_path=*iso_rr_path declares a data file in the image to be
the MIPS Little Endian boot file. This is mutually exclusive with
MBR production and mips_path=. It will overwrite the first 512
bytes of any data eventually provided by system_area=. Only a
single boot file can be declared by mipsel_path=.
*mips_discard* revokes any boot file declarations made by
mips_path=. This removes the ban on MBR production.
-append_partition partition_number type_code disk_path
Cause a prepared filesystem image to be appended to the ISO image
and to be described by a partition table entry in an MBR at the
start of the emerging ISO image. The partition entry will bear the
size of the submitted file rounded up to the next multiple of 2048
bytes.
Beware of subsequent multi-session runs. The appended partition
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.
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".
The disk_path must provide the necessary data bytes at commit time.
An empty disk_path disables this feature for the given partition
number.

File: xorriso.info, Node: Jigdo, Next: Charset, Prev: Bootable, Up: Options
@ -3043,6 +3075,7 @@ programs trigger comparable actions.
-mips-boot is the same as -boot_image any mips_path= .
-partition_offset number is -boot_image any
partition_offset=number.
Option -append_partition is supported.
The options of genisoimage Jigdo Template Extraction are
recognized and performed via xorriso option -jigdo. See the
"Alias:" names there for the meaning of the genisoimage options.
@ -3851,6 +3884,8 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -add_plainly inserts one or more paths: Insert. (line 61)
* -alter_date sets timestamps in ISO image: Manip. (line 146)
* -alter_date_r sets timestamps in ISO image: Manip. (line 166)
* -append_partition adds arbitrary file after image end: Bootable.
(line 178)
* -application_id sets application id: SetWrite. (line 90)
* -as emulates mkisofs or cdrecord: Emulation. (line 13)
* -assert_volid rejects undesired images: Loading. (line 65)
@ -3859,7 +3894,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -ban_stdio_write demands real drive: Loading. (line 220)
* -biblio_file sets biblio file name: SetWrite. (line 138)
* -blank erases media: Writing. (line 45)
* -boot_image controls bootability: Bootable. (line 20)
* -boot_image controls bootability: Bootable. (line 26)
* -calm_drive reduces drive activity: Loading. (line 209)
* -cd sets working directory in ISO: Navigate. (line 7)
* -cdx sets working directory on disk: Navigate. (line 16)
@ -3967,7 +4002,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -out_charset sets output character set: SetWrite. (line 156)
* -outdev aquires a drive for output: AqDrive. (line 29)
* -overwrite enables overwriting in ISO: SetInsert. (line 127)
* -pacifier controls pacifier text form: Emulation. (line 127)
* -pacifier controls pacifier text form: Emulation. (line 128)
* -padding sets amount of image padding: SetWrite. (line 239)
* -page set terminal geometry: DialogCtl. (line 15)
* -paste_in copies file into disk file: Restore. (line 117)
@ -3987,7 +4022,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -quoted_not_list sets exclusions: SetInsert. (line 72)
* -quoted_path_list inserts paths from disk file: Insert. (line 80)
* -read_mkisofsrc searches and reads .mkisofsrc file: Emulation.
(line 115)
(line 116)
* -reassure enables confirmation question: DialogCtl. (line 28)
* -report_about controls verbosity: Exception. (line 55)
* -return_with controls exit value: Exception. (line 39)
@ -3997,7 +4032,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -rollback discards pending changes: Writing. (line 9)
* -rollback_end ends program without writing: Scripting. (line 125)
* -rom_toc_scan searches for sessions: Loading. (line 184)
* -scdbackup_tag enables scdbackup checksum tag: Emulation. (line 137)
* -scdbackup_tag enables scdbackup checksum tag: Emulation. (line 138)
* -scsi_log reports SCSI commands: Scripting. (line 113)
* -session_log logs written sessions: Scripting. (line 104)
* -session_string composes session info line: Inquiry. (line 56)
@ -4050,14 +4085,15 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* ACL, show in ISO image, -getfacl: Navigate. (line 69)
* ACL, show in ISO image, -getfacl_r: Navigate. (line 76)
* Appendable media, _definition: Media. (line 38)
* Appended Filesystem Image, -append_partition: Bootable. (line 178)
* Backslash Interpretation, _definition: Processing. (line 49)
* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 163)
* Backup, enable features, -for_backup: Loading. (line 158)
* Backup, scdbackup checksum tag, -scdbackup: Emulation. (line 137)
* Backup, scdbackup checksum tag, -scdbackup: Emulation. (line 138)
* Blank media, _definition: Media. (line 29)
* Blind growing, _definition: Methods. (line 40)
* Bootability, control, -boot_image: Bootable. (line 20)
* cdrecord, Emulation: Emulation. (line 82)
* Bootability, control, -boot_image: Bootable. (line 26)
* cdrecord, Emulation: Emulation. (line 83)
* Character Set, _definition: Charset. (line 6)
* Character Set, for input, -in_charset: Loading. (line 73)
* Character Set, for input/output, -charset: Charset. (line 43)
@ -4092,10 +4128,10 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Drive, write and eject, -commit_eject: Writing. (line 40)
* El Torito, _definiton: Extras. (line 19)
* Emulation, -as: Emulation. (line 13)
* Emulation, .mkisofsrc, -read_mkisofsrc: Emulation. (line 115)
* Emulation, cdrecord, -as: Emulation. (line 82)
* Emulation, .mkisofsrc, -read_mkisofsrc: Emulation. (line 116)
* Emulation, cdrecord, -as: Emulation. (line 83)
* Emulation, mkisofs, -as: Emulation. (line 16)
* Emulation, pacifier form, -pacifier: Emulation. (line 127)
* Emulation, pacifier form, -pacifier: Emulation. (line 128)
* Examples: Examples. (line 6)
* Filter, _definition: Filter. (line 6)
* Filter, apply to file tree, -set_filter_r: Filter. (line 84)
@ -4153,12 +4189,12 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Jigdo Template Extraction, _definition: Jigdo. (line 6)
* List delimiter, _definiton: Processing. (line 8)
* MBR, _definiton: Extras. (line 26)
* MBR, set, -boot_image system_area=: Bootable. (line 117)
* MBR, set, -boot_image system_area=: Bootable. (line 123)
* MD5, control handling, -md5: Loading. (line 136)
* Media, erase, -blank: Writing. (line 45)
* Media, format, -format: Writing. (line 69)
* Media, list formats, -list_formats: Writing. (line 107)
* MIPS boot file, activation: Bootable. (line 156)
* MIPS boot file, activation: Bootable. (line 162)
* mkisofs, Emulation: Emulation. (line 16)
* Modifying, _definition: Methods. (line 27)
* Multi-session media, _definition: Media. (line 7)
@ -4184,8 +4220,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Ownership, global in ISO image, -uid: SetWrite. (line 162)
* Ownership, in ISO image, -chown: Manip. (line 42)
* Ownership, in ISO image, -chown_r: Manip. (line 47)
* Partition offset, _definiton: Bootable. (line 142)
* Partition table, _definiton: Bootable. (line 124)
* Partition offset, _definiton: Bootable. (line 148)
* Partition table, _definiton: Bootable. (line 130)
* Pathspec, _definition: SetInsert. (line 120)
* Pattern expansion, _definition: Processing. (line 22)
* Pattern expansion, for disk paths, -disk_pattern: Insert. (line 31)
@ -4236,7 +4272,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Session, mount command line, -mount_cmd: Inquiry. (line 31)
* Session, mount parameters, -mount_opts: Inquiry. (line 47)
* Session, select as input, -load: Loading. (line 11)
* System area, _definiton: Bootable. (line 117)
* System area, _definiton: Bootable. (line 123)
* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 184)
* Table-of-content, show, -toc: Inquiry. (line 18)
* Timestamps, set in ISO image, -alter_date: Manip. (line 146)
@ -4251,7 +4287,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Verify, file tree checksums, -check_md5_r: Verify. (line 160)
* Verify, preset -check_media, -check_media_defaults: Verify. (line 40)
* Write, block size, -dvd_obs: SetWrite. (line 209)
* Write, bootability, -boot_image: Bootable. (line 20)
* Write, bootability, -boot_image: Bootable. (line 26)
* Write, buffer syncing, -stdio_sync: SetWrite. (line 216)
* Write, close media, -close: SetWrite. (line 233)
* Write, compliance to specs, -compliance: SetWrite. (line 14)
@ -4287,48 +4323,48 @@ Node: Extras14601
Node: Processing18028
Node: Dialog21524
Node: Options23181
Node: AqDrive24799
Node: Loading27705
Node: Insert39884
Node: SetInsert48241
Node: Manip56808
Node: CmdFind65489
Node: Filter75440
Node: Writing79789
Node: SetWrite86078
Node: Bootable98029
Node: Jigdo107608
Node: Charset111866
Node: Exception114617
Node: DialogCtl119132
Node: Inquiry121477
Node: Navigate125607
Node: Verify133205
Node: Restore141625
Node: Emulation148281
Node: Scripting156341
Node: Frontend161903
Node: Examples163104
Node: ExDevices164273
Node: ExCreate164907
Node: ExDialog166181
Node: ExGrowing167443
Node: ExModifying168245
Node: ExBootable168746
Node: ExCharset169293
Node: ExPseudo170121
Node: ExCdrecord171015
Node: ExMkisofs171330
Node: ExGrowisofs172333
Node: ExException173457
Node: ExTime173911
Node: ExIncBackup174370
Node: ExRestore177842
Node: ExRecovery178811
Node: Files179377
Node: Seealso180605
Node: Legal181129
Node: CommandIdx182051
Node: ConceptIdx195995
Node: AqDrive24789
Node: Loading27695
Node: Insert39874
Node: SetInsert48231
Node: Manip56798
Node: CmdFind65479
Node: Filter75430
Node: Writing79779
Node: SetWrite86068
Node: Bootable98019
Node: Jigdo109361
Node: Charset113619
Node: Exception116370
Node: DialogCtl120885
Node: Inquiry123230
Node: Navigate127360
Node: Verify134958
Node: Restore143378
Node: Emulation150034
Node: Scripting158138
Node: Frontend163700
Node: Examples164901
Node: ExDevices166070
Node: ExCreate166704
Node: ExDialog167978
Node: ExGrowing169240
Node: ExModifying170042
Node: ExBootable170543
Node: ExCharset171090
Node: ExPseudo171918
Node: ExCdrecord172812
Node: ExMkisofs173127
Node: ExGrowisofs174130
Node: ExException175254
Node: ExTime175708
Node: ExIncBackup176167
Node: ExRestore179639
Node: ExRecovery180608
Node: Files181174
Node: Seealso182402
Node: Legal182926
Node: CommandIdx183848
Node: ConceptIdx197934

End Tag Table

View File

@ -44,7 +44,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 "Oct 15, 2010"
@c man .TH XORRISO 1 "Oct 18, 2010"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -714,7 +714,7 @@ inner dashes are interpreted as underscores.
* Filter:: Filters for data file content
* Writing:: Writing the result, drive control
* SetWrite:: Settings for result writing
* Bootable:: El Torito bootable ISO images
* Bootable:: Bootable ISO images
* Jigdo:: Jigdo Template Extraction
* Charset:: Character sets
* Exception:: Exception processing
@ -2677,9 +2677,9 @@ xorriso adds the traditional 300k of padding by default to all images.
For images which will never get to a CD it is safe to use -padding 0 .
@end table
@c man .TP
@c man .B El Torito bootable ISO images:
@c man .B Bootable ISO images:
@node Bootable, Jigdo, SetWrite, Options
@section El Torito bootable ISO images
@section Bootable ISO images
@c man .PP
Contrary to published specifications many BIOSes will load an El Torito
record from the first session on media and not from the last one, which
@ -2696,6 +2696,14 @@ it is advised to patch it
when a follow-up session gets written. But one should not rely on the
capability to influence the bootability of the existing sessions, unless one
can assume overwriteable media.
@*
There are booting mechanisms which do not use an El Torito record but rather
start at the first bytes of the image: PC-BIOS MBR for hard-disk-like devices,
MIPS Volume Header for old SGI computers, DEC Boot Block for old DECstation.
@*
The boot firmware EFI may use programs which are located in a FAT filesystem
and announced by an MBR partition table entry.
@*
@table @asis
@sp 1
@c man .TP
@ -2897,6 +2905,33 @@ Only a single boot file can be declared by mipsel_path=.
This removes the ban on MBR production.
@*
@end table
@*
@table @asis
@sp 1
@c man .TP
@item -append_partition partition_number type_code disk_path
@kindex -append_partition adds arbitrary file after image end
@cindex Appended Filesystem Image, -append_partition
Cause a prepared filesystem image to be appended to the ISO image and to be
described by a partition table entry in an MBR at the start of the emerging
ISO image. The partition entry will bear the size of the submitted file
rounded up to the next multiple of 2048 bytes.
@*
Beware of subsequent multi-session runs. The appended partition 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.
@*
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".
@*
The disk_path must provide the necessary data bytes at commit time.
An empty disk_path disables this feature for the given partition number.
@end table
@c man .TP
@c man .B Jigdo Template Extraction:
@node Jigdo, Charset, Bootable, Options
@ -4071,6 +4106,8 @@ instead of -G to apply the effect of -boot_image isolinux partition_table=on.
@minus{}partition_offset number is
@minus{}boot_image any partition_offset=number.
@*
Option @minus{}append_partition is supported.
@*
The options of genisoimage Jigdo Template Extraction are recognized and
performed via xorriso option -jigdo. See the "Alias:" names there for the
meaning of the genisoimage options.

View File

@ -322,6 +322,10 @@ struct XorrisO { /* the global context of xorriso */
/* 1 to 255, 0= disabled/default */
int partition_heads_per_cyl;
/* Path and type of image files to be appended as MBR partitions */
char appended_partitions[4][SfileadrL];
uint8_t appended_part_types[4];
/* User settable PVD time stamps */
time_t vol_creation_time;
time_t vol_modification_time;