[FS#3698] x86 EFI image GUID Partition Table (GPT) is corrupt

OpenWrt Bugs openwrt-bugs at lists.openwrt.org
Sun Mar 21 11:51:59 GMT 2021


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Kane Green (kane) 

Attached to Project - OpenWrt/LEDE Project
Summary - x86 EFI image GUID Partition Table (GPT) is corrupt
Task Type - Bug Report
Category - Toolchain
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details - If you use `fdisk` to check an OpenWrt image of x86_64 EFI, you will get an error message:

$ fdisk -l openwrt-x86-64-generic-ext4-combined-efi.img
GPT PMBR size mismatch (246303 != 246334) will be corrected by write.
The backup GPT table is corrupt, but the primary appears OK, so that will be used.
The backup GPT table is not on the end of the device. This problem will be corrected by write.
...


  * No matter what size the image are, the PMBR size is always 31 less than real value.
  * There is no secondary partition table at the end of the image.
  * The Backup LBA (offset of image file: 0x220) and Last usable LBA (0x230) values are wrong.

This doesn't hurt the boot or the usage of OpenWrt x86. However this is NOT a correct way.

According the git history, these EFI support is introduced in this [[https://github.com/openwrt/openwrt/commit/1963bbaa8f035c0a3c71233a049a7a4d7cd32711|commit 1963bba]]. And it disabled the secondary partition table.
In the commit message, this incorret operation is 'to reduce size'. However, this secondary partition table, which has 33 LBAs, takes only 16.5 KiB. I don't think 16.5 KiB is worth to 'save' for an x86_64 device.
Besides, in the commit message the author said 'This may cause problems when generate vmdk images or vdi images. We have to pad enough sectors when generate these images.' So, this 'reduce size' operation also has side effects, and is not a good tradeoff.

As a conclusion, I hope this problem can be fixed.

More information can be found at the following URL:
https://bugs.openwrt.org/index.php?do=details&task_id=3698

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the openwrt-bugs mailing list