WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: mount cpio files (potentualy)  (Read 165 times)

Offline mocore

  • Hero Member
  • *****
  • Posts: 761
  • ~.~
mount cpio files (potentualy)
« on: May 03, 2026, 06:42:12 PM »


i read this

You can't edit core.gz directly. You need to unpack it, edit the file
of interest, then repack it:

thought ... why ? (...do i find that process causes me friction  ;D )

did a little digging/filtering and found this  (untested!;-) any one feeling brave? ... copy of repo zip attached in the links sink )

https://www.netfort.gr.jp/~dancer/diary/daily/2022-Sep-10.html.en

Quote
Life Tried implementing FUSE cpiofs. I thought it might be fun to implement a file system that can mount initrd file systems. I've implemented symlinks and regular files handling and then I realized that it is kind of annoying that I need to implement hard links. cpiofs

https://github.com/dancerj/gitlstreefs/blob/master/experimental/cpiofs.cc ( 386 lines + includes )

Code: [Select]
/*
  cpio file system.

  Allows you to mount cpio files.

Example:

 sudo ../out/experimental/cpiofs ~/mnt/ \
   --underlying_file=$(readlink -f ~/tmp/initrd.img.gunzip )

*/

+.. https://github.com/dancerj/gitlstreefs/blob/master/experimental/cpiofs_test.sh

 8)

Offline mocore

  • Hero Member
  • *****
  • Posts: 761
  • ~.~
Re: mount cpio files (...)
« Reply #1 on: May 04, 2026, 08:57:50 AM »
just ftr

creating /workspace dir in root and chown tc:staff /workspace

loading
bash ninja gcc / compiletc   fuse3-dev

extracting gitlstreefs-master.zip
and running build.sh in whatever directory gitlstreefs-master.zip was extracted to

... appears to be attempting to build though thing's requiring git2.h are failing as it was not loaded ...


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12744
Re: mount cpio files (potentualy)
« Reply #2 on: May 04, 2026, 09:46:11 AM »
Hi mocore
Installing  libgit2-dev.tcz  should fix that.

Offline mocore

  • Hero Member
  • *****
  • Posts: 761
  • ~.~
Re: mount cpio files (potentualy)
« Reply #3 on: May 05, 2026, 08:12:31 PM »
Hi mocore
Installing  libgit2-dev.tcz  should fix that

indeed

Code: [Select]
provides.sh git2.h

can be incredibly informative !
what a useful addition to the core tool box

though im less interested in the git.h or build output
more in the cpiofs.cc authors intentions expectations and assumptions , apart from using docker to build ... as i opted for a "real" core vm

i presume it would be possible to just wget cpiofs.cc and other the necessary "included" files and just build those

like was done with the (very much not in the slightest or any conceivable way binary) make script in this post https://forum.tinycorelinux.net/index.php?topic=18712.msg114569#msg114569

as CNK mentioned in another topic
the build scripts sometimes didn't work

how prescient !
whats all ways interesting about such case is why they fail
imho
« Last Edit: May 05, 2026, 08:14:06 PM by mocore »