Repository navigation
[13.4-stable] Fixes newc initrd filename null termination - #6906
Merged
eriknordmark merged 1 commit intoOct 26, 2026
Merged
eriknordmark merged 1 commit into
eriknordmark merged 1 commit into
Conversation
The newc CPIO format requires filenames to be null-terminated. Calculates namesize to include the null terminator, preventing "initramfs name without nulterm" errors with newer kernels. Signed-off-by: Othonas Soultatos <othonas.s@gmail.com> (cherry picked from commit 76a86d0) Signed-off-by: Milan Lenco <milan@zededa.com>
4 of 7 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 13.4-stable #6906 +/- ##
===============================================
+ Coverage 24.78% 32.66% +7.88%
===============================================
Files 8 9 +1
Lines 1138 1090 -48
===============================================
+ Hits 282 356 +74
+ Misses 788 654 -134
- Partials 68 80 +12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
rene
approved these changes
Oct 25, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backport of #5412 to
13.4-stable.Partial backport, clean cherry-pick with
-xfrom76a86d0eee, no conflicts. Only the two GRUB patches of the PR are backported (pkg/grub/patches/0015-...for amd64 andpkg/grub/patches-2.06/0014-...for arm64 and riscv64). They make thenewcpathname in the initrd cpio header NUL-terminated, as the format requires.This is needed, otherwise installation over iPXE (netboot) is broken. The installer ISO is loaded by GRUB as
newc:/installer.iso:.... Kernels since 6.1.120 refuse to unpack such an entry:The installer never starts. Kernels without the check are not affected by the fix: it only makes the header conform to the cpio format.
Without this fix
TestBootstrapWithNetworkBootfails.PR dependencies
None.
How to test and validate this PR
Covered by the evetest test
TestBootstrapWithNetworkBoot(added to13.4-stableby #6899):Changelog notes
Fixed installation over iPXE: the installer ISO is now loaded with a NUL-terminated name in the initrd, which kernels 6.1.120 and later require.
Checklist
For backport PRs (remove it if it's not a backport):
And the last but not least:
check them.