OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
  • Task Type Bug Report
  • Category Toolchain
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Kane Green - 21.03.2021

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

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: 0×220) and Last usable LBA (0×230) 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 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.


Available keyboard shortcuts


Task Details

Task Editing