[PATCH 0/6] partitions: GPT: refresh partition tables when necessary
Sascha Hauer
s.hauer at pengutronix.de
Wed Jan 7 03:08:15 PST 2026
On Wed, Jan 07, 2026 at 11:39:16AM +0100, Ahmad Fatoum wrote:
> Hello Sascha,
>
> On 12/3/25 4:19 PM, Sascha Hauer wrote:
> > This is a continuation of the patch previously sent separately:
> >
> > https://lore.kernel.org/all/20251128111929.2463263-1-s.hauer@pengutronix.de/
> >
> > 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.
>
> I thought with this series now applied, we could wipe the first 2
> sectors and it would fall back to the alternate GPT, but this is not the
> case because partition_table_read() invokes the partition parsers only
> when partition_parser_get_by_filetype() detects the magic in the first
> two sectors.
>
> Did you consider adapting it?
I am aware of this, but haven't looked into it.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list