Skip to content

fix: Several fixes and features for rootfs file systems#2676

Merged
nderjung merged 7 commits intounikraft:stagingfrom
craciunoiuc:craciunoiuc/fs-fixes
Mar 4, 2026
Merged

fix: Several fixes and features for rootfs file systems#2676
nderjung merged 7 commits intounikraft:stagingfrom
craciunoiuc:craciunoiuc/fs-fixes

Conversation

@craciunoiuc
Copy link
Member

@craciunoiuc craciunoiuc commented Mar 3, 2026

Prerequisite checklist

Description of changes

The fixes and their reasonings are:

  • C1 -- erofs->cpio fail was mentioned but somehow missing, readd it
  • C2 -- copying erofs files was possible, but cpio files not because of the custom writer; use a direct one
  • C3 -- an unused file type was hiding, use it to copy any file as initrd, not just cpio/erofs (notice files on disk will have .file extension)
  • C4,5 -- Add the unused unknown type to be used when specifying files but you want autodetect the type fully. A bit useless but might be turned useful later if we want to do even more detection

Closes: #2675

Without this transformation would fail silently
as it would be identified as a tar file.

Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
Do not use special cpio writer if the file is already
packed. We can use a simple copy.

Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
@craciunoiuc craciunoiuc force-pushed the craciunoiuc/fs-fixes branch from 64ca1a1 to 954c329 Compare March 3, 2026 13:27
Copy link
Member

@nderjung nderjung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, just one comment about the name of a method.

I've also tested locally with a couple of scenarios and it works for me 👍 thanks!

Will merge after the rename :)

craciunoiuc and others added 4 commits March 4, 2026 11:17
Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
This value will be set to the empty string from the CLI if it's not
explicitly set with `--rootfs-type`. This essentially results in
overwriting the pre-populated default cpio type with an empty fs type.

This then just silently skips the build in older versions of kraft, or
causes a weirdly strange internal error on staging.

Signed-off-by: Justin Chadwell <justin@unikraft.com>
Debugging without these is an absolute PITA.

Signed-off-by: Justin Chadwell <justin@unikraft.com>
@craciunoiuc craciunoiuc force-pushed the craciunoiuc/fs-fixes branch from 954c329 to 888fab5 Compare March 4, 2026 09:21
Copy link
Member

@nderjung nderjung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Reviewed-by: Alexander Jung alex@unikraft.com
Approved-by: Alexander Jung alex@unikraft.com

@nderjung nderjung merged commit edb4c5c into unikraft:staging Mar 4, 2026
9 checks passed
@github-project-automation github-project-automation bot moved this from 🧊 Icebox to 🚀 Done in KraftKit Roadmap Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🚀 Done

Development

Successfully merging this pull request may close these issues.

3 participants