New boot_specs efi_boot_part, prep_boot_part, chrp_boot_part
This commit is contained in:
parent
4e733f082a
commit
56308c81e4
@ -1800,20 +1800,25 @@ not_enough_args:;
|
|||||||
goto problem_handler_2;
|
goto problem_handler_2;
|
||||||
|
|
||||||
} else if(strcmp(argpt, "-chrp-boot-part") == 0) {
|
} else if(strcmp(argpt, "-chrp-boot-part") == 0) {
|
||||||
xorriso->system_area_options= (xorriso->system_area_options & ~0x3cfc) |
|
ret= Xorriso_option_boot_image(xorriso, "any", "chrp_boot_part=on", 0);
|
||||||
0x400;
|
if(ret <= 0)
|
||||||
|
goto problem_handler_2;
|
||||||
|
|
||||||
} else if(strcmp(argpt, "-prep-boot-part") == 0) {
|
} else if(strcmp(argpt, "-prep-boot-part") == 0) {
|
||||||
if(i + 1 >= argc)
|
if(i + 1 >= argc)
|
||||||
goto not_enough_args;
|
goto not_enough_args;
|
||||||
i++;
|
i++;
|
||||||
strcpy(xorriso->prep_partition, argv[i]);
|
ret= Sfile_str(xorriso->prep_partition, argv[i], 0);
|
||||||
|
if(ret <= 0)
|
||||||
|
goto ex;
|
||||||
|
|
||||||
} else if(strcmp(argpt, "-efi-boot-part") == 0) {
|
} else if(strcmp(argpt, "-efi-boot-part") == 0) {
|
||||||
if(i + 1 >= argc)
|
if(i + 1 >= argc)
|
||||||
goto not_enough_args;
|
goto not_enough_args;
|
||||||
i++;
|
i++;
|
||||||
strcpy(xorriso->efi_boot_partition, argv[i]);
|
ret= Sfile_str(xorriso->efi_boot_partition, argv[i], 0);
|
||||||
|
if(ret <= 0)
|
||||||
|
goto ex;
|
||||||
|
|
||||||
} else if(strcmp(argpt, "-append_partition") == 0) {
|
} else if(strcmp(argpt, "-append_partition") == 0) {
|
||||||
if(i + 3 >= argc)
|
if(i + 3 >= argc)
|
||||||
|
@ -1012,6 +1012,28 @@ treatment_patch:;
|
|||||||
memcpy(xorriso->hfsp_serial_number, sn, 8);
|
memcpy(xorriso->hfsp_serial_number, sn, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else if(strncmp(treatpt, "efi_boot_part=", 14) == 0) {
|
||||||
|
if(Sfile_str(xorriso->efi_boot_partition, treatpt + 14, 0) <= 0)
|
||||||
|
{ret= -1; goto ex;}
|
||||||
|
|
||||||
|
} else if(strncmp(treatpt, "prep_boot_part=", 15) == 0) {
|
||||||
|
if(Sfile_str(xorriso->prep_partition, treatpt + 15, 0) <= 0)
|
||||||
|
{ret= -1; goto ex;}
|
||||||
|
|
||||||
|
} else if(strncmp(treatpt, "chrp_boot_part=", 15) == 0) {
|
||||||
|
if(strcmp(treatpt + 15, "on") == 0) {
|
||||||
|
xorriso->system_area_options= (xorriso->system_area_options & ~0x3cfc) |
|
||||||
|
0x400;
|
||||||
|
} else if(strcmp(treatpt + 15, "off") == 0) {
|
||||||
|
xorriso->system_area_options= xorriso->system_area_options & ~0x3c00;
|
||||||
|
} else {
|
||||||
|
sprintf(xorriso->info_text,
|
||||||
|
"-boot_image %s chrp_boot_part: unknown mode : %s",
|
||||||
|
formpt, treatpt + 15);
|
||||||
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
|
||||||
|
{ret= 0; goto ex;}
|
||||||
|
}
|
||||||
|
|
||||||
} else if(strncmp(treatpt, "isohybrid=", 10) == 0 &&
|
} else if(strncmp(treatpt, "isohybrid=", 10) == 0 &&
|
||||||
strcmp(formpt, "isolinux")==0) {
|
strcmp(formpt, "isolinux")==0) {
|
||||||
|
|
||||||
|
@ -1610,6 +1610,8 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
|
|||||||
" |\"discard\"|\"keep\"|\"patch\"|\"dir=\"|\"bin_path=\"",
|
" |\"discard\"|\"keep\"|\"patch\"|\"dir=\"|\"bin_path=\"",
|
||||||
" |\"cat_path=\"|\"cat_hidden=on|iso_rr|joliet|off\"",
|
" |\"cat_path=\"|\"cat_hidden=on|iso_rr|joliet|off\"",
|
||||||
" |\"load_size=\"|\"system_area=\"|\"partition_table=on|off\"",
|
" |\"load_size=\"|\"system_area=\"|\"partition_table=on|off\"",
|
||||||
|
" |\"chrp_boot_part=on|off=\"|\"prep_boot_part=\"",
|
||||||
|
" |\"efi_boot_part=\"|\"efi_boot_part=--efi-boot-image\"",
|
||||||
" |\"mips_path=\"|\"mipsel_path=\"|\"mips_discard\"",
|
" |\"mips_path=\"|\"mipsel_path=\"|\"mips_discard\"",
|
||||||
" |\"sparc_label=\"|\"sparc_discard\"",
|
" |\"sparc_label=\"|\"sparc_discard\"",
|
||||||
" |\"hfsplus_serial=\"|\"show_status\"",
|
" |\"hfsplus_serial=\"|\"show_status\"",
|
||||||
@ -1621,6 +1623,8 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
|
|||||||
" ISO image by the usual commands like -map or -add.",
|
" ISO image by the usual commands like -map or -add.",
|
||||||
" system_area= and partition_table= are for MBR based booting",
|
" system_area= and partition_table= are for MBR based booting",
|
||||||
" from USB stick. The system_area= file needs not to be added.",
|
" from USB stick. The system_area= file needs not to be added.",
|
||||||
|
" chrp_boot_part= and prep_boot_part= are for PowerPC.",
|
||||||
|
" efi_boot_part= is for booting EFI systems from USB stick.",
|
||||||
" mips_path= adds Big Endian MIPS boot files. mipsel_path=",
|
" mips_path= adds Big Endian MIPS boot files. mipsel_path=",
|
||||||
" sets one Little Endian MIPS boot file. sparc_label=",
|
" sets one Little Endian MIPS boot file. sparc_label=",
|
||||||
" activates SUN Disk Label. All three are mutually exclusive",
|
" activates SUN Disk Label. All three are mutually exclusive",
|
||||||
|
@ -1389,6 +1389,25 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
|
|||||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
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",
|
||||||
|
ret == 1 ? "on" : "off");
|
||||||
|
if(!(is_default && no_defaults))
|
||||||
|
Xorriso_status_result(xorriso, filter, fp, flag & 2);
|
||||||
|
|
||||||
|
is_default= (xorriso->prep_partition[0] == 0);
|
||||||
|
sprintf(line,"-boot_image any prep_boot_part=%s\n",
|
||||||
|
Text_shellsafe(xorriso->prep_partition, sfe, 0));
|
||||||
|
if(!(is_default && no_defaults))
|
||||||
|
Xorriso_status_result(xorriso, filter, fp, flag & 2);
|
||||||
|
|
||||||
|
is_default= (xorriso->efi_boot_partition[0] == 0);
|
||||||
|
sprintf(line,"-boot_image any efi_boot_part=%s\n",
|
||||||
|
Text_shellsafe(xorriso->efi_boot_partition, sfe, 0));
|
||||||
|
if(!(is_default && no_defaults))
|
||||||
|
Xorriso_status_result(xorriso, filter, fp, flag & 2);
|
||||||
|
|
||||||
#ifdef Xorriso_with_isohybriD
|
#ifdef Xorriso_with_isohybriD
|
||||||
if(strcmp(form, "isolinux") == 0) {
|
if(strcmp(form, "isolinux") == 0) {
|
||||||
static char modes[4][6]= {"off", "auto", "on", "force"};
|
static char modes[4][6]= {"off", "auto", "on", "force"};
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
.\" First parameter, NAME, should be all caps
|
.\" First parameter, NAME, should be all caps
|
||||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||||
.\" other parameters are allowed: see man(7), man(1)
|
.\" other parameters are allowed: see man(7), man(1)
|
||||||
.TH XORRISO 1 "Version 1.2.3, Jun 07, 2012"
|
.TH XORRISO 1 "Version 1.2.3, Jun 18, 2012"
|
||||||
.\" Please adjust this date whenever revising the manpage.
|
.\" Please adjust this date whenever revising the manpage.
|
||||||
.\"
|
.\"
|
||||||
.\" Some roff macros, for reference:
|
.\" Some roff macros, for reference:
|
||||||
@ -391,19 +391,35 @@ Most bootable GNU/Linux CDs are equipped with ISOLINUX or GRUB boot images.
|
|||||||
makes such an image bootable. For details see command \-boot_image.
|
makes such an image bootable. For details see command \-boot_image.
|
||||||
.br
|
.br
|
||||||
It is possible to make ISO images bootable from USB stick or other
|
It is possible to make ISO images bootable from USB stick or other
|
||||||
hard\-disk\-like media by \-boot_image parameter system_area= . This installs
|
hard\-disk\-like media. Several options install a \fBMBR\fR
|
||||||
a Master Boot Record which may get adjusted according to the needs
|
(Master Boot Record), It may get adjusted according to the needs of the
|
||||||
of GRUB resp. ISOLINUX.
|
intended boot firmware and the involved boot loaders, e.g. GRUB2 or ISOLINUX.
|
||||||
An \fBMBR\fR contains boot code and a partition table. It does not hamper
|
A MBR contains boot code and a partition table.
|
||||||
CDROM booting. The new MBR of a follow\-up session can get in effect
|
The new MBR of a follow\-up session can get in effect
|
||||||
only on overwriteable media.
|
only on overwriteable media.
|
||||||
.br
|
.br
|
||||||
|
MBR is read by PC\-BIOS when booting from USB stick or hard disk,
|
||||||
|
and by PowerPC CHRP or PReP when booting.
|
||||||
|
An MBR partiton with type 0xee indicates the presence of GPT.
|
||||||
|
.br
|
||||||
Emulation \-as mkisofs supports the example options out of the ISOLINUX wiki,
|
Emulation \-as mkisofs supports the example options out of the ISOLINUX wiki,
|
||||||
the options used in GRUB script grub\-mkrescue, and the example in the
|
the options used in GRUB script grub\-mkrescue, and the example in the
|
||||||
FreeBSD AvgLiveCD wiki.
|
FreeBSD AvgLiveCD wiki.
|
||||||
.br
|
.br
|
||||||
There is support for boot facilities other than PC BIOS:
|
A \fBGPT\fR (GUID Partition Table) marks partitions in a more modern way.
|
||||||
EFI, MIPS Big Endian (SGI), MIPS Little Endian (DEC), SUN SPARC.
|
It is read by EFI when booting from USB stick or hard disk, and may be used
|
||||||
|
for finding and mounting a HFS+ partition inside the ISO image.
|
||||||
|
.br
|
||||||
|
An \fBAPM\fR (Apple Partition Map) marks the HFS+ partition.
|
||||||
|
It is read by Macs for booting and for mounting.
|
||||||
|
.br
|
||||||
|
MBR, GPT and APM are combinable. APM occupies the first 8 bytes of
|
||||||
|
MBR boot code. All three do not hamper El Torito booting from CDROM.
|
||||||
|
.br
|
||||||
|
There is support for further facilities:
|
||||||
|
MIPS Big Endian (SGI), MIPS Little Endian (DEC), SUN SPARC.
|
||||||
|
Those are mutually not combinable and also not combinable with MBR, GPT,
|
||||||
|
or APM.
|
||||||
.br
|
.br
|
||||||
.PP
|
.PP
|
||||||
\fBACL\fR
|
\fBACL\fR
|
||||||
@ -2805,9 +2821,12 @@ session this works only if also "system_area=" and "bin_path=" or "dir="
|
|||||||
is given.
|
is given.
|
||||||
.br
|
.br
|
||||||
With types "any" and "grub" it shows a single
|
With types "any" and "grub" it shows a single
|
||||||
partiton which starts at byte 512 and ends where the ISO image ends.
|
partition which starts at byte 512 and ends where the ISO image ends.
|
||||||
This works with or without system_area= or boot image.
|
This works with or without system_area= or boot image.
|
||||||
.br
|
.br
|
||||||
|
Bootspecs chrp_boot_part=, prep_boot_part=, and efi_boot_part= overwrite
|
||||||
|
this entry in the MBR partition table.
|
||||||
|
.br
|
||||||
In follow\-up sessions the existing System Area is preserved by default.
|
In follow\-up sessions the existing System Area is preserved by default.
|
||||||
If types "isolinux" or "grub" are set to "patch", then "partition_table=on"
|
If types "isolinux" or "grub" are set to "patch", then "partition_table=on"
|
||||||
is activated without new boot image.
|
is activated without new boot image.
|
||||||
@ -2818,6 +2837,26 @@ then those parameters get updated when the new System Area is written.
|
|||||||
Special "system_area=/dev/zero" causes 32k of NUL\-bytes.
|
Special "system_area=/dev/zero" causes 32k of NUL\-bytes.
|
||||||
Use this to discard an MBR which was loaded with the ISO image.
|
Use this to discard an MBR which was loaded with the ISO image.
|
||||||
.br
|
.br
|
||||||
|
\fBchrp_boot_part=on\fR causes a single partition in MBR which covers
|
||||||
|
the whole ISO image and has type 0x41. This is not compatible with any
|
||||||
|
other feature that produces MBR partition entries. It makes GPT unrecognizable.
|
||||||
|
.br
|
||||||
|
\fBprep_boot_part=\fR inserts the content of a data file into the image and
|
||||||
|
marks it by an MBR partition of type 0x96. The parts of the ISO image before
|
||||||
|
and after this partition will be covered by further MBR partitions.
|
||||||
|
The data file is supposed to contain ELF executable code.
|
||||||
|
.br
|
||||||
|
\fBefi_boot_part=\fR inserts the content of a data file into the image and
|
||||||
|
marks it by a GPT partition. If not chrp_boot_part=on, then the first partition
|
||||||
|
in MBR will have type 0xee to announce the presence of GPT.
|
||||||
|
The data file is supposed to contain a FAT filesystem.
|
||||||
|
.br
|
||||||
|
Instead of a disk_path, the word \-\-efi\-boot\-image may be given.
|
||||||
|
It exposes in GPT the content of the first El Torito EFI boot image as
|
||||||
|
EFI system partition. EFI boot images are introduced by bootspec efi_path=.
|
||||||
|
The affected EFI boot image cannot show up in HFS+ because it is stored
|
||||||
|
outside the HFS+ partition.
|
||||||
|
.br
|
||||||
\fBpartition_offset=\fR2kb_block_adr causes a partition table with a single
|
\fBpartition_offset=\fR2kb_block_adr causes a partition table with a single
|
||||||
partition that begins at the given block address. This is counted in 2048 byte
|
partition that begins at the given block address. This is counted in 2048 byte
|
||||||
blocks, not in 512 byte blocks. If the block address is non\-zero then it must
|
blocks, not in 512 byte blocks. If the block address is non\-zero then it must
|
||||||
|
@ -345,16 +345,27 @@ Most bootable GNU/Linux CDs are equipped with ISOLINUX or GRUB boot
|
|||||||
images. `xorriso' is able to create or maintain an El Torito object
|
images. `xorriso' is able to create or maintain an El Torito object
|
||||||
which makes such an image bootable. For details see command -boot_image.
|
which makes such an image bootable. For details see command -boot_image.
|
||||||
It is possible to make ISO images bootable from USB stick or other
|
It is possible to make ISO images bootable from USB stick or other
|
||||||
hard-disk-like media by -boot_image parameter system_area= . This
|
hard-disk-like media. Several options install a *MBR* (Master Boot
|
||||||
installs a Master Boot Record which may get adjusted according to the
|
Record), It may get adjusted according to the needs of the intended
|
||||||
needs of GRUB resp. ISOLINUX. An *MBR* contains boot code and a
|
boot firmware and the involved boot loaders, e.g. GRUB2 or ISOLINUX. A
|
||||||
partition table. It does not hamper CDROM booting. The new MBR of a
|
MBR contains boot code and a partition table. The new MBR of a
|
||||||
follow-up session can get in effect only on overwriteable media.
|
follow-up session can get in effect only on overwriteable media.
|
||||||
|
MBR is read by PC-BIOS when booting from USB stick or hard disk, and by
|
||||||
|
PowerPC CHRP or PReP when booting. An MBR partiton with type 0xee
|
||||||
|
indicates the presence of GPT.
|
||||||
Emulation -as mkisofs supports the example options out of the ISOLINUX
|
Emulation -as mkisofs supports the example options out of the ISOLINUX
|
||||||
wiki, the options used in GRUB script grub-mkrescue, and the example in
|
wiki, the options used in GRUB script grub-mkrescue, and the example in
|
||||||
the FreeBSD AvgLiveCD wiki.
|
the FreeBSD AvgLiveCD wiki.
|
||||||
There is support for boot facilities other than PC BIOS: EFI, MIPS Big
|
A *GPT* (GUID Partition Table) marks partitions in a more modern way.
|
||||||
Endian (SGI), MIPS Little Endian (DEC), SUN SPARC.
|
It is read by EFI when booting from USB stick or hard disk, and may be
|
||||||
|
used for finding and mounting a HFS+ partition inside the ISO image.
|
||||||
|
An *APM* (Apple Partition Map) marks the HFS+ partition. It is read by
|
||||||
|
Macs for booting and for mounting.
|
||||||
|
MBR, GPT and APM are combinable. APM occupies the first 8 bytes of MBR
|
||||||
|
boot code. All three do not hamper El Torito booting from CDROM.
|
||||||
|
There is support for further facilities: MIPS Big Endian (SGI), MIPS
|
||||||
|
Little Endian (DEC), SUN SPARC. Those are mutually not combinable and
|
||||||
|
also not combinable with MBR, GPT, or APM.
|
||||||
|
|
||||||
*ACL* are an advanced way of controlling access permissions to file
|
*ACL* are an advanced way of controlling access permissions to file
|
||||||
objects. Neither ISO 9660 nor Rock Ridge specify a way to record ACLs.
|
objects. Neither ISO 9660 nor Rock Ridge specify a way to record ACLs.
|
||||||
@ -2480,9 +2491,11 @@ filesystem and announced by an MBR partition table entry.
|
|||||||
and it causes the LBA of the first boot image to be written into
|
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
|
the MBR. For the first session this works only if also
|
||||||
"system_area=" and "bin_path=" or "dir=" is given.
|
"system_area=" and "bin_path=" or "dir=" is given.
|
||||||
With types "any" and "grub" it shows a single partiton which
|
With types "any" and "grub" it shows a single partition which
|
||||||
starts at byte 512 and ends where the ISO image ends. This works
|
starts at byte 512 and ends where the ISO image ends. This works
|
||||||
with or without system_area= or boot image.
|
with or without system_area= or boot image.
|
||||||
|
Bootspecs chrp_boot_part=, prep_boot_part=, and efi_boot_part=
|
||||||
|
overwrite this entry in the MBR partition table.
|
||||||
In follow-up sessions the existing System Area is preserved by
|
In follow-up sessions the existing System Area is preserved by
|
||||||
default. If types "isolinux" or "grub" are set to "patch", then
|
default. If types "isolinux" or "grub" are set to "patch", then
|
||||||
"partition_table=on" is activated without new boot image. In this
|
"partition_table=on" is activated without new boot image. In this
|
||||||
@ -2492,6 +2505,25 @@ filesystem and announced by an MBR partition table entry.
|
|||||||
when the new System Area is written.
|
when the new System Area is written.
|
||||||
Special "system_area=/dev/zero" causes 32k of NUL-bytes. Use this
|
Special "system_area=/dev/zero" causes 32k of NUL-bytes. Use this
|
||||||
to discard an MBR which was loaded with the ISO image.
|
to discard an MBR which was loaded with the ISO image.
|
||||||
|
*chrp_boot_part=on* causes a single partition in MBR which covers
|
||||||
|
the whole ISO image and has type 0x41. This is not compatible with
|
||||||
|
any other feature that produces MBR partition entries. It makes
|
||||||
|
GPT unrecognizable.
|
||||||
|
*prep_boot_part=* inserts the content of a data file into the
|
||||||
|
image and marks it by an MBR partition of type 0x96. The parts of
|
||||||
|
the ISO image before and after this partition will be covered by
|
||||||
|
further MBR partitions. The data file is supposed to contain ELF
|
||||||
|
executable code.
|
||||||
|
*efi_boot_part=* inserts the content of a data file into the image
|
||||||
|
and marks it by a GPT partition. If not chrp_boot_part=on, then
|
||||||
|
the first partition in MBR will have type 0xee to announce the
|
||||||
|
presence of GPT. The data file is supposed to contain a FAT
|
||||||
|
filesystem.
|
||||||
|
Instead of a disk_path, the word --efi-boot-image may be given.
|
||||||
|
It exposes in GPT the content of the first El Torito EFI boot
|
||||||
|
image as EFI system partition. EFI boot images are introduced by
|
||||||
|
bootspec efi_path=. The affected EFI boot image cannot show up in
|
||||||
|
HFS+ because it is stored outside the HFS+ partition.
|
||||||
*partition_offset=*2kb_block_adr causes a partition table with a
|
*partition_offset=*2kb_block_adr causes a partition table with a
|
||||||
single partition that begins at the given block address. This is
|
single partition that begins at the given block address. This is
|
||||||
counted in 2048 byte blocks, not in 512 byte blocks. If the block
|
counted in 2048 byte blocks, not in 512 byte blocks. If the block
|
||||||
@ -4456,7 +4488,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
|
|||||||
* -alter_date sets timestamps in ISO image: Manip. (line 147)
|
* -alter_date sets timestamps in ISO image: Manip. (line 147)
|
||||||
* -alter_date_r sets timestamps in ISO image: Manip. (line 167)
|
* -alter_date_r sets timestamps in ISO image: Manip. (line 167)
|
||||||
* -append_partition adds arbitrary file after image end: Bootable.
|
* -append_partition adds arbitrary file after image end: Bootable.
|
||||||
(line 202)
|
(line 223)
|
||||||
* -application_id sets application id: SetWrite. (line 184)
|
* -application_id sets application id: SetWrite. (line 184)
|
||||||
* -as emulates mkisofs or cdrecord: Emulation. (line 13)
|
* -as emulates mkisofs or cdrecord: Emulation. (line 13)
|
||||||
* -assert_volid rejects undesired images: Loading. (line 84)
|
* -assert_volid rejects undesired images: Loading. (line 84)
|
||||||
@ -4672,15 +4704,16 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
|
|||||||
|