Boot from specified partition (or FS) UUID without knowing Device ID

Heinrich Schuchardt xypron.glpk at gmx.de
Fri Feb 18 18:41:18 CET 2022


On 2/18/22 18:07, Tom Rini wrote:
> On Fri, Feb 18, 2022 at 02:01:41PM +0700, Tom Hale wrote:
>
>> I want to have a fallback boot situation where boot is first tried from one
>> partition, and then from another partition (on a different device) if the
>> first partition isn't available (eg, if the first device fails).
>>
>> Can I boot from a specific FS UUID or a partition UUID without knowing a
>> particular device ID?  (I'm not sure if my devices will always be detected
>> in a repeatable order).
>>
>> Can fatload be used with only a partition UUID?  Or can I somehow get the
>> dev number from the UUID?

The UEFI boot manager uses device paths which comprise the partition
GUIDs. Currently we use the full device path.

Windows and efibootmgr just store the partition and the file path in
boot options and non-U-Boot UEFI implementation will work fine with
this. E.g.

HD(2,GPT,12345678-1234-5678-ABCD-123456789ABC,0x109000,0x32000)/File(\EFI\debian\shimx64.efi)

I think this approach should also be adopted for U-Boot when the file is
on a GPT partition.

Would this solve your problem?

Best regards

Heinrich

>
> As UUIDs are unique per device but our device probe order is (nominally,
> there's counter examples) static, this would be a more board specific
> way of going than knowing which media is which device.
>



More information about the U-Boot mailing list