Tiny Core Linux

General TC => Remasters / Remixes - Unofficial => Topic started by: Pats on August 25, 2014, 08:19:10 PM

Title: Remastering Tinycore.gz HowTo - A simple way
Post by: Pats on August 25, 2014, 08:19:10 PM
This is the procedure for extracting and repacking of tinycore.gz file. I think same may apply to core.gz.

Extracting tinycore.gz :
----------------------
mkdir /tmp/temp
Copy tinycore.gz to /tmp , then
cd /tmp/temp
zcat /tmp/tinycore.gz | sudo cpio -i -H newc -d >/dev/null

Remaster/make changes to the extracted tinycore.gz which must be now somewhere under /tmp.
re-packing tinycore.gz from remastered version:

Delete /tmp/tinycore.gz , then
cd /tmp/temp
sudo sh -c "find . | cpio -o -H newc | gzip -2" > /tmp/tinycore.gz

Note: Use sudo where-ever required. Also there is good explanation in Remastring section of Wiki and the Forum's posts.
Posted on the request of a newbee. Hope this helps to others also.


Title: Re: Remastering Tinycore.gz HowTo - A simple way
Post by: bmarkus on August 25, 2014, 09:23:29 PM
Pats@

Why -2 used with gzip?

Some optimization:

Code: [Select]
zcat /tmp/tinycore.gz | sudo cpio -i -H newc -d >/dev/null
can be replaced with

Code: [Select]
zcat ../tinycore.gz | sudo cpio -i -d
to make it shorter and portable.

For packing

Code: [Select]
sudo sh -c "find . | cpio -o -H newc | gzip -2" > /tmp/tinycore.gz
can be shorten to

Code: [Select]
find | cpio -o -H newc | gzip -9 > ../tinycore.gz
Title: Re: Remastering Tinycore.gz HowTo - A simple way
Post by: Misalf on August 26, 2014, 04:59:34 AM
Quote
Why -2 used with gzip?
As described in the wiki but  advdef -z4 tinycore.gz  is mentioned in the wiki, too.
http://wiki.tinycorelinux.net/wiki:remastering#packing

I'm wondering, could we remaster core.gz using any compression level or do certain requirements need to be met? I have slow network connections and CD drives in mind. I recently booted tinycore on an ancient 233MHz laptop via CD which took quite some time after choosing a menu entry from the boot loader. I guess it was either decompressing the initrd or reading it from the CD which took so long.
Title: Re: Remastering Tinycore.gz HowTo - A simple way
Post by: coreplayer2 on August 26, 2014, 09:02:51 AM
I make it easy by using core-remaster.tcz  extension
 8)
Title: Re: Remastering Tinycore.gz HowTo - A simple way
Post by: bmarkus on August 26, 2014, 09:23:36 AM

I'm wondering, could we remaster core.gz using any compression level or do certain requirements need to be met?


Use whatever you want.
Title: Re: Remastering Tinycore.gz HowTo - A simple way
Post by: curaga on August 26, 2014, 12:58:28 PM
Note that gzip compression level does not affect decompression speed. It's the same mb/s no matter if you compressed with -1, -9, or higher with advdef.
Title: Re: Remastering Tinycore.gz HowTo - A simple way
Post by: Misalf on August 26, 2014, 02:38:42 PM
Interesting. I wouldn't have guessed that.
Title: Re: Remastering Tinycore.gz HowTo - A simple way
Post by: Pats on August 26, 2014, 06:31:01 PM
@bmarkus

I am not sure but think, -2 may be more reliable/less time comsuming on old and slower machines. Anyhow curaga has already answered abt it.

Do you think, in your code:

find | cpio -o -H newc | gzip -9" > ../tinycore.gz

should be something like:

"find | cpio -o -H newc | gzip -9" > ../tinycore.gz

?

Thanks to all for expert comments.
Title: Re: Remastering Tinycore.gz HowTo - A simple way
Post by: gerald_clark on August 26, 2014, 08:14:42 PM
No you should not add the quotes.
Higher numbers in gzip take longer to compress, but not to decompress.
The more highly compressed files will be read faster off the drive/CD so it will load faster.

Advdef will compress it even more, making it load even faster.
Title: Re: Remastering Tinycore.gz HowTo - A simple way
Post by: bmarkus on August 26, 2014, 10:42:55 PM
Pats@

" was a typo, deleted in orignal post.
Title: Re: Remastering Tinycore.gz HowTo - A simple way
Post by: Pats on August 27, 2014, 05:06:25 AM
Quote from: gerald_clark
 No you should not add the quotes.

Yah, I know, it was just a little politeness, towards a senior memmber's un-intentional typo/error. ;)

Thanks to you also.