forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unsupported fs.squashfs extraction in sonic-installer (sonic-net#…
…1366) Abstracted away the access to the path of the rootfs via a contextmanager. In Arista secureboot, the rootfs is never extracted on the flash. Instead it's mounted directly from within the signed SWI. The update_sonic_environment function however always assume that the rootfs to be at the same place. - How I did it To alleviate this restriction, a new context manager to obtain the rootfs is introduced. The choice of a context manager rather than a function is entirely based on error management and cleanup. Mounting a squashfs from a swi file requires the use of losetup which makes the rootfs available under /dev/loopX Once done or on error, we need to free this resource which becomes free when using a contextmanager.
- Loading branch information
Showing
4 changed files
with
64 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters