WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: extensions on CD; remastering  (Read 4416 times)

Offline quneur

  • Newbie
  • *
  • Posts: 4
extensions on CD; remastering
« 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.)
« Last Edit: September 30, 2010, 10:45:12 PM by ^thehatsrule^ »

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: extensions on CD; remastering
« Reply #1 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

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: extensions on CD; remastering
« Reply #2 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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: extensions on CD; remastering
« Reply #3 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:
  • (A) Remastering of the initrd (i.e. 'tinycore.gz' or 'microcore.gz'): This gzip-ed cpio-archive contains the Core system that gets loaded into RAM at boot time. This wiki page is describing that process (plus a bit "more").
  • (B) Remastering of the ISO image: This referes to the creation of a (bootable) CD-ROM image that contains: a boot loader (e.g. 'isolinux'), a kernel (i.e 'bzImage'), an initrd (e.g. 'tinycore.gz') and as an option might also contain a set of extensions to make them available after booting. More about this is available on this wiki page.

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" 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 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 onwards.

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: extensions on CD; remastering
« Reply #4 on: September 30, 2010, 10:44:20 PM »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: extensions on CD; remastering
« Reply #5 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
« Last Edit: November 04, 2010, 04:00:30 PM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: extensions on CD; remastering
« Reply #6 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

t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: extensions on CD; remastering
« Reply #7 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 ??)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline AlabamaPaul

  • Newbie
  • *
  • Posts: 34
Re: extensions on CD; remastering
« Reply #8 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

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: extensions on CD; remastering
« Reply #9 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
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)