Tiny Core Base > TCB Q&A Forum

remastering tinycore.gz

(1/3) > >>

mikshaw:
My first attempt was a complete failure.  I was hoping that cpio would allow overwriting existing files in a cpio archive, so, for instance, if I wanted to replace opt/bootlocal.sh I could do it with "cpio -A" (append), but it adds a second copy  of opt and opt/bootlocal.sh to the archive.

Second attempt was:
gunzip tinycore.gz
cpio -i <tinycore
rm tinycore
[edit file]
find . | cpio -o  |gzip -9 > ../tinycore2

The result during boot was a failure to find init.  I then did cpio -i on the tinycore2 and the init file (symlink to bin/busybox) was still there, so I don't know what the deal is.  Maybe it needs to be named "tinycore.gz" rather than "tinycore2.gz"?

mikshaw:
EDIT:  YARRR! Ye deleted yon message before I got a chance to save the page! Scurvy dog!

Well, I'm not interested in making a new ISO (I very seldom make CDs but instead just overwrite existing files on my harddrive), so the last step is probably not so important. I thatnk you for that anyway, as it may be useful in the future, and is probably useful to others.

I only glanced at the -H option, since I thought it might apply only to very special circumstances, but was hoping by posting this question that someone might point out something like this =o)

It seemed as though -d is not needed...the necessary directories seem to be created without it?
Also seems to be the same with --no-absolute-filenames

In any case I will try again with those options and see what happens, thank you.

Thanks for the zcat hint...didn't know about that.

Jason W:
Sorry, I deleted my message since I misunderstood what you were wanting.   But for others here it is as it may be taken off the DSL page.   

unzip and uncpio tinycore.gz:
# zcat /path/to/boot/tinycore.gz | cpio -H newc -i -d --no-absolute-filenames

Make your changes and then zip it back up from within the same directory:
# find . | cpio -o -H newc | gzip -9 > tinycore.gz

Create new iso image if the root of the unpacked cd image is MYDIR and you are one directory above MYDIR:
# mkisofs -pad -l -r -J -V TinyCore -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o tinycore-test.iso MYDIR

mikshaw:

--- Quote ---find . | cpio -o -H newc | gzip -9 > tinycore.gz
--- End quote ---
So it seems that building the archive in the same directory  doesn't cause the archive to be added to the find output?  I was using ../tinycore2.gz because I had seen trouble in the past with find (I think it was find) adapting to changes in the directory.  The '2' because I was hoping I could put the test system right next to the original.

curaga:
It actually might. Better be safe and output to another dir.

Navigation

[0] Message Index

[#] Next page

Go to full version