Skip to content

feat(cmd): Add command to unpack rootfses - #422

Draft
craciunoiuc wants to merge 1 commit into
prod-stagingfrom
craciunoiuc/unikraft-image-unpack
Draft

feat(cmd): Add command to unpack rootfses#422
craciunoiuc wants to merge 1 commit into
prod-stagingfrom
craciunoiuc/unikraft-image-unpack

Conversation

@craciunoiuc

Copy link
Copy Markdown
Contributor

Currently blocked on these, so in draft:
unikraft/go-archivefs#10
unikraft/go-cpio#2

erofs one worth discussing if it can be done cleaner

Closes: TOOL-1029

Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
@craciunoiuc
craciunoiuc requested a review from jedevc July 15, 2026 12:19
@jedevc

jedevc commented Jul 27, 2026

Copy link
Copy Markdown
Member

Copying from https://linear.app/unikraft/issue/TOOL-1029/add-unikraft-image-unpack#comment-edc8098e

Hm. So I see unikraft/go-archivefs#10 but why do the unpack instead of just providing an implementation of fs.FS? Then we have a generic unpack function which just takes an fs.FS in one place.

If everything is using an fs.FS, then for example, it makes it super easy to translate a cpio to an erofs file, without needing to unpack to disk. Essentially like the tarfs already does.

Remember there's an extension of this as TOOL-1030, which would mount the fs.FS as a FUSE filesystem.

Wait. Doesn't it already do this? https://github.com/unikraft/go-archivefs/blob/a06ac4112571c729baf5bcafdcf1f255b82796a7/erofs/erofs.go#L41-L53

This is the erofs file → fs.FS reader?

@craciunoiuc

Copy link
Copy Markdown
Contributor Author

Hmm, right, I think I forgot about that in a way, I'll have to revisit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants