Tiny Core Linux

Tiny Core Base => Micro Core => Topic started by: jls on August 01, 2009, 01:53:33 PM

Title: why core extensions are only tcz and not also tce?
Post by: jls on August 01, 2009, 01:53:33 PM
why core extensions are only tcz and not also tce?
Title: Re: why core extensions are only tcz and not also tce?
Post by: roberts on August 02, 2009, 01:25:14 AM
There is no benefit to having  cores as tce, as it would be loaded into ram as TC does.
Title: Re: why core extensions are only tcz and not also tce?
Post by: jls on August 02, 2009, 05:44:33 AM
the benefit would be that the device where the core element are stored doesn't need to remain mounted.
Title: Re: why core extensions are only tcz and not also tce?
Post by: curaga on August 02, 2009, 06:35:48 AM
Ah, but that's why the core elements can be contained in RAM, inside the initrd (put in /opt/tce) :)
Title: Re: why core extensions are only tcz and not also tce?
Post by: jls on August 02, 2009, 06:47:16 AM
how to do this?

[^thehatsrule^: removed spam]
Title: Re: why core extensions are only tcz and not also tce?
Post by: helander on August 02, 2009, 07:12:09 AM
You need to "remaster" your microcore.gz (or tinycore.gz if you are using that).

   - gunzuip "microcore.gz"
   - unpack "microcore". using cpio, into a clean directory
   - copy all your extensions into opt/tce under the new directory
   - pack the new directory into a new "microcore" using cpio
   - gzip "microcore"
   - et voila

Maybe there should be a tool that does this, which as input takes an existing initramfs image (xxxxcore.gz) and
a directory where the extensions are located.

/Lars
Title: Re: why core extensions are only tcz and not also tce?
Post by: curaga on August 02, 2009, 07:13:33 AM
They were announced here:
http://forum.tinycorelinux.net/index.php?topic=1770.0

In short, follow the wiki page "Remastering". The only thing to do between unpacking and packing would be

mkdir /tmp/extract/opt/tce
cp /path/to/my/tce/*.core.* /tmp/extract/opt/tce

edit: heh, helander beat me to it :P
Title: Re: why core extensions are only tcz and not also tce?
Post by: jls on August 02, 2009, 07:59:35 AM
in order to stay in initramfs should I boot with the embed option?

[^thehatsrule^: removed spam]
Title: Re: why core extensions are only tcz and not also tce?
Post by: helander on August 02, 2009, 08:08:42 AM
No, you do not have to. Without embed all of initramfs is copied to the newly created tmpfs, including the stuff under
/opt/tce.

Another possibility which I have not explored yet, only read about in the syslinux manual, is if you use
any of the boot loaders in the syslinux/isolinux/extlinux family.

When you specifiy the initrd you could provide this as a comma separated list of (compressed or uncompressed) cpio archives. The resulting initramfs would then consist of the union of the contents of the listed files.
This should allow you to create one cpio with the stuff under /opt/tce and the other would be the
xxxxcore.gz originally supplied by MC/TC. This would avoid the need to merge your extensions into the
xxxxcore.gz files. In case you are using grub or any other boot loader this is not possible (to my knowledge)

/Lars
Title: Re: why core extensions are only tcz and not also tce?
Post by: jls on August 02, 2009, 10:32:34 AM
booting with the embed option it's not better for memory consumption?
Title: Re: why core extensions are only tcz and not also tce?
Post by: curaga on August 02, 2009, 10:36:25 AM
booting with the embed option it's not better for memory consumption?
It is, saves about 16mb of ram during boot. But the bootcode does not affect remastering.
Title: Re: why core extensions are only tcz and not also tce?
Post by: jls on August 02, 2009, 10:47:26 AM
If I remaster judt adding the core elements why shouldn't I use the embed boot code?
Title: Re: why core extensions are only tcz and not also tce?
Post by: helander on August 02, 2009, 02:33:42 PM
If you in the first place decided to use the embed option, I do not see that remastering the described way would prevent you from continuing that. The embed option controls if the content of the initramfs should be copied to a tmpfs or if the system should be working on the original initramfs. In both cases the system will be working with a root file system having the same content (it's just stored in different ways). What the content is depends on what you have loaded into the
initramfs (an original microcore.gz, your remastered microcore.gz, union of original microcore.gz and cpio archive as I described would be possible using syslinux & friends).

/Lars
Title: Re: why core extensions are only tcz and not also tce?
Post by: roberts on August 17, 2009, 01:09:09 AM
There will be an option to not mount but instead load core elements into ram in next 2.3 RC.