[RFC PATCH] cmd: part: add dupcheck command to detect duplicate PARTUUIDs
Begari, Padmarao
Padmarao.Begari at amd.com
Tue Feb 17 06:26:31 CET 2026
[Public]
> From: Tom Rini <trini at konsulko.com>
> Sent: Monday, February 16, 2026 9:03 PM
> To: Begari, Padmarao <Padmarao.Begari at amd.com>
> Cc: u-boot at lists.denx.de; Simek, Michal <michal.simek at amd.com>; git (AMD-
> Xilinx) <git at amd.com>; Toomey, John <john.toomey at amd.com>; Quentin Schulz
> <quentin.schulz at cherry.de>; Rasmus Villemoes <ravi at prevas.dk>
> Subject: Re: [RFC PATCH] cmd: part: add dupcheck command to detect duplicate
> PARTUUIDs
>
> On Sun, Feb 15, 2026 at 06:40:47PM +0530, Padmarao Begari wrote:
>
> > Add a 'part dupcheck' subcommand (gated by CONFIG_PARTITION_UUIDS)
> > that scans all block devices for duplicate partition UUIDs. This helps
> > detect situations where the same disk image has been flashed to
> > multiple boot devices (e.g., USB stick and UFS), which can lead to
> > unpredictable boot behavior when using PARTUUID-based root filesystem
> > specifications. It iterates all block devices using
> > blk_foreach_probe() and checks partition UUIDs via part_get_info().
> >
> > When duplicates are found, a warning is printed for each occurrence:
> >
> > Warning: duplicate PARTUUID 20c5fba5-0171-457f-b9cd-f5129cd07228
> > first seen on usb_mass_storage.lun0:3
> > also on ufs_scsi.id0lun0:3
> >
> > Signed-off-by: John Toomey <john.toomey at amd.com>
> > Signed-off-by: Padmarao Begari <padmarao.begari at amd.com>
> > ---
> > cmd/part.c | 104
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++-
> > 1 file changed, 103 insertions(+), 1 deletion(-)
>
> I see this as useful, but I think it needs to be its own Kconfig symbol.
> This is going to be enabled on something like 1100 boards today, if only gating on
> CONFIG_PARTITION_UUIDS. Thanks.
Ok Tom got it, will guard it with own Kconfig symbol.
Regards
Padmarao
>
> --
> Tom
More information about the U-Boot
mailing list