Commit 3a41524e authored by Thomas Schmitt's avatar Thomas Schmitt

New -boot_image bootspec iso_mbr_part_type=

parent f3b85153
......@@ -3,7 +3,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2016 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2017 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
......@@ -294,6 +294,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->appended_as_gpt= 0;
m->appended_as_apm= 0;
m->part_like_isohybrid= 0;
m->iso_mbr_part_type= -1;
memset(m->gpt_guid, 0, 16);
m->gpt_guid_mode= 0;
m->ascii_disc_label[0]= 0;
......
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2016 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2017 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
......@@ -1095,6 +1095,26 @@ treatment_patch:;
else
was_ok= 0;
} else if(strncmp(treatpt, "iso_mbr_part_type=", 18) == 0) {
ret= 256;
if(strncmp(treatpt + 18, "default", 2) == 0) {
ret= -1;
} else if(strncmp(treatpt + 18, "0x", 2) == 0) {
u= 256;
sscanf(treatpt + 20, "%x", &u);
ret= u;
} else {
sscanf(treatpt + 18, "%d", &ret);
}
if(ret < -1 || ret > 0xff) {
sprintf(xorriso->info_text,
"-boot_image %s : iso_mbr_part_type='%s' wrong (\"default\", 0 ... 255, 0x00 ... 0xff)",
formpt, treatpt + 18);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;}
}
xorriso->iso_mbr_part_type= ret;
} else if(strncmp(treatpt, "partition_hd_cyl=", 17)==0) {
u= 0;
sscanf(treatpt + 17, "%u", &u);
......
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2016 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2017 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
......@@ -1857,7 +1857,8 @@ 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=\"|\"gpt_disk_guid=\"",
" |\"part_like_isohybrid=\"|\"iso_mbr_part_type=\"",
" |\"gpt_disk_guid=\"",
" |\"chrp_boot_part=on|off=\"|\"prep_boot_part=\"",
" |\"efi_boot_part=\"|\"efi_boot_part=--efi-boot-image\"",
" |\"mips_path=\"|\"mipsel_path=\"|\"mips_discard\"",
......
......@@ -3065,6 +3065,16 @@ 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->iso_mbr_part_type == -1);
sprintf(line, "-boot_image any iso_mbr_part_type=");
if(xorriso->iso_mbr_part_type == -1)
sprintf(line + strlen(line), "default\n");
else
sprintf(line + strlen(line), "0x%-2.2x\n",
(unsigned int) xorriso->iso_mbr_part_type);
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= (xorriso->gpt_guid_mode == 0);
sprintf(line, "-boot_image any gpt_disk_guid=%s",
xorriso->gpt_guid_mode == 0 ? "random" :
......
......@@ -961,6 +961,7 @@ int Xorriso_make_iso_write_opts(struct XorrisO *xorriso, IsoImage *image,
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_iso_mbr_part_type(sopts, xorriso->iso_mbr_part_type);
isoburn_igopt_set_gpt_guid(sopts, xorriso->gpt_guid, xorriso->gpt_guid_mode);
isoburn_igopt_set_disc_label(sopts, xorriso->ascii_disc_label);
isoburn_igopt_set_hfsp_serial_number(sopts, xorriso->hfsp_serial_number);
......
......@@ -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.7, Feb 22, 2017"
.TH XORRISO 1 "Version 1.4.7, Feb 26, 2017"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
......@@ -3434,6 +3434,15 @@ 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
\fB\-boot_image any iso_mbr_part_type=\fRnumber sets the partition type
of the MBR partition which represents the ISO or at least protects it.
Number may be 0x00 to 0xff. The text "default" re\-enables the default types
of the various occasions to create an ISO MBR partition.
.br
This is without effect if no such partition emerges by other settings or
if the partition type is prescribed mandatorily like 0xee for GPT protective
MBR or 0x96 for CHRP.
.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.
......@@ -6109,7 +6118,7 @@ Thomas Schmitt <scdbackup@gmx.net>
.br
for libburnia\-project.org
.SH COPYRIGHT
Copyright (c) 2007 \- 2016 Thomas Schmitt
Copyright (c) 2007 \- 2017 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.
......
This diff is collapsed.
......@@ -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.7, Feb 22, 2017"
@c man .TH XORRISO 1 "Version 1.4.7, Feb 26, 2017"
@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 - 2016 Thomas Schmitt
Copyright @copyright{} 2007 - 2017 Thomas Schmitt
@quotation
Permission is granted to distrubute this text freely.
......@@ -3982,6 +3982,15 @@ 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{-boot_image any iso_mbr_part_type=}number sets the partition type
of the MBR partition which represents the ISO or at least protects it.
Number may be 0x00 to 0xff. The text "default" re-enables the default types
of the various occasions to create an ISO MBR partition.
@*
This is without effect if no such partition emerges by other settings or
if the partition type is prescribed mandatorily like 0xee for GPT protective
MBR or 0x96 for CHRP.
@*
@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.
......@@ -7164,7 +7173,7 @@ Thomas Schmitt <scdbackup@@gmx.net>
for libburnia-project.org
@c man .SH COPYRIGHT
@section Copyright
Copyright (c) 2007 - 2016 Thomas Schmitt
Copyright (c) 2007 - 2017 Thomas Schmitt
@*
Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of @command{xorriso}.
......
......@@ -2,7 +2,7 @@
/* Command line oriented batch and dialog tool which creates, loads,
manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2016 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2017 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
......@@ -499,6 +499,11 @@ struct XorrisO { /* the global context of xorriso */
/* If 1: Apply isohybrid gestures to non-isohybrid situations */
int part_like_isohybrid;
/* MBR partition type of ISO filesystem partition or protective partition
if not real GPT or CHRP.
*/
int iso_mbr_part_type;
/* See libisoburn.h isoburn_igopt_set_gpt_guid() */
uint8_t gpt_guid[16];
int gpt_guid_mode;
......
#define Xorriso_timestamP "2017.02.27.092840"
#define Xorriso_timestamP "2017.02.27.093756"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment