bug-xorriso
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-xorriso] Test Proposal for [bug #46716] Protective MBR partitio


From: Thomas Schmitt
Subject: Re: [Bug-xorriso] Test Proposal for [bug #46716] Protective MBR partition is not marked as bootable
Date: Mon, 21 Dec 2015 16:29:47 +0100

Hi,

Alexander E. Patrakov wrote:
> MBR partition table:   N Status  Type        Start       Blocks
> MBR partition      :   1   0x80  0x83            0        32804
> MBR partition      :   2   0x00  0xef        32804         5760

In xorriso this would need
- The HFS+-0xee bug fixed (or no HFS+ being produced)
- A xorriso command to set the boot flag on a particular MBR partition.
  

> It only remains to find out how to make the same iso from 
> scratch, using command-line tools from GRUB and xorriso as found on 
> Debain Jessie and not using the "loop-mounting and repacking" technique.

With current xorriso (including olde 1.3.2 on Jessie) you will
have to apply the final patching (and maybe omit HFS+ to
keep patching more simple).

If you want to avoid the repacking then we will have to modify
a copy of grub-mkrescue and let it run your xorriso options
with the same building stones as it uses for its normal
GPT+APM+ElTorito layout.


As you probably noticed, the main trick is that
    -append_partition ...
replaces
   -efi-boot-part --efi-boot-image
from the original xorriso run of grub-mkrescue.
The local disk file used with -append_partition is the
same that gets into the ISO as /efi.img.

Further one should add option
   -no-pad
because the padding of 300 KiB gets written at the end of the
ISO and thus before the appended partition.
(It is actually the job of the burn program to pad against the
 meanwhile quite defused TAO CD read-ahead bug in Linux.)


I would plan this layout as alternative grub-mkrescue result
so that we can submit the change as patch proposal (with
lotsa cookies and milk for Santa).
A new option of grub-mkrescue would choose this alternative.
Like --no-gpt.

grub-mkrescue would finish that alternative job by finally
patching the first MBR partition to boot flag, type 0x83, and
partition start at LBA 0.
Therefore one would have to test whether the file given by
--output= is suitable for random read-write access.

If grub-mkrescue detects a future version of xorriso, which
has the HFS+0xee bug fixed and offers boot flagging, then
grub-mkrescue could avoid the patching and allow any writable
output file type.


I am currently pondering an idea how to avoid the waste of
a duplicate EFI partition: El Torito boot image outside of ISO.
The El Torito boot catalog would point to the appended partition.
Drawback is that the pure ISO without appendix would be crippled.

But first i have to fix the HFS+0xee bug. Very very cautiously ...


Have a nice day :)

Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]