[RFC PATCH] cmd: part: add dupcheck command to detect duplicate PARTUUIDs

Tom Rini trini at konsulko.com
Mon Feb 16 16:32:49 CET 2026


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.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260216/f28a66dd/attachment.sig>


More information about the U-Boot mailing list