bug-xorriso
[Top][All Lists]
Advanced

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

Re: [Bug-xorriso] fdisk complains: GPT PMBR size mismatch


From: Thomas Schmitt
Subject: Re: [Bug-xorriso] fdisk complains: GPT PMBR size mismatch
Date: Wed, 09 Apr 2014 21:41:32 +0200

Hi,

i can reproduce the gdisk complaints with a script that i derived from
yours and gdisk 0.8.1. The script just packs up some data files in
the same way as yours and announces them as boot images. (It would
not boot, of course. But gdisk does not know. :))

Further i can avoid them by using the mkisofs emulation.
You are blazing the trail. It's about time that somebody tests.
I am heavily thankful.


The decisive difference this time seems to be the fact that
the mkisofs emulation by default disables the emulation of
multi-session on disk files.

I was able to get my mock-up ISO acceptable for gdisk by adding
the command
  -compliance no_emul_toc
to disable the multi-session emulation:

    ${XORRISO} \
        -compliance no_emul_toc \
        -padding 0 \
        ...


The multi-session emulation reserves 64 kB at the image start
for a superblock that may be overwritten by future sessions.
The first session begins after these 64 kB by its own System Area
and superblock.
The reason for this is that when more sessions can be appended,
the first superblock can be updated without damaging the original
info for session 1. This allows to retrieve the chain of all
session superblocks from 1 to end.

But obviously it sabotages GPT.
The mkisofs emulation disables it to save space.

With the -compliance setting, i get this output from gdisk:
(My fdisk warns of GPT and shows MBR partition info.)
----------------------------------------------------------------------
GPT fdisk (gdisk) version 0.8.1

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /home/thomas/test.iso: 436 sectors, 218.0 KiB
Logical sector size: 512 bytes
Disk identifier (GUID): CA0A0836-D6BF-4624-A6FB-7B40D37543B5
Partition table holds up to 248 entries
First usable sector is 64, last usable sector is 372
Partitions will be aligned on 64-sector boundaries
Total free space is 1 sectors (512 bytes)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              64             127   32.0 KiB    0700  Gap0
   2             128             255   64.0 KiB    EF00  EFI boot partition
   3             256             371   58.0 KiB    0700  Gap1
----------------------------------------------------------------------

With default setting i get complaints:
----------------------------------------------------------------------
...
Warning! Main and backup partition tables differ! Use the 'c' and 'e' options
on the recovery & transformation menu to examine the two tables.
...
Warning! One or more CRCs don't match. You should repair the disk!
...
  GPT: damaged

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
...
----------------------------------------------------------------------

I will examine why the GPT is so messed up with the native default.

If gdisk likes your ISO, then please let fdisk tell its opinion
and forward it to me.


Have a nice day :)

Thomas




reply via email to

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