-
Notifications
You must be signed in to change notification settings - Fork 10
UKI new API, supporting UKI re-customization with enabling /boot cleanup #512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| err := shell.ExecuteLive(true /*squashErrors*/, "e2fsck", "-fy", partitionDevice) | ||
| if err != nil { | ||
| return 0, fmt.Errorf("%w (device='%s'):\n%w", ErrFilesystemE2fsckResize, partitionDevice, err) | ||
| // e2fsck returns exit code 1 if it corrected errors. This is considered a success. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert. We intentionally fail if there is any disk corruption because it means something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed, but keep seeing the error FAIL: TestOutputAndInjectArtifactsCosi, this happened before this code also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't see this error in the GitHub workflows. Is this something that only happens on your local dev box?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have seen this error from dev build, please see - https://github.com/microsoft/azure-linux-image-tools/actions/runs/19920812104
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems for the e2fsck exit code, the 1: File system errors were found and corrected., should we treat it as an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we intentionally fail if there was any disk corruption even if that corruption was corrected. It means something went wrong, which suggests there might be other problems as well.
I would double check all the mounts and make sure CleanClose is being called correctly.
This PR introduces a new UKI API design that deprecates the
kernelsfield in favorof a simpler, more powerful
modefield, enabling advanced UKI re-customizationscenarios including proper /boot partition cleanup.
Key Changes
API Changes:
os.uki.kernels(supported values:autoor list of kernel versions)os.uki.mode(supported values:create|passthrough)create: Generate UKI files for all installed kernels (replaces old UKIs if present)passthrough: Preserve existing UKI files without modificationFeature Enhancements:
UKIs with updated kernel cmdline args, verity hashes, or other boot parameters
createmode safely cleans up /boot when regeneratingUKIs, while
passthroughmode leaves everything untouchedChecklist
Test dev functional build:
https://github.com/microsoft/azure-linux-image-tools/actions/runs/19910635867