WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Remastering Tinycore.gz HowTo - A simple way  (Read 12110 times)

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Remastering Tinycore.gz HowTo - A simple way
« on: August 25, 2014, 11: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.



Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Remastering Tinycore.gz HowTo - A simple way
« Reply #1 on: August 26, 2014, 12:23:29 AM »
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
« Last Edit: August 27, 2014, 01:41:50 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Remastering Tinycore.gz HowTo - A simple way
« Reply #2 on: August 26, 2014, 07: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.
Download a copy and keep it handy: Core book ;)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Remastering Tinycore.gz HowTo - A simple way
« Reply #3 on: August 26, 2014, 12:02:51 PM »
I make it easy by using core-remaster.tcz  extension
 8)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Remastering Tinycore.gz HowTo - A simple way
« Reply #4 on: August 26, 2014, 12:23:36 PM »

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


Use whatever you want.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Remastering Tinycore.gz HowTo - A simple way
« Reply #5 on: August 26, 2014, 03: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.
The only barriers that can stop you are the ones you create yourself.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Remastering Tinycore.gz HowTo - A simple way
« Reply #6 on: August 26, 2014, 05:38:42 PM »
Interesting. I wouldn't have guessed that.
Download a copy and keep it handy: Core book ;)

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: Remastering Tinycore.gz HowTo - A simple way
« Reply #7 on: August 26, 2014, 09: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.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Remastering Tinycore.gz HowTo - A simple way
« Reply #8 on: August 26, 2014, 11: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.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Remastering Tinycore.gz HowTo - A simple way
« Reply #9 on: August 27, 2014, 01:42:55 AM »
Pats@

" was a typo, deleted in orignal post.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: Remastering Tinycore.gz HowTo - A simple way
« Reply #10 on: August 27, 2014, 08: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.