Enable Dracut's livenet rootfs handling when systemd-networkd is in use.
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
- [x] The toolchain has been rebuilt successfully (or no changes were made to it)
- [x] The toolchain/worker package manifests are up-to-date
- [x] Any updated packages successfully build (or no packages were changed)
- [x] Packages depending on static components modified in this PR (Golang,
*-staticsubpackages, etc.) have had theirReleasetag incremented. - [x] Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
- [x] All package sources are available
- [x] cgmanifest files are up-to-date and sorted (
./cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json) - [x] LICENSE-MAP files are up-to-date (
./LICENSES-AND-NOTICES/SPECS/data/licenses.json,./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md,./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON) - [x] All source files have up-to-date hashes in the
*.signatures.jsonfiles - [x]
sudo make go-tidy-allandsudo make go-test-coveragepass - [x] Documentation has been updated to match any changes to the build system
- [x] Ready to merge
Summary
This change updates dracut livenet module with an iso downloader script to enable PXE booting for liveos ISOs. This is to bridge a gap in 102 - which has been fixed later in 103 (see bug and fix).
Dracut's livenet module can process root=live:http://artifacts-url at Dracut's parse phase. However, it does not follow through with downloading the artifacts later - and consequently, it does not attempt to pivot to the download rootfs image. This blocks the PXE boot flow for liveos isos.
This change enables this flow by providing a downloader script that is attached to the livenet Module parse phase. That way, once livenet parsing claims the handling of the kernel root parameter, it can also schedule the downloader to run after the network stack is up.
To avoid possible conflicts with possible user extensions, the download is only activated if the new 'rd.live.azldownloader' kernel parameter is present and set to 'enabled' - otherwise, it is disabled.
Also, the downloader is just a stub that calls into Dracut's livenet root handler which takes care of downloading.
Change Log
Does this affect the toolchain?
NO
Associated issues
Links to CVEs
- n/a
Test Methodology
- Build the dracut package locally.
- Build the baremetal image locally (which consumes the dracut package).
- Create an iso using Azure Image Customizer where the newly built baremetal image is used as input.
- Deploy a PXE server on the network.
- Deploy the iso to the pxe server.
- Boot a PXE client.
- Verify it boots and pivots successfully.