Allowing up to 32 boot images, -boot_image any id_string=, sel_crit=

master
Thomas Schmitt 13 years ago
parent 7aae77f2ac
commit 10ef2e346f

@ -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 "Apr 20, 2010"
.TH XORRISO 1 "Apr 26, 2010"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -368,8 +368,8 @@ demands a file name length of up to 255 characters and paths of up to 1024
characters. Rock Ridge fulfills this demand.
.PP
An \fBEl Torito\fR
boot record connects a boot image, which is a binary program plus some
other files stored in the ISO image, with the bootstrapping facility of
boot record connects one or more boot images, which are binary program files
stored in the ISO image, with the bootstrapping facility of
contemporary computers.
The content of the boot image files is not in the scope of El Torito.
.br
@ -2146,7 +2146,7 @@ For images which will never get to a CD it is safe to use -padding 0 .
.B El Torito bootable ISO images:
.PP
Contrary to published specifications many BIOSes will load an El Torito
object from the first session on media and not from the last one, which
record from the first session on media and not from the last one, which
gets mounted by default. This makes no problems with overwriteable media,
because they appear to inadverted readers as one single session.
.br
@ -2163,45 +2163,49 @@ can assume overwriteable media.
.TP
\fB\-boot_image\fR "any"|"isolinux"|"grub"
.br
"discard"|"keep"|"patch"|"show_status"|bootspec
"discard"|"keep"|"patch"|"show_status"|bootspec|"next"
.br
Define the handling of an eventual El Torito boot image object which has
been read from an existing ISO image or define how to make a prepared
Define the handling of an eventual set of El Torito boot images which
has been read from an existing ISO image or define how to make a prepared
boot image file set bootable. Such file sets get produced by ISOLINUX or GRUB.
.br
Each -boot_image command has two arguments: type and setting. More than one
-boot_image command may be used to define the handling. Sequence matters.
-boot_image command may be used to define the handling of one or more boot
images. Sequence matters.
.br
Types "isolinux" and "grub" care for known peculiarities. Type "any" makes
no assumptions about the origin of the boot image.
no assumptions about the origin of the boot images.
.br
El Torito boot images of any type can be newly inserted, or discarded,
or patched, or kept unaltered.
The latter is only safe if the format of the boot image is
relocatable without content changes.
Whether to patch or to keep depends on whether
the boot images contain boot info tables.
.br
Some boot images contain a boot info table, which needs to be patched when
the boot image gets newly introduced into the ISO image or if an existing
image gets relocated. This is automatically done if type "isolinux" or "grub"
A boot info table needs to be patched when the boot image gets newly
introduced into the ISO image or if an existing image gets relocated.
This is automatically done if type "isolinux" or "grub"
is given, but not with "any".
.br
"show_status" will print what is known about the loaded image
and its designated fate.
.br
CAUTION:
This is an expert option.
xorriso cannot recognize the inner form of boot images.
"next" ends the definition of a boot image and starts a new one.
Any following -bootimage bootspecs will affect the new image.
The first "next" discards eventually loaded boot images and their
catalog.
.br
CAUTION: xorriso cannot recognize the inner form of boot images.
So the user has already to know about the particular needs of the
boot image which is present on the input media.
boot images which are present on the input media.
.br
Most safe is the default: -boot_image "any" "discard".
.br
A bootspec is a word of the form name=value and is used to describe the
activation of a boot image by an El Torito record and eventually a MBR.
The names "dir" and "bin_path" lead to El Torito boot image activation.
Name "system_area" activates the given file as MBR.
parameters of a boot image by an El Torito record and eventually a MBR.
The names "dir", "bin_path", "efi_path" lead to El Torito bootable images.
Name "system_area" activates a given file as MBR.
.br
On all media types this is possible within the first session. In further
sessions an existing boot image can get replaced by a new one, but depending
@ -2225,13 +2229,19 @@ which bundles these individual settings:
.br
-boot_image any boot_info_table=on
.br
"bin_path=" depicts the binary program which is to be started by the BIOS at
boot time.
"bin_path=" depicts the boot image file, a binary program which is to be
started by the hardware boot facility (e.g. the BIOS) at boot time.
.br
"efi_path=" depicts a boot image file that is ready for EFI booting.
Its load_size is determined automatically, no boot info table gets
written, platform_id is 0xef.
.br
An El Torito boot catalog file gets inserted into the ISO image with address
"cat_path=" at -commit time.
It is subject to normal -overwrite and -reassure processing if there is already
a file with the same name.
The catalog lists the boot images and is read by the boot facility to choose
one of the boot images.
.br
"load_size=" is a value which depends on the boot image. Default 2048 should
be overridden only if a better value is known.
@ -2239,12 +2249,25 @@ be overridden only if a better value is known.
"boot_info_table=on" may be used to apply patching to a boot image which
is given by "any" "bin_path=". "boot_info_table=off" disables patching.
.br
"discard" gives up an existing boot image.
"platform_id=" defines by two hex digits the Platform ID of the boot image.
"00" is 80x86 PC-BIOS, "01" is PowerPC, "02" is Mac, "ef" is EFI.
.br
"id_string="text|56_hexdigits defines the ID string of the boot catalog
section where the boot image will be listed. If the value consists of 56
characters [0-9A-Fa-f] then it is converted into 28 bytes, else the first
28 characters become the ID string.
The ID string of the first boot image becomes the overall catalog ID.
It is limited to 24 characters. Other id_strings become section IDs.
.br
"sel_crit="hexdigits defines the Selection Criteria of the boot image.
Up to 20 bytes get read from the given characters [0-9A-Fa-f].
They get attributed to the boot image entry in the catalog.
.br
"discard" gives up an existing boot catalog and its boot images.
.br
"keep" keeps or copies an existing boot image unaltered.
"keep" keeps or copies boot images unaltered and writes a new catalog.
.br
"patch" applies boot info table patching if an existing boot image gets copied
to a new location.
"patch" applies boot info table patching of existing boot images.
.br
"system_area="disk_path copies at most 32768 bytes from the given disk file to
the very start of the ISO image.
@ -2260,8 +2283,9 @@ to the ISO image.
446 to 511 of the System Area.
.br
With type "isolinux" it shows a partition that begins at byte 0 and it causes
the boot image LBA to be written into the MBR. For the first session this
works only if also "system_area=" and "bin_path=" or "dir=" is given.
the LBA of the first boot image to be written into the MBR. For the first
session this works only if also "system_area=" and "bin_path=" or "dir="
is given.
.br
With types "any" and "grub" it shows a single
partiton which starts at byte 512 and ends where the ISO image ends.

@ -137,7 +137,7 @@ or
#endif /* ! Xorriso_with_old_readlinE */
#endif /* Xorriso_with_readlinE */
#define TSOB_FELD(typ,anz) (typ *) malloc((anz)*sizeof(typ));
#define TSOB_FELD(typ,anz) (typ *) calloc(1, (anz)*sizeof(typ));
/* Diet facility: exclude help texts from binaries */
@ -2040,6 +2040,41 @@ overflow:;
}
int Hex_to_bin(char *hex,
int bin_size, int *bin_count, unsigned char *bin_data, int flag)
{
int i, l, acc;
l= strlen(hex);
if(l % 2 || l == 0)
return(-1); /* malformed */
*bin_count= 0;
for(i= 0; i < l; i+= 2) {
if(hex[i] >= '0' && hex[i] <= '9')
acc= (hex[i] - '0') << 4;
else if(hex[i] >= 'A' && hex[i] <= 'F')
acc= (hex[i] - 'A' + 10) << 4;
else if(hex[i] >= 'a' && hex[i] <= 'f')
acc= (hex[i] - 'a' + 10) << 4;
else
return(-1);
if(hex[i + 1] >= '0' && hex[i + 1] <= '9')
acc|= (hex[i + 1] - '0');
else if(hex[i + 1] >= 'A' && hex[i + 1] <= 'F')
acc|= (hex[i + 1] - 'A' + 10);
else if(hex[i + 1] >= 'a' && hex[i + 1] <= 'f')
acc|= (hex[i + 1] - 'a' + 10);
else
return(-1);
if(*bin_count >= bin_size)
return(0); /* overflow */
bin_data[*bin_count]= acc;
(*bin_count)++;
}
return(1);
}
#ifndef Xorriso_fileliste_externaL
/* ??? ts A71006 : Is this compatible with mkisofs pathspecs ?
@ -2892,6 +2927,8 @@ int Findjob_destroy(struct FindjoB **o, int flag)
return(0);
if(m->test_tree != NULL)
Exprnode_destroy(&(m->test_tree), 0);
if(m->start_path != NULL)
free(m->start_path);
free((char *) *o);
*o= NULL;
return(1);
@ -4885,14 +4922,17 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->do_stream_recording= 0;
m->dvd_obs= 0;
m->stdio_sync= 0;
m->boot_platform_id= 0x00; /* El Torito Boot Catalog Platform ID: 0 = 80x86 */
m->keep_boot_image= 0;
m->boot_image_cat_path[0]= 0;
m->boot_count= 0;
m->boot_platform_id= 0x00; /* El Torito Boot Catalog Platform ID: 0 = 80x86 */
m->patch_isolinux_image= 0;
m->boot_image_bin_path[0]= 0;
m->boot_image_bin_form[0]= 0;
m->boot_image_emul= 0;
m->boot_image_cat_path[0]= 0;
m->boot_image_load_size= 4 * 512; /* hearsay out of libisofs/demo/iso.c */
memset(m->boot_id_string, 0, sizeof(m->boot_id_string));
memset(m->boot_selection_crit, 0, sizeof(m->boot_selection_crit));
#ifdef Xorriso_with_isohybriD
m->boot_image_isohybrid= 1;
@ -4900,7 +4940,12 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->boot_image_isohybrid= 0;
#endif
m->boot_efi_default= 0;
#ifndef Xorriso_multi_booT
m->boot_image_efi_path[0]= 0;
#endif
m->system_area_disk_path[0]= 0;
m->system_area_options= 0;
m->patch_system_area= 0;
@ -6745,10 +6790,10 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
-options_from_file:${resume_state_file}_pos
*/
{
int is_default, no_defaults, i, ret, adr_mode, bin_path_in_use= 0, do_single;
int show_indev= 1, show_outdev= 1, show_dev= 0, patch_is_implicit= 0;
int part_table_implicit= 0, efi_path_in_use= 0;
char *line, sfe[5 * SfileadrL + 80], mode[80], *form, *treatment, *bin_form;
int is_default, no_defaults, i, ret, adr_mode, do_single;
int show_indev= 1, show_outdev= 1, show_dev= 0;
int part_table_implicit= 0;
char *line, sfe[5 * SfileadrL + 80], mode[80], *form, *treatment;
char *in_pt, *out_pt, *nl_charset, *local_charset, *mode_pt;
char *dev_filter= NULL;
static char channel_prefixes[4][4]= {".","R","I","M"};
@ -6756,6 +6801,11 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
static int max_load_mode= 4;
struct Xorriso_lsT *paths, *leafs, *s;
#ifndef Xorriso_multi_booT
char *bin_form;
int patch_is_implicit= 0, efi_path_in_use= 0, bin_path_in_use= 0;
#endif
no_defaults= flag&1;
line= xorriso->result_line;
@ -6932,6 +6982,12 @@ 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);
#ifdef Xorriso_multi_booT
Xorriso_boot_image_status(xorriso, filter, fp, flag & 3);
#else /* Xorriso_multi_booT */
is_default= (xorriso->keep_boot_image == 0
&& xorriso->patch_isolinux_image == 0
&& xorriso->boot_image_bin_path[0] == 0);
@ -6970,12 +7026,14 @@ bin_path:;
treatment= sfe;
bin_path_in_use= 1;
}
} else if(xorriso->boot_image_efi_path[0]) {
form= "grub";
strcpy(sfe, "efi_path=");
Text_shellsafe(xorriso->boot_image_efi_path, sfe + strlen(sfe), 0);
treatment= sfe;
efi_path_in_use= 1;
} else if(xorriso->patch_isolinux_image) {
treatment= "patch";
if(xorriso->patch_system_area & 1)
@ -7010,6 +7068,7 @@ bin_path:;
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
}
if(xorriso->boot_image_efi_path[0] && xorriso->boot_image_bin_path[0]) {
strcpy(line,"-boot_image grub efi_path=");
Text_shellsafe(xorriso->boot_image_efi_path, line + strlen(line), 0);
@ -7017,6 +7076,7 @@ bin_path:;
Xorriso_status_result(xorriso,filter,fp,flag&2);
efi_path_in_use= 1;
}
if(xorriso->boot_image_cat_path[0] && (bin_path_in_use || efi_path_in_use)) {
is_default= 0;
sprintf(line,"-boot_image %s cat_path=%s\n",
@ -7024,6 +7084,9 @@ bin_path:;
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
}
#endif /* Xorriso_multi_booT */
is_default= (xorriso->system_area_disk_path[0] == 0);
sprintf(line,"-boot_image %s system_area=%s\n",
xorriso->system_area_disk_path[0] && (xorriso->system_area_options & 2)
@ -11176,6 +11239,28 @@ no_volunteer:;
}
int Xorriso_genisofs_add_boot(struct XorrisO *xorriso, char *whom,
int *option_b, int *no_emul_boot, int flag)
{
int ret;
if(*option_b && !*no_emul_boot) {
xorriso->boot_image_bin_path[0]= 0;
sprintf(xorriso->info_text,
"-as %s: Option -b is supported only if option -no-emul-boot is given",
whom);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
ret= Xorriso_attach_boot_image(xorriso, 0);
if(ret <= 0)
xorriso->boot_image_bin_path[0]= 0;
*option_b= 0;
*no_emul_boot= 1;
return(ret);
}
int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
{
static char helptext[][160]= {
@ -11262,6 +11347,7 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
int do_print_size= 0, fd, idx, iso_level= 0, no_emul_boot= 0;
int option_b= 0, was_failure= 0, fret, lower_r= 0, zero= 0;
int *weight_list= NULL, weight_count= 0;
int *boot_opt_list= NULL, boot_opt_count= 0;
char sfe[5*SfileadrL], adr[SfileadrL+8], ra_text[80], pathspec[2*SfileadrL];
char *ept, *add_pt, eff_path[SfileadrL], indev[SfileadrL+8], msc[80], *cpt;
char *boot_path;
@ -11275,6 +11361,11 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
Xorriso_no_malloc_memory(xorriso, NULL, 0);
return(-1);
}
boot_opt_list= TSOB_FELD(int, argc + 1);
if(boot_opt_list == NULL) {
Xorriso_no_malloc_memory(xorriso, (char **) &weight_list, 0);
return(-1);
}
adr[0]= indev[0]= msc[0]= 0;
for(i= 0; i<argc; i++) {
@ -11344,6 +11435,9 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
((off_t) 4) * ((off_t) 1024*1024*1024) - ((off_t) 1);
else
xorriso->file_size_limit= 0;
#ifndef Xorriso_multi_booT
} else if(strcmp(argv[i], "-no-emul-boot")==0) {
no_emul_boot= 1;
} else if(strcmp(argv[i], "-boot-info-table")==0) {
@ -11360,11 +11454,13 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
Several boot images shall be kept in a list. One is the Default.
They can have type BIOS or EFI.
*/
if(strcmp(argv[i - 1], "--efi-boot") == 0)
if(strcmp(argv[i - 1], "--efi-boot") == 0) {
boot_path= xorriso->boot_image_efi_path;
else {
xorriso->boot_efi_default= 1;
} else {
boot_path= xorriso->boot_image_bin_path;
xorriso->boot_platform_id= 0x00;
xorriso->boot_efi_default= 0;
option_b= 1;
}
boot_path[0]= 0;
@ -11398,6 +11494,9 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
ret= Xorriso_option_boot_image(xorriso, "isolinux", sfe, 0);
if(ret <= 0)
goto problem_handler_1;
#endif /* ! Xorriso_multi_booT */
} else if(strcmp(argv[i], "-input-charset")==0) {
if(i+1>=argc)
goto not_enough_args;
@ -11479,6 +11578,9 @@ problem_handler_1:;
if(ret<=0)
goto ex;
}
#ifndef Xorriso_multi_booT
if(option_b && !no_emul_boot) {
xorriso->boot_image_bin_path[0]= 0;
sprintf(xorriso->info_text,
@ -11487,6 +11589,9 @@ problem_handler_1:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex;
}
#endif /* ! Xorriso_multi_booT */
if(was_other_option && xorriso->out_drive_handle==NULL) {
ret= Xorriso_option_dev(xorriso, "-", 2|4); /* set outdev to stdout */
if(ret<=0)
@ -11652,6 +11757,33 @@ not_enough_args:;
} else if(strcmp(argv[i], "-iso-level")==0) {
i++;
/* was already handled in first argument scan */;
#ifdef Xorriso_multi_booT
} else if(strcmp(argv[i], "-no-emul-boot")==0 ||
strcmp(argv[i], "-boot-info-table")==0 ||
strncmp(argv[i], "isolinux_mbr=", 13)==0 ||
strncmp(argv[i], "isolinux_mbr=", 13)==0 ||
strcmp(argv[i], "-eltorito-alt-boot")==0 ||
strcmp(argv[i], "--protective-msdos-label")==0) {
boot_opt_list[boot_opt_count++]= i;
} else if(strcmp(argv[i], "-b") == 0 ||
strcmp(argv[i], "-eltorito-boot") == 0 ||
strcmp(argv[i], "--efi-boot") == 0 ||
strcmp(argv[i], "-c") == 0 ||
strcmp(argv[i], "-eltorito-catalog") == 0 ||
strcmp(argv[i], "-boot-load-size") == 0 ||
strcmp(argv[i], "--embedded-boot")==0 ||
strcmp(argv[i], "-generic-boot")==0 ||
strcmp(argv[i], "-G") == 0 ||
strcmp(argv[i], "-isohybrid-mbr")==0) {
if(i+1>=argc)
goto not_enough_args;
boot_opt_list[boot_opt_count++]= i;
i++;
#else /* Xorriso_multi_booT */
} else if(strcmp(argv[i], "-no-emul-boot")==0) {
/* was already handled in first argument scan */;
} else if(strcmp(argv[i], "-b") == 0 ||
@ -11676,17 +11808,21 @@ not_enough_args:;
goto ex;
if(strcmp(argv[i - 1], "-isohybrid-mbr")==0)
xorriso->system_area_options= (xorriso->system_area_options & ~3) | 2;
} else if(strcmp(argv[i], "-boot-load-size") == 0) {
i++;
/* was already handled in first argument scan */;
} else if(strcmp(argv[i], "-boot-info-table")==0) {
;
} else if(strcmp(argv[i], "--protective-msdos-label")==0) {
xorriso->system_area_options= (xorriso->system_area_options & ~3) | 1;
#endif /* ! Xorriso_multi_booT */
} else if(strncmp(argv[i], "--modification-date=", 20)==0) {
ret= Xorriso_option_volume_date(xorriso, "uuid", argv[i] + 20, 0);
if(ret <= 0)
goto problem_handler_1;
} else if(strcmp(argv[i], "-boot-load-size") == 0) {
i++;
/* was already handled in first argument scan */;
} else if(strcmp(argv[i], "-boot-info-table")==0) {
;
} else if(strcmp(argv[i], "-input-charset")==0) {
i++;
/* was already handled in first argument scan */;
@ -11778,10 +11914,118 @@ problem_handler_2:;
sort_weight_args[0]= argv[i + 2];
sort_weight_args[3]= argv[i + 1];
ret= Xorriso_option_find(xorriso, 4, sort_weight_args, &zero, 2);
if(ret<=0)
if(ret > 0)
continue;
/* Problem handler */
was_failure= 1;
fret= Xorriso_eval_problem_status(xorriso, ret, 1|2);
if(fret>=0)
continue;
goto ex;
}
#ifdef Xorriso_multi_booT
/* After all pathspecs are added: perform boot related options */
for(j= 0; j < boot_opt_count; j++) {
i= boot_opt_list[j];
if(strcmp(argv[i], "-no-emul-boot")==0) {
no_emul_boot= 1;
} else if(strcmp(argv[i], "-boot-info-table")==0) {
xorriso->patch_isolinux_image= 1;
} else if(strcmp(argv[i], "-b") == 0 ||
strcmp(argv[i], "-eltorito-boot") == 0 ||
strcmp(argv[i], "--efi-boot") == 0) {
i++;
if(strcmp(argv[i - 1], "--efi-boot") == 0) {
if(xorriso->boot_image_bin_path[0]) {
ret= Xorriso_genisofs_add_boot(xorriso, whom,
&option_b, &no_emul_boot, 0);
if(ret <= 0)
goto problem_handler_boot;
}
boot_path= xorriso->boot_image_bin_path;
xorriso->boot_efi_default= 1;
} else {
boot_path= xorriso->boot_image_bin_path;
xorriso->boot_platform_id= 0x00;
xorriso->boot_efi_default= 0;
option_b= 1;
}
boot_path[0]= 0;
if(argv[i][0] != '/')
strcat(boot_path, "/");
ret= Sfile_str(boot_path + strlen(boot_path), argv[i], 0);
if(ret <= 0)
goto ex;
if(xorriso->boot_efi_default && xorriso->boot_image_bin_path[0]) {
option_b= 0;
ret= Xorriso_genisofs_add_boot(xorriso, whom,
&option_b, &no_emul_boot, 0);
if(ret <= 0)
goto problem_handler_boot;
}
xorriso->keep_boot_image= 0;
} else if(strcmp(argv[i], "-c") == 0 ||
strcmp(argv[i], "-eltorito-catalog") == 0) {
if(i+1>=argc)
goto not_enough_args;
i++;
xorriso->boot_image_cat_path[0]= 0;
if(argv[i][0] != '/')
strcat(xorriso->boot_image_cat_path, "/");
ret= Sfile_str(xorriso->boot_image_cat_path
+ strlen(xorriso->boot_image_cat_path), argv[i], 0);
if(ret <= 0)
goto ex;
} else if(strcmp(argv[i], "-boot-load-size") == 0) {
if(i+1>=argc)
goto not_enough_args;
i++;
sscanf(argv[i], "%d", &ret);
xorriso->boot_image_load_size= ret * 512;
} else if(strncmp(argv[i], "isolinux_mbr=", 13)==0) {
sprintf(sfe, "isohybrid=%s", argv[i] + 13);
ret= Xorriso_option_boot_image(xorriso, "isolinux", sfe, 0);
if(ret <= 0)
goto problem_handler_boot;
} else if(strcmp(argv[i], "-eltorito-alt-boot")==0) {
ret= Xorriso_genisofs_add_boot(xorriso, whom,
&option_b, &no_emul_boot, 0);
if(ret <= 0)
goto problem_handler_boot;
} else if(strcmp(argv[i], "--embedded-boot")==0 ||
strcmp(argv[i], "-generic-boot")==0 ||
strcmp(argv[i], "-G") == 0 ||
strcmp(argv[i], "-isohybrid-mbr")==0) {
if(i+1>=argc)
goto not_enough_args;
i++;
ret= Xorriso_set_system_area_path(xorriso, argv[i], 0);
if(ret <= 0)
goto problem_handler_boot;
if(strcmp(argv[i - 1], "-isohybrid-mbr")==0)
xorriso->system_area_options= (xorriso->system_area_options & ~3) | 2;
} else if(strcmp(argv[i], "--protective-msdos-label")==0) {
xorriso->system_area_options= (xorriso->system_area_options & ~3) | 1;
}
continue; /* regular bottom of loop */
problem_handler_boot:;
/* Problem handler */
was_failure= 1;
fret= Xorriso_eval_problem_status(xorriso, ret, 1|2);
if(fret>=0)
continue;
goto ex;
}
if(xorriso->boot_image_bin_path[0]) {
ret= Xorriso_genisofs_add_boot(xorriso, whom, &option_b, &no_emul_boot, 0);
if(ret <= 0)
goto ex;
}
#endif /* Xorriso_multi_booT */
ret= !was_failure;
ex:;
if(was_path && !do_print_size)
@ -11791,6 +12035,8 @@ ex:;
Xorriso_option_rollback(xorriso, 0);
if(weight_list != NULL)
free(weight_list);
if(boot_opt_list != NULL)
free(boot_opt_list);
return(ret);
}
@ -13816,7 +14062,7 @@ unusable_size:;
int Xorriso_option_boot_image(struct XorrisO *xorriso, char *form,
char *treatment, int flag)
{
int was_ok= 1, ret, isolinux_grub= 0;
int was_ok= 1, ret, isolinux_grub= 0, count;
unsigned int u;
char *formpt, *treatpt;
double num;
@ -13831,12 +14077,21 @@ int Xorriso_option_boot_image(struct XorrisO *xorriso, char *form,
if(strcmp(formpt, "isolinux")==0 || strcmp(formpt, "grub") == 0)
isolinux_grub= 1;
if(strcmp(treatpt, "keep")==0) {
if(xorriso->boot_count > 0) {
cannot_keep_or_patch:;
sprintf(xorriso->info_text,
"Loaded boot image has already been replaced. Cannot keep or patch it.");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
xorriso->keep_boot_image= 1;
xorriso->patch_isolinux_image= !!isolinux_grub;
xorriso->boot_image_bin_path[0]= 0;
xorriso->patch_system_area= 0;
} else if(strcmp(treatpt, "patch")==0) {
if(xorriso->boot_count > 0)
goto cannot_keep_or_patch;
xorriso->keep_boot_image= 0;
xorriso->patch_isolinux_image= 1;
xorriso->boot_image_bin_path[0]= 0;
@ -13852,6 +14107,16 @@ int Xorriso_option_boot_image(struct XorrisO *xorriso, char *form,
xorriso->patch_isolinux_image= 0;
xorriso->boot_image_bin_path[0]= 0;
xorriso->patch_system_area= 0;
if(xorriso->boot_count > 0) {
ret= Xorriso_attach_boot_image(xorriso, 2); /* dispose boot images */
if(ret <= 0)
return(ret);
}
} else if(strcmp(treatpt, "next") == 0) {
ret= Xorriso_attach_boot_image(xorriso, 0);
if(ret <= 0)
return(ret);
} else if(strcmp(treatpt, "show_status")==0) {
sprintf(xorriso->result_line, "------------------------------------\n");
@ -13871,6 +14136,14 @@ int Xorriso_option_boot_image(struct XorrisO *xorriso, char *form,
sprintf(xorriso->result_line, "------------------------------------\n");
Xorriso_result(xorriso, 0);
} else if(strcmp(treatpt, "cat_path=") == 0) {
xorriso->boot_image_cat_path[0] = 0;
} else if(strncmp(treatpt, "cat_path=", 9) == 0) {
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 9,
xorriso->boot_image_cat_path, 2);
if(ret <= 0)
return(ret);
} else if(strncmp(treatpt, "dir=", 4) == 0) {
if(strcmp(formpt, "isolinux")==0) {
/* ISOLINUX */
@ -13916,6 +14189,7 @@ int Xorriso_option_boot_image(struct XorrisO *xorriso, char *form,
} else if(strcmp(treatpt, "bin_path=") == 0) {
xorriso->boot_image_bin_path[0] = 0;
xorriso->boot_efi_default= 0;
} else if(strncmp(treatpt, "bin_path=", 9) == 0) {
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 9,
xorriso->boot_image_bin_path, 2);
@ -13929,15 +14203,31 @@ int Xorriso_option_boot_image(struct XorrisO *xorriso, char *form,
strcpy(xorriso->boot_image_bin_form, formpt);
} else
strcpy(xorriso->boot_image_bin_form, "any");
xorriso->boot_efi_default= 0;
#ifdef Xorriso_multi_booT
} else if(strcmp(treatpt, "efi_path=") == 0) {
xorriso->boot_image_bin_path[0] = 0;
xorriso->boot_efi_default= 0;
} else if(strncmp(treatpt, "efi_path=", 9) == 0) {
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 9,
xorriso->boot_image_bin_path, 2);
#else
} else if(strcmp(treatpt, "efi_path=") == 0) {
xorriso->boot_image_efi_path[0] = 0;
} else if(strncmp(treatpt, "efi_path=", 9) == 0) {
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 9,
xorriso->boot_image_efi_path, 2);
#endif /* ! Xorriso_multi_booT */
if(ret <= 0)
return(ret);
xorriso->keep_boot_image= 0;
xorriso->boot_efi_default= 1;
} else if(strncmp(treatpt, "boot_info_table=", 16)==0) {
if(strcmp(treatpt + 16, "off") == 0)
@ -13947,14 +14237,6 @@ int Xorriso_option_boot_image(struct XorrisO *xorriso, char *form,
else
was_ok= 0;
} else if(strcmp(treatpt, "cat_path=") == 0) {
xorriso->boot_image_cat_path[0] = 0;
} else if(strncmp(treatpt, "cat_path=", 9) == 0) {
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 9,
xorriso->boot_image_cat_path, 2);
if(ret <= 0)
return(ret);
} else if(strncmp(treatpt, "load_size=", 10) == 0) {
num= Scanf_io_size(treatpt + 10, 0);
if(num < 512 && isolinux_grub) {
@ -13966,6 +14248,27 @@ int Xorriso_option_boot_image(struct XorrisO *xorriso, char *form,
}
xorriso->boot_image_load_size= num;
} else if(strncmp(treatpt, "id_string=", 10) == 0) {
memset(xorriso->boot_id_string, 0, 29);
if(strlen(treatpt + 10) == 56) {
ret= Hex_to_bin(treatpt + 10, 28, &count, xorriso->boot_id_string, 0);
} else
ret= 0;
if(ret <= 0)
strncpy((char *) xorriso->boot_id_string, treatpt + 10, 28);
} else if(strncmp(treatpt, "sel_crit=", 9) == 0) {
memset(xorriso->boot_selection_crit, 0, 21);
count= 0;
ret= Hex_to_bin(treatpt + 9, 20, &count, xorriso->boot_selection_crit, 0);
if(ret <= 0) {
sprintf(xorriso->info_text,
"-boot_image %s sel_crit= : Wrong form. Need even number of hex digits.",
formpt);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
} else if(strncmp(treatpt, "system_area=", 12) == 0) {
ret= Xorriso_set_system_area_path(xorriso, treatpt + 12, 0);
if(ret <= 0)
@ -14043,11 +14346,6 @@ int Xorriso_option_boot_image(struct XorrisO *xorriso, char *form,
} else
was_ok= 0;
/* >>> BOOT : check whether directories and/or files exist:
bin_path , dirname(cat_path),
isolinux.cfg in / , /isolinux , or /boot/isolinux
*/
if(!was_ok) {
sprintf(xorriso->info_text, "Unrecognized options with -boot_image: %s %s",
form, treatment);

@ -329,8 +329,8 @@ characters of filename length. It is the X/Open System Interface
standard XSI which demands a file name length of up to 255 characters
and paths of up to 1024 characters. Rock Ridge fulfills this demand.
An *El Torito* boot record connects a boot image, which is a binary
program plus some other files stored in the ISO image, with the
An *El Torito* boot record connects one or more boot images, which
are binary program files stored in the ISO image, with the
bootstrapping facility of contemporary computers. The content of the
boot image files is not in the scope of El Torito.
Most bootable GNU/Linux CDs are equipped with ISOLINUX or GRUB boot
@ -1927,7 +1927,7 @@ File: xorriso.info, Node: Bootable, Next: Charset, Prev: SetWrite, Up: Optio
==================================
Contrary to published specifications many BIOSes will load an El Torito
object from the first session on media and not from the last one, which
record from the first session on media and not from the last one, which
gets mounted by default. This makes no problems with overwriteable
media, because they appear to inadverted readers as one single session.
But with multi-session media CD-R[W], DVD-R[W], DVD+R, it implies that
@ -1940,40 +1940,41 @@ But one should not rely on the capability to influence the bootability
of the existing sessions, unless one can assume overwriteable media.
-boot_image "any"|"isolinux"|"grub"
"discard"|"keep"|"patch"|"show_status"|bootspec
"discard"|"keep"|"patch"|"show_status"|bootspec|"next"
Define the handling of an eventual El Torito boot image object
Define the handling of an eventual set of El Torito boot images
which has been read from an existing ISO image or define how to
make a prepared boot image file set bootable. Such file sets get
produced by ISOLINUX or GRUB.
Each -boot_image command has two arguments: type and setting. More
than one -boot_image command may be used to define the handling.
Sequence matters.
than one -boot_image command may be used to define the handling of
one or more boot images. Sequence matters.
Types "isolinux" and "grub" care for known peculiarities. Type
"any" makes no assumptions about the origin of the boot image.
"any" makes no assumptions about the origin of the boot images.
El Torito boot images of any type can be newly inserted, or
discarded, or patched, or kept unaltered. The latter is only safe
if the format of the boot image is relocatable without content
changes.
Some boot images contain a boot info table, which needs to be
patched when the boot image gets newly introduced into the ISO
image or if an existing image gets relocated. This is
automatically done if type "isolinux" or "grub" is given, but not
with "any".
discarded, or patched, or kept unaltered. Whether to patch or to
keep depends on whether the boot images contain boot info tables.
A boot info table needs to be patched when the boot image gets
newly introduced into the ISO image or if an existing image gets
relocated. This is automatically done if type "isolinux" or "grub"
is given, but not with "any".
"show_status" will print what is known about the loaded image and
its designated fate.
CAUTION: This is an expert option. xorriso cannot recognize the
inner form of boot images. So the user has already to know about
the particular needs of the boot image which is present on the
input media.
"next" ends the definition of a boot image and starts a new one.
Any following -bootimage bootspecs will affect the new image. The
first "next" discards eventually loaded boot images and their
catalog.
CAUTION: xorriso cannot recognize the inner form of boot images.
So the user has already to know about the particular needs of the
boot images which are present on the input media.
Most safe is the default: -boot_image "any" "discard".
A bootspec is a word of the form name=value and is used to
describe the activation of a boot image by an El Torito record and
eventually a MBR. The names "dir" and "bin_path" lead to El
Torito boot image activation. Name "system_area" activates the
given file as MBR.
describe the parameters of a boot image by an El Torito record and
eventually a MBR. The names "dir", "bin_path", "efi_path" lead to
El Torito bootable images. Name "system_area" activates a given
file as MBR.
On all media types this is possible within the first session. In
further sessions an existing boot image can get replaced by a new
one, but depending on the media type this may have few effect at
@ -1990,21 +1991,39 @@ of the existing sessions, unless one can assume overwriteable media.
-boot_image isolinux cat_path=/boot/isolinux/boot.cat
-boot_image isolinux load_size=2048
-boot_image any boot_info_table=on
"bin_path=" depicts the binary program which is to be started by
the BIOS at boot time.
"bin_path=" depicts the boot image file, a binary program which is
to be started by the hardware boot facility (e.g. the BIOS) at
boot time.
"efi_path=" depicts a boot image file that is ready for EFI
booting. Its load_size is determined automatically, no boot info
table gets written, platform_id is 0xef.
An El Torito boot catalog file gets inserted into the ISO image
with address "cat_path=" at -commit time. It is subject to normal
-overwrite and -reassure processing if there is already a file
with the same name.
with the same name. The catalog lists the boot images and is read
by the boot facility to choose one of the boot images.
"load_size=" is a value which depends on the boot image. Default
2048 should be overridden only if a better value is known.
"boot_info_table=on" may be used to apply patching to a boot image
which is given by "any" "bin_path=". "boot_info_table=off"
disables patching.
"discard" gives up an existing boot image.
"keep" keeps or copies an existing boot image unaltered.
"patch" applies boot info table patching if an existing boot image
gets copied to a new location.
"platform_id=" defines by two hex digits the Platform ID of the
boot image. "00" is 80x86 PC-BIOS, "01" is PowerPC, "02" is Mac,
"ef" is EFI.
"id_string="text|56_hexdigits defines the ID string of the boot
catalog section where the boot image will be listed. If the value
consists of 56 characters [0-9A-Fa-f] then it is converted into 28
bytes, else the first 28 characters become the ID string. The ID
string of the first boot image becomes the overall catalog ID. It
is limited to 24 characters. Other id_strings become section IDs.
"sel_crit="hexdigits defines the Selection Criteria of the boot
image. Up to 20 bytes get read from the given characters
[0-9A-Fa-f]. They get attributed to the boot image entry in the
catalog.
"discard" gives up an existing boot catalog and its boot images.
"keep" keeps or copies boot images unaltered and writes a new
catalog.
"patch" applies boot info table patching of existing boot images.
"system_area="disk_path copies at most 32768 bytes from the given
disk file to the very start of the ISO image. This System Area is
reserved for system dependent boot software, e.g. an MBR which can
@ -2015,9 +2034,9 @@ of the existing sessions, unless one can assume overwriteable media.
"partition_table=on" causes a simple partition table to be written
into bytes 446 to 511 of the System Area.
With type "isolinux" it shows a partition that begins at byte 0
and it causes the boot image LBA to be written into the MBR. For
the first session this works only if also "system_area=" and
"bin_path=" or "dir=" is given.
and it causes the LBA of the first boot image to be written into
the MBR. For the first session this works only if also
"system_area=" and "bin_path=" or "dir=" is given.
With types "any" and "grub" it shows a single partiton which
starts at byte 512 and ends where the ISO image ends. This works
with or without system_area= or boot image.
@ -3902,7 +3921,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* iso_rr_path, _definition: Insert. (line 7)
* List delimiter, _definiton: Processing. (line 8)
* MBR, _definiton: Extras. (line 26)
* MBR, set, -boot_image system_area=: Bootable. (line 85)
* MBR, set, -boot_image system_area=: Bootable. (line 104)
* MD5, control handling, -md5: Loading. (line 141)
* Media, erase, -blank: Writing. (line 45)
* Media, format, -format: Writing. (line 69)
@ -3932,7 +3951,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Ownership, global in ISO image, -uid: SetWrite. (line 125)
* Ownership, in ISO image, -chown: Manip. (line 42)
* Ownership, in ISO image, -chown_r: Manip. (line 47)
* Partition table, _definiton: Bootable. (line 92)
* Partition table, _definiton: Bootable. (line 111)
* Pathspec, _definition: SetInsert. (line 120)
* Pattern expansion, _definition: Processing. (line 22)
* Pattern expansion, for disk paths, -disk_pattern: Insert. (line 31)
@ -3983,7 +4002,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 85)
* System area, _definiton: Bootable. (line 104)
* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 189)
* Table-of-content, show, -toc: Inquiry. (line 18)
* Timestamps, set in ISO image, -alter_date: Manip. (line 146)
@ -4031,50 +4050,50 @@ Node: Media6089
Node: Methods8519
Node: Drives11066
Node: Extras14332
Node: Processing17736
Node: Dialog21232
Node: Options22889
Node: AqDrive24457
Node: Loading27363
Node: Insert39798
Node: SetInsert48155
Node: Manip56722
Node: CmdFind64598
Node: Filter73943
Node: Writing78292
Node: SetWrite84581
Node: Bootable94713
Node: Charset100824
Node: Exception103578
Node: DialogCtl108093
Node: Inquiry110438
Node: Navigate114578
Node: Verify121932
Node: Restore130352
Node: Emulation137008
Node: Scripting143695
Node: Frontend149257
Node: Examples150458
Node: ExDevices151627
Node: ExCreate152109
Node: ExDialog153383
Node: ExGrowing154645
Node: ExModifying155447
Node: ExBootable155948
Node: ExCharset156495
Node: ExPseudo157323
Node: ExCdrecord158217
Node: ExMkisofs158532
Node: ExGrowisofs159535
Node: ExException160659
Node: ExTime161113
Node: ExIncBackup161572
Node: ExRestore165044
Node: ExRecovery166013
Node: Files166579
Node: Seealso167617
Node: Legal168141
Node: CommandIdx169063
Node: ConceptIdx182364
Node: Processing17730
Node: Dialog21226
Node: Options22883
Node: AqDrive24451
Node: Loading27357
Node: Insert39792
Node: SetInsert48149
Node: Manip56716
Node: CmdFind64592
Node: Filter73937
Node: Writing78286
Node: SetWrite84575
Node: Bootable94707
Node: Charset102163
Node: Exception104917
Node: DialogCtl109432
Node: Inquiry111777
Node: Navigate115917
Node: Verify123271
Node: Restore131691
Node: Emulation138347
Node: Scripting145034
Node: Frontend150596
Node: Examples151797
Node: ExDevices152966
Node: ExCreate153448
Node: ExDialog154722
Node: ExGrowing155984
Node: ExModifying156786
Node: ExBootable157287
Node: ExCharset157834
Node: ExPseudo158662
Node: ExCdrecord159556
Node: ExMkisofs159871
Node: ExGrowisofs160874
Node: ExException161998
Node: ExTime162452
Node: ExIncBackup162911
Node: ExRestore166383
Node: ExRecovery167352
Node: Files167918
Node: Seealso168956
Node: Legal169480
Node: CommandIdx170402
Node: ConceptIdx183703

End Tag Table

@ -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 "Apr 20, 2010"
@c man .TH XORRISO 1 "Apr 26, 2010"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -496,8 +496,8 @@ characters. Rock Ridge fulfills this demand.
@sp 1
@cindex El Torito, _definiton
An @strong{El Torito}
boot record connects a boot image, which is a binary program plus some
other files stored in the ISO image, with the bootstrapping facility of
boot record connects one or more boot images, which are binary program files
stored in the ISO image, with the bootstrapping facility of
contemporary computers.
The content of the boot image files is not in the scope of El Torito.
@*
@ -2588,7 +2588,7 @@ For images which will never get to a CD it is safe to use -padding 0 .
@section El Torito bootable ISO images
@c man .PP
Contrary to published specifications many BIOSes will load an El Torito
object from the first session on media and not from the last one, which
record from the first session on media and not from the last one, which
gets mounted by default. This makes no problems with overwriteable media,
because they appear to inadverted readers as one single session.
@*
@ -2610,48 +2610,52 @@ can assume overwriteable media.
@cindex Write, bootability, -boot_image
@cindex Bootability, control, -boot_image
@*
"discard"|"keep"|"patch"|"show_status"|bootspec
"discard"|"keep"|"patch"|"show_status"|bootspec|"next"
@*
@sp 1
Define the handling of an eventual El Torito boot image object which has
been read from an existing ISO image or define how to make a prepared
Define the handling of an eventual set of El Torito boot images which
has been read from an existing ISO image or define how to make a prepared
boot image file set bootable. Such file sets get produced by ISOLINUX or GRUB.
@*
Each -boot_image command has two arguments: type and setting. More than one
-boot_image command may be used to define the handling. Sequence matters.
-boot_image command may be used to define the handling of one or more boot
images. Sequence matters.
@*
Types "isolinux" and "grub" care for known peculiarities. Type "any" makes
no assumptions about the origin of the boot image.
no assumptions about the origin of the boot images.
@*
@sp 1
El Torito boot images of any type can be newly inserted, or discarded,
or patched, or kept unaltered.
The latter is only safe if the format of the boot image is
relocatable without content changes.
Whether to patch or to keep depends on whether
the boot images contain boot info tables.
@*
Some boot images contain a boot info table, which needs to be patched when
the boot image gets newly introduced into the ISO image or if an existing
image gets relocated. This is automatically done if type "isolinux" or "grub"
A boot info table needs to be patched when the boot image gets newly
introduced into the ISO image or if an existing image gets relocated.
This is automatically done if type "isolinux" or "grub"
is given, but not with "any".
@*
"show_status" will print what is known about the loaded image
and its designated fate.
@*
CAUTION:
This is an expert option.
xorriso cannot recognize the inner form of boot images.
"next" ends the definition of a boot image and starts a new one.
Any following -bootimage bootspecs will affect the new image.
The first "next" discards eventually loaded boot images and their
catalog.
@*
CAUTION: xorriso cannot recognize the inner form of boot images.
So the user has already to know about the particular needs of the
boot image which is present on the input media.
boot images which are present on the input media.
@*
Most safe is the default: -boot_image "any" "discard".
@*
@sp 1
A bootspec is a word of the form name=value and is used to describe the
activation of a boot image by an El Torito record and eventually a MBR.
The names "dir" and "bin_path" lead to El Torito boot image activation.
Name "system_area" activates the given file as MBR.
parameters of a boot image by an El Torito record and eventually a MBR.
The names "dir", "bin_path", "efi_path" lead to El Torito bootable images.
Name "system_area" activates a given file as MBR.
@*
On all media types this is possible within the first session. In further
sessions an existing boot image can get replaced by a new one, but depending
@ -2675,13 +2679,19 @@ which bundles these individual settings:
@*
-boot_image any boot_info_table=on
@*
"bin_path=" depicts the binary program which is to be started by the BIOS at
boot time.
"bin_path=" depicts the boot image file, a binary program which is to be
started by the hardware boot facility (e.g. the BIOS) at boot time.
@*
"efi_path=" depicts a boot image file that is ready for EFI booting.
Its load_size is determined automatically, no boot info table gets
written, platform_id is 0xef.
@*
An El Torito boot catalog file gets inserted into the ISO image with address
"cat_path=" at -commit time.
It is subject to normal -overwrite and -reassure processing if there is already
a file with the same name.
The catalog lists the boot images and is read by the boot facility to choose
one of the boot images.
@*
"load_size=" is a value which depends on the boot image. Default 2048 should
be overridden only if a better value is known.
@ -2689,12 +2699,25 @@ be overridden only if a better value is known.
"boot_info_table=on" may be used to apply patching to a boot image which
is given by "any" "bin_path=". "boot_info_table=off" disables patching.
@*
"discard" gives up an existing boot image.
"platform_id=" defines by two hex digits the Platform ID of the boot image.
"00" is 80x86 PC-BIOS, "01" is PowerPC, "02" is Mac, "ef" is EFI.
@*
"id_string="text|56_hexdigits defines the ID string of the boot catalog
section where the boot image will be listed. If the value consists of 56
characters [0-9A-Fa-f] then it is converted into 28 bytes, else the first
28 characters become the ID string.
The ID string of the first boot image becomes the overall catalog ID.
It is limited to 24 characters. Other id_strings become section IDs.
@*
"sel_crit="hexdigits defines the Selection Criteria of the boot image.
Up to 20 bytes get read from the given characters [0-9A-Fa-f].
They get attributed to the boot image entry in the catalog.
@*
"discard" gives up an existing boot catalog and its boot images.
@*
"keep" keeps or copies an existing boot image unaltered.
"keep" keeps or copies boot images unaltered and writes a new catalog.
@*
"patch" applies boot info table patching if an existing boot image gets copied
to a new location.
"patch" applies boot info table patching to existing boot images.
@*
@cindex System area, _definiton
@cindex MBR, set, -boot_image system_area=
@ -2713,8 +2736,9 @@ to the ISO image.
446 to 511 of the System Area.
@*
With type "isolinux" it shows a partition that begins at byte 0 and it causes
the boot image LBA to be written into the MBR. For the first session this
works only if also "system_area=" and "bin_path=" or "dir=" is given.
the LBA of the first boot image to be written into the MBR. For the first
session this works only if also "system_area=" and "bin_path=" or "dir="
is given.
@*
With types "any" and "grub" it shows a single
partiton which starts at byte 512 and ends where the ISO image ends.

@ -18,6 +18,11 @@
#ifndef Xorriso_private_includeD
#define Xorriso_private_includeD yes
/* >>> transition to new boot image management */
#define Xorriso_multi_booT 1
/** The source code release timestamp */
#include "xorriso_timestamp.h"
#ifndef Xorriso_timestamP
@ -258,19 +263,33 @@ struct XorrisO { /* the global context of xorriso */
int dvd_obs; /* DVD write chunk size: 0, 32k or 64k */
int stdio_sync; /* stdio fsync interval: -1, 0, >=32 */
int boot_platform_id;
int keep_boot_image;
int patch_isolinux_image;
char boot_image_cat_path[SfileadrL];
int boot_count; /* number of already attached boot images */
char boot_image_bin_path[SfileadrL];
char boot_image_bin_form[16];
int boot_platform_id;
int patch_isolinux_image;
int boot_image_emul; /* 0=no emulation
(1=emulation as hard disk)
(2=emulation as floppy)
*/
char boot_image_cat_path[SfileadrL];
off_t boot_image_load_size;
int boot_image_isohybrid; /* 0=off , 1=auto , 2=on , 3=force */
unsigned char boot_id_string[29];
unsigned char boot_selection_crit[21];
int boot_image_isohybrid; /* 0=off , deprecated: 1=auto , 2=on , 3=force */
int boot_efi_default; /* 0= no effect ,
1= appy --efi-boot parameters when attaching to img */
#ifndef Xorriso_multi_booT
/* <<< BOOT replace by attaching previous boot image to IsoImage by
-boot_image any next */
char boot_image_efi_path[SfileadrL];
#endif /* ! Xorriso_multi_booT */
char system_area_disk_path[SfileadrL];
int system_area_options; /* bit0= "GRUB protective msdos label"
(a simple partition table)

@ -1 +1 @@
#define Xorriso_timestamP "2010.04.22.160615"
#define Xorriso_timestamP "2010.04.26.121051"

@ -1422,6 +1422,7 @@ int Xorriso_give_up_drive(struct XorrisO *xorriso, int flag)
xorriso->no_volset_present= 0;
xorriso->loaded_boot_bin_lba= 0;
xorriso->loaded_boot_cat_path[0]= 0;
xorriso->boot_count= 0;
in_is_out_too= 0;
}
if((flag&2) && xorriso->out_drive_handle!=NULL) {
@ -1610,27 +1611,35 @@ int Xorriso_is_isohybrid(struct XorrisO *xorriso, IsoFile *bootimg_node,
int Xorriso_set_isolinux_options(struct XorrisO *xorriso,
IsoImage *image, int flag)
{
int make_isohybrid_mbr= 0, ret, patch_table= 0;
ElToritoBootImage *bootimg;
IsoFile *bootimg_node;
int make_isohybrid_mbr= 0, ret, patch_table= 0, num_boots;
ElToritoBootImage *bootimg, **boots = NULL;
IsoFile *bootimg_node, **bootnodes = NULL;
ret= iso_image_get_boot_image(image, &bootimg, &bootimg_node, NULL);
Xorriso_process_msg_queues(xorriso,0);
if(ret != 1) {
sprintf(xorriso->info_text, "Programming error: No boot image available in Xorriso_set_isolinux_options()");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
return(-1);
ret= -1; goto ex;
}
ret= iso_image_get_all_boot_imgs(image, &num_boots, &boots, &bootnodes, 0);
Xorriso_process_msg_queues(xorriso,0);
if(ret != 1) {
Xorriso_report_iso_error(xorriso, "", ret, "Cannot inquire boot images", 0,
"FATAL", 1);
ret= -1; goto ex;
}
patch_table = !!xorriso->patch_isolinux_image;
if(xorriso->boot_image_isohybrid == 0) {
ret= el_torito_set_isolinux_options(bootimg, patch_table, 0);
return(ret == 1);
if(xorriso->boot_image_isohybrid == 0 || num_boots > 1) {
ret= el_torito_set_isolinux_options(boots[num_boots - 1], patch_table, 0);