This is a continuation of the patch previously sent separately: https://lore.kernel.org/all/[email protected]/
Ahmad's comment to this was that we should write the inactive GPT first to make sure there's always a valid GPT on the device. This series implements just that. I stumbled upon a bug when we restore the primary GPT from the alternate GPT, this is fixed in this series. Signed-off-by: Sascha Hauer <[email protected]> --- Sascha Hauer (6): partitions: gpt: pass epd context pointer to find_valid_gpt() partitions: gpt: only write actual ptes size to device partitions: gpt: factor out a function to write primary/alternate GPT partitions: gpt: write inactive GPT first partitions: gpt: fix GPT restauration from alternate GPT partitions: gpt: refresh partition tables when necessary common/partitions/Kconfig | 14 +++ common/partitions/efi.c | 293 +++++++++++++++++++++++++++++++++++----------- 2 files changed, 236 insertions(+), 71 deletions(-) --- base-commit: 500df27eb054f86ce232c5bb30c3a7ea8f771e61 change-id: 20251203-efi-partition-refresh-a18d630961bc Best regards, -- Sascha Hauer <[email protected]>
