sonic-utilities
sonic-utilities copied to clipboard
Enhance next image detection for Aboot in sonic-installer
What I did
Fix a crash of sonic-installer for Aboot bootloaders when the next image is not exactly an installed sonic image.
How I did it
The Aboot bootloader relies of the SWI= keyword argument in the boot-config file to know which image to boot. This value is also used by sonic-installer to figure to extract the next image that will be executed. The current code has an issue as it only expects the next image to match the installation path of a SONiC image but not anything else.
This means that SWI=flash:sonic-aboot-broadcom.swi is not valid and can therefore be a problem when trying to install a new image via cold reboot.
How to verify it
Try sonic-installer list with the following values in boot-config
SWI=flash:image-something-expected/.sonic-boot.swi
SWI=flash:sonic-aboot-broadcom.swi
SWI=
Hi @Staphylo can you help check if this fix capable for 202305/202311 and 202405?
/azp run Azure.sonic-utilities
Azure Pipelines successfully started running 1 pipeline(s).
/azp run Azure.sonic-utilities
Azure Pipelines successfully started running 1 pipeline(s).
ADO: 29332764
Cherry-pick PR to 202405: https://github.com/sonic-net/sonic-utilities/pull/3540
Cherry-pick PR to 202311: https://github.com/sonic-net/sonic-utilities/pull/3541