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: Tue, 22 Dec 2015 16:05:33 +0100

Hi,

Alexander E. Patrakov wrote:
> The following variants, obtained by changing only the MBR, also work:
> 1. Type-0 one-sector bootable partition at the very first sector:
> 000001d0: 0100 0000 0200 0000 0000 0100 0000 0000  ................

Did you create this by partition editor or by dd ?

While trying to mimick it, i wonder whether the "0200" should
not be "0100". I understand that the value "02" is in byte 468 = 0x1d4:
Sector part of C/H/S address of last absolute sector in partition 2.
(Plus 2 bits from cylinder part which are 0.)

A partition from LBA 0 with 1 blocks should have C/H/S range
0/0/1 to 0/0/1, not 0/0/1 to 0/0/2.

(I am not sure how to express the end C/H/S of an empty partition
 at LBA 0. 0/0/0 is not really a valid C/H/S.)


------------------------------------------------------------------

There is a new GNU xorriso development snapshot uploaded

  http://www.gnu.org/software/xorriso/xorriso-1.4.3.tar.gz

  MD5 5163f97f5ce9a7707ac7de6777b46283

For a proof-of-concept i have added two macros which enable
the production of a dummy MBR partition like with Alexander's
recent experiments.

To be unpacked and built by

  tar xzf xorriso-1.4.3.tar.gz
  cd xorriso-1.4.3 && ./configure && make

Test the executable standalone binary by

  xorriso/xorriso -version

which should yield
  ...
  xorriso version   :  1.4.3
  Version timestamp :  2015.12.22.133736
  ...

You may use it by its absolute address with grub-mkrescue --xorriso=...


I hopefully fixed the bug with partition type 0xee with HFS+ if
no GPT emerges. It should now be 0x83 or 0xcd depending on the
presence of option  --protective-msdos-label .

Test proposals with add-on partition of type 0x00:

- Variation 1
  In ./xorriso-1.4.3 do

    export CPPFLAGS=" -DLibisofs_protective_msdos_plus_boot_dummY"
    ./configure && make clean && make

  If option --protective-msdos-label is present, and there emerges
  only one partition of type 0xee with no boot flag, then a second
  MBR partition gets addedd with same geometry as the first one,
  but with type 0x00 and boot flag.

    MBR partition table:   N Status  Type        Start       Blocks
    MBR partition      :   1   0x00  0xee            1        32251
    MBR partition      :   2   0x80  0x00            1        33251

- Variation 2
  In ./xorriso-1.4.3 do

    export CPPFLAGS=" -DLibisofs_protective_msdos_plus_boot_dummY"
    CPPFLAGS="$CPPFLAGS -DLibisofs_pmpbd_on_lba0"
    ./configure && make clean && make

  Under the same criteria as with Variation 1, the added second MBR
  partition starts at LBA and has only 1 block.

    MBR partition table:   N Status  Type        Start       Blocks
    MBR partition      :   1   0x00  0xee            1        32251
    MBR partition      :   2   0x80  0x00            0            1

- Back to normal
  In ./xorriso-1.4.3 do

    unset CPPFLAGS
    ./configure && make clean && make


I would be thankful for reports about tests with grub-mkrescue
and the picky machines.

(The partition adder code is on display at
  
http://bazaar.launchpad.net/~libburnia-team/libisofs/scdbackup/revision/1296/libisofs/system_area.c
)


Have a nice day :)

Thomas




reply via email to

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