sonic-utilities icon indicating copy to clipboard operation
sonic-utilities copied to clipboard

Enhance next image detection for Aboot in sonic-installer

Open Staphylo opened this issue 1 year ago • 6 comments
trafficstars

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=

Staphylo avatar Jul 18 '24 14:07 Staphylo

Hi @Staphylo can you help check if this fix capable for 202305/202311 and 202405?

Blueve avatar Jul 31 '24 03:07 Blueve

/azp run Azure.sonic-utilities

StormLiangMS avatar Aug 15 '24 04:08 StormLiangMS

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 15 '24 04:08 azure-pipelines[bot]

/azp run Azure.sonic-utilities

StormLiangMS avatar Aug 22 '24 03:08 StormLiangMS

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 22 '24 03:08 azure-pipelines[bot]

ADO: 29332764

Blueve avatar Sep 06 '24 03:09 Blueve

Cherry-pick PR to 202405: https://github.com/sonic-net/sonic-utilities/pull/3540

mssonicbld avatar Sep 11 '24 05:09 mssonicbld

Cherry-pick PR to 202311: https://github.com/sonic-net/sonic-utilities/pull/3541

mssonicbld avatar Sep 11 '24 05:09 mssonicbld