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: Daniel Martin
Subject: Re: [Bug-xorriso] fdisk complains: GPT PMBR size mismatch
Date: Wed, 9 Apr 2014 18:03:04 +0200

On 9 April 2014 15:33, Thomas Schmitt <address@hidden> wrote:
> Hi,
>
>> when passing an iso to `fdisk -l` it complains that there's a "GPT
>> PMBR size mismatch".
>> GPT PMBR size mismatch (583191 != 583807) will be corrected by w(rite).
>
> Isn't gdisk in charge for GPT ?

Just fired fdisk and gdisk on another smaller image created with '-padding 0':

-----8<-----
$ fdisk -l tests-grub.iso
GPT PMBR size mismatch (10995 != 11007) will be corrected by w(rite).

Disk tests-grub.iso: 5.4 MiB, 5636096 bytes, 11008 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E23EEBD1-DD03-48BA-81C7-DB337223BF26

Device          Start          End   Size Type
tests-grub.iso1    64          487   212K Microsoft basic data
tests-grub.iso2   488          879   196K EFI System
tests-grub.iso3   880        10931   4.9M Microsoft basic data

$ gdisk -l tests-grub.iso
GPT fdisk (gdisk) version 0.8.10

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!

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

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Disk tests-grub.iso: 11008 sectors, 5.4 MiB
Logical sector size: 512 bytes
Disk identifier (GUID): E23EEBD1-DD03-48BA-81C7-DB337223BF26
Partition table holds up to 248 entries
First usable sector is 64, last usable sector is 10932
Partitions will be aligned on 8-sector boundaries
Total free space is 1 sectors (512 bytes)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              64             487   212.0 KiB   0700  Gap0
   2             488             879   196.0 KiB   EF00  EFI boot partition
   3             880           10931   4.9 MiB     0700  Gap1
----->8-----

> "PMBR" probably means "Protective MBR". See
>   http://en.wikipedia.org/wiki/GUID_Partition_Table#Legacy_MBR_.28LBA_0.29
>
> 583807 - 583191 = 616 blocks = 308 KiB.
>
> We have a traditional 0-byte padding of 300 KiB, in case the image
> ends up on a CD written with write type TAO. (Linux CD readahead bug.)
> The padding is covered by the MBR partitions, because they shall
> cover the whole ISO image.
> But the padding cannot be covered by GPT, because a GPT disk ends
> by the GPT backup header block. That block is valuable and thus
> needs to be stored before the padding.
>
> Now from where do we get the surplus 8 KiB ?
>
> Obviously fdisk displays the GPT entries and not the MBR partition table:
>
>> tests-grub.iso1    64          487   212K Microsoft basic data
>> tests-grub.iso2   488          879   196K EFI System
>> tests-grub.iso3   880       583127 284.3M Microsoft basic data
>
> I'd like to inspect the first 34 KiB of that image
>
>   dd if=tests-grub.iso bs=1K count=34 of=for_bug_xorriso.bin
>
> This will include MBR, GPT, and the Primary Volume Descriptor of
> the ISO image. No file names, and no file data, except what you
> submitted by -boot_image.
>
>
>> Though, the iso boots as expected. Can this warning (?) be ignored?
>
> It should be quite harmless for booting. (EFI booting tolerates
> wrong checksums in the GPT. So it will probably not care for the
> MBR at all.)
> But it might indicate upcomming trouble with partition editors.
>
> Try xorriso command
>    -padding 0
> and look whether the warning disappears.
> If not, then send me the first 34 KiB of that ISO , too.

Yes, it happens with '-padding 0' too. I've attached both
pmbr_sz_miss.bin and pmbr_sz_miss_pad_zero.bin. The latter has been
created with '-padding 0'.

> What xorriso commands exactly do you use ?

For this I've attached the script I've used to create the image, which
I used above with fdisk and gdisk.


Thanks,
    Daniel Martin

Attachment: create_img.sh
Description: Bourne shell script

Attachment: pmbr_sz_miss.bin
Description: Binary data

Attachment: pmbr_sz_miss_pad_zero.bin
Description: Binary data


reply via email to

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