diff --git a/doc/partition_offset.wiki b/doc/partition_offset.wiki index ff35e7a9..33730f03 100644 --- a/doc/partition_offset.wiki +++ b/doc/partition_offset.wiki @@ -131,7 +131,7 @@ was edited to replace in the options of the xorriso command: }}} by {{{ - -partition_offset 16 -no-pad --no-emul-toc + -partition_offset 16 -no-pad }}} Then GRUB 2 was built and installed. @@ -142,10 +142,24 @@ The resulting image from was put onto USB stick. It passed the same tests on Debian as above RIPLinux example. It boots to a GRUB prompt. -Due to options -no-pad --no-emul-toc the image is about 300 kB smaller than +Due to option -no-pad the image is about 250 kB smaller than the image produced by original grub-mkrescue. Else it would have grown by -about 130 kB. The mkisofs emulation of newer versions of xorriso has ---no-emul-toc as default. Thus the overhead would only be about 50 kB. +about 50 kB. + +Unpadded ISO images are safe except for burning on CD in TAO mode. +In this case problems may occur with reading the last few data blocks. +So when burning onto CD make sure to require SAO mode and/or to +require padding by 300 KiB. +Burning on DVD or BD needs no such caution. Neither does copying +on USB stick or hard disk. + +Program fdisk will complain about "different physical/logical" addresses. +This can be silenced by adding option +{{{ + -partition_cyl_align on +}}} +at the cost of image padding up to the next full MiB. +E.g. by 402 KiB to 2 MiB. -------------------------------------------------------------------------- @@ -162,12 +176,15 @@ preparations. Application: -The partition offset feature can be controlled by libisofs API call +The partition offset feature can be controlled by libisofs API calls {{{ int iso_write_opts_set_part_offset(IsoWriteOpts *opts, uint32_t block_offset_2k, int secs_512_per_head, int heads_per_cyl); + +int iso_write_opts_set_system_area(IsoWriteOpts *opts, char data[32768], + int options, int flag); }}} resp. by libisoburn calls {{{ @@ -178,13 +195,24 @@ int isoburn_igopt_set_part_offset(struct isoburn_imgen_opts *opts, int isoburn_igopt_get_part_offset(struct isoburn_imgen_opts *opts, uint32_t *block_offset_2k, int *secs_512_per_head, int *heads_per_cyl); + +int isoburn_igopt_set_system_area(struct isoburn_imgen_opts *o, + char data[32768], int options); + +int isoburn_igopt_get_system_area(struct isoburn_imgen_opts *o, + char data[32768], int *options); }}} resp. by xorriso options {{{ -boot_image any partition_offset=(2kb_block_adr) -boot_image any partition_sec_hd=(number) -boot_image any partition_hd_cyl=(number) - -as mkisofs ... -partition_offset (2kb_block_adr) ... + -boot_image any partition_cyl_align(on|auto|off) + + -as mkisofs ... -partition_offset (2kb_block_adr) \ + -partition_hd_cyl (number) \ + -partition_sec_hd (number) \ + -partition_cyl_align (on|auto|off) ... }}} As stated above, an offset larger than 16 would expose vital parts of the