General TC > General TC Talk
[Solved] how to remaster cat'ed initramfs?
GNUser:
If I create an initramfs from two more components, like so...
--- Code: ---$ cat modules64.gz rootfs64.gz > corepure64.gz
--- End code ---
...then try to remaster the resulting initramfs like so...
--- Code: ---$ sudo su -c "mkdir temp; cd temp; gunzip -c ../corepure64.gz | cpio -i"
30012 blocks
--- End code ---
...I notice that only the contents of the first argument to cat (modules64.gz in this case) appear inside the temp directory.
Is there a way to remaster the entire corepure64.gz in this example (short of remastering its component parts then recreating corepure64.gz using cat)?
Paul_123:
Does zcat work
zcat "${OLDINITRD}" | sudo cpio -i -H newc -d
GNUser:
--- Quote from: Paul_123 on January 09, 2026, 04:05:44 PM ---Does zcat work
zcat "${OLDINITRD}" | sudo cpio -i -H newc -d
--- End quote ---
Hi Paul_123. zcat doesn't help:
--- Code: ---$ cat modules64.gz rootfs64.gz > corepure64.gz
$ sudo su -c "mkdir temp; cd temp; zcat ../corepure64.gz | cpio -i -H newc -d"
30012 blocks
$ ls temp
lib/ usr/
--- End code ---
Note how only the contents of modules64.gz appear inside the temp directory.
Rich:
Hi GNUser
Try this:
--- Code: ---mkdir tempdir
cd tempdir
zcat /path/to/existing/rootfs.gz | sudo cpio -i
--- End code ---
GNUser:
--- Quote from: Rich on January 09, 2026, 05:12:30 PM ---Hi GNUser
Try this:
--- Code: ---mkdir tempdir
cd tempdir
zcat /path/to/existing/rootfs.gz | sudo cpio -i
--- End code ---
--- End quote ---
Hi Rich. No luck with that, either:
--- Code: ---$ cat modules64.gz rootfs64.gz > corepure64.gz
$ mkdir tempdir
$ cd tempdir
$ zcat ../corepure64.gz | sudo cpio -i
30012 blocks
$ ls
lib/ usr/
--- End code ---
Maybe there's a better way to create corepure64.gz from smaller initramfs'es than simply using cat.
EDIT: When a new version of TCL is released and corepure64.gz is posted, how does it get created? I have no problem remastering corepure64.gz from stable TCL releases. It's only corepure64.gz that I create using cat that misbehaves in this way.
Navigation
[0] Message Index
[#] Next page
Go to full version