Bug 12584

Summary: Generic EFI booting needs to support random UUIDs
Product: [Build System, Metadata & Runtime] BSPs Reporter: California Sullivan <california.l.sullivan>
Component: bsps-oe-coreAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Medium CC: ccasciato, randy.macleod, richard.purdie, stephano
Version: 0.0.0   
Target Milestone: 6.99   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description California Sullivan 2018-03-06 11:31:43 UTC
Currently, the generic EFI boot method using the following assume root=/dev/sda2 or similar:

https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/scripts/lib/wic/canned-wks/efi-bootdisk.wks.in
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-core/systemd/systemd-bootconf_1.00.bb
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-bsp/grub/grub-bootconf_1.00.bb

Using /dev/sda and such is not a reliable way to boot, as it depends on the install media enumerating to a certain value. Instead random UUIDs should be used.

This will require both the -bootconf recipes and wic to know the same random value. This value also needs to be saved in sstate, else issues will arise when rebuilding and doing package upgrades.

The current path to explore to accomplish this is as follows:
1) modify wic to take a file containing a UUID as input for its UUID creation
2) merge the -bootconf recipes into one recipe with multiple packages. This package would also deploy the UUID file for consumption.
3) modify efi-bootdisk.wks.in to use the new wic functionality and UUID file.

This would allow all bootloaders and wic to know the same UUID, and since it uses deploy should work with sstate. The new bootconf recipe would need to be extensible to support any arbitrary bootloader as well.
Comment 1 Richard Purdie 2021-11-04 15:12:59 UTC
systemd-bootconf file still contains root=/dev/sda2 so no EFI uuid support despite general wic uuid support
Comment 2 Randy MacLeod 2023-10-24 14:24:38 UTC
Bulk move from 4.99 or 0.00 to 5.99