Tiny Core Linux

General TC => General TC Talk => Topic started by: quneur on September 30, 2010, 10:58:46 AM

Title: extensions on CD; remastering
Post by: quneur on September 30, 2010, 10:58:46 AM
[snip: see below]

Concerning extensions, how hard would it be to put the most commonly used extensions on CD? I do like the liveCD size but alot of space is not used and CDs are cheap (less than a buck each retail). It would be nice to have LiveCD.iso and a LiveCD + limited extensions.iso (cfdisk, shells, drivers, etc.)
Title: Re: extensions on CD; remastering
Post by: hiro on September 30, 2010, 01:05:47 PM
You can do this.
As I understand you're supposed to create a .gz file with all your extensions in a folder named opt and add the file to the initrd boot command line.
http://wiki.tinycorelinux.com/Remastering
http://wiki.tinycorelinux.com/Integrating+Extensions
and especially: http://wiki.tinycorelinux.com/Dynamic+root+filesystem+remastering
Title: Re: extensions on CD; remastering
Post by: tinypoodle on September 30, 2010, 01:14:42 PM
You can do this.
As I understand you're supposed to create a .gz file with all your extensions in a folder named opt and add the file to the initrd boot command line.
http://wiki.tinycorelinux.com/Remastering
http://wiki.tinycorelinux.com/Integrating+Extensions
and especially: http://wiki.tinycorelinux.com/Dynamic+root+filesystem+remastering

Correct, but...

AFAIK, extensions placed in (additional) initrd would all be loaded into ramdisk (tmpfs), so however much space of the CD would be used in addition would have an equal impact on RAM useage.
Title: Re: extensions on CD; remastering
Post by: maro on September 30, 2010, 09:48:45 PM
tinypoodle: I'd say you are correct WRT to the remastering of the initrd. Unfortunately the term of remastering seems to get used in two different situations, which would benefit from being more carefully distinguished from each other:

I can see that people are getting confused since you need to do both (A) and (B) if you want to create an ISO image that contains a changed initrd (which is the "more" (http://wiki.tinycorelinux.com/Remastering#Creating_an_iso) part I'm referring to above). But if you boot from a hard disk (or USB drive) and just want to change something in the Core system, you do (A) and use the resulting file (e.g. 'tinycore.gz') as a replacement for the one on your respective device.

To make matters even more interesting: as a sort of variation of (A) an option exists to create a kind of "companion" initrd. That is described in this wiki (http://wiki.tinycorelinux.com/Dynamic+root+filesystem+remastering) page. In which case an additional initrd gets created, and the boot loader is instructed to extract those multiple archives into RAM at boot time. Choosing this option makes probably only sense when one wants to add to the Core system and not when a file of the Core system is meant to be changed. As in this latter case you would depend on the order of the extractions to end up with the expected result, I for one would not want to take a bet on this.

A rather good discussion about various aspects of the integration of extensions into an ISO-image can be found from this post (http://forum.tinycorelinux.net/index.php?topic=7002.msg36870#msg36870) onwards.
Title: Re: extensions on CD; remastering
Post by: ^thehatsrule^ on September 30, 2010, 10:44:20 PM
[Split from http://forum.tinycorelinux.net/index.php?topic=6989.msg39168#msg39168 ]
Title: Re: extensions on CD; remastering
Post by: tinypoodle on October 01, 2010, 12:20:07 AM
I'd suspect that initrd's would always be loaded in the order passed to the bootloader.

What I observe when netbooting using pxelinux confirms that, but I neither ever tried to change the order, nor is my personal initrd supposed to overwrite any files existing in base.

EDIT: I took the liberty of opening a new thread with the findings of further research on this specific subject: http://forum.tinycorelinux.net/index.php?topic=7721.0
Title: Re: extensions on CD; remastering
Post by: beerstein on October 01, 2010, 07:08:05 AM
Hi: I would prefer to have the remastered CD boot as quick as possible and have
only the VIP extensions available after boot. Then all other extensions should be on demand

Title: Re: extensions on CD; remastering
Post by: tinypoodle on October 07, 2010, 03:38:14 AM
I'd suspect that initrd's would always be loaded in the order passed to the bootloader.

What I observe when netbooting using pxelinux confirms that, but I neither ever tried to change the order, nor is my personal initrd supposed to overwrite any files existing in base.

Turns out I was mistaken, when specifying 'initrd=tinycore.gz,my_initramfs.gz' loading happens actually in the opposite order. (alphabetical order ??)
Title: Re: extensions on CD; remastering
Post by: AlabamaPaul on October 07, 2010, 09:30:04 AM
Using ISOLINUX v3.71 that is not what I see when booting here.

I use the name extensions.cpio.gz, and my isolinux.cfg file looks like this:
Code: [Select]
DEFAULT clean
PROMPT 1
TIMEOUT 100

DISPLAY menu.msg

ONERROR clean

LABEL clean
KERNEL /boot/bzImage
APPEND initrd=/boot/tinycore.gz,/boot/extensions.cpio.gz consoleblank=0 noswap noutc max_loop=255 text quiet

With the above as my isolinux.cfg, /boot/tinycore.gz is always loaded first, then /boot/extensions.cpio.gz
Title: Re: extensions on CD; remastering
Post by: tinypoodle on November 04, 2010, 04:03:10 PM
For the findings of further research on the subject of order of extraction of multiple initrd's with syslinux and its variants see: http://forum.tinycorelinux.net/index.php?topic=7721.0