Re: Lo-ram CD

[ Thread Index | Date Index | More lists.tuxfamily.org/slitaz Archives ]


Hi,

> Is is possible to make the LiveCD run on both 156MB of RAM (running in
> RAM), and in 64MB (running off the CD)?  What are the differences
> between the two?  I tried to find documentation on this, but it seems it
> was on the wiki when it went down (however, if it is still around, can
> you point me to it?).
> Also, if you need me to test this, I will be willing to help.

1- ifmem.c32
============
You can select a boot entry according to the memory size with the
syslinux module http://mirror.slitaz.org/pxe/ifmem.c32
Slitaz web boot uses it for cooking or 2.0 core selection.
See http://mirror.slitaz.org/pxe/pxelinux.cfg/default

Usage in boot/*.cfg:
        kernel ifmem.c32
        append limit1 label1 [limitn labeln]... defaultlabel

ifmem.c32 will select the label to launch:
The labelx is launch if more than limitx Kb of RAM are detected.
http://hg.slitaz.org/wok/raw-file/tip/syslinux/stuff/extra/ifmem.c

2- If you always want to run in RAM : reduce the feature set.
=============================================================

Since 2.6.30.x slitaz kernel you can merge several flavors into one iso
with 'tazlito merge' command: http://hg.slitaz.org/tazlito/rev/ba395fa660a8
http://hg.slitaz.org/tazlito/raw-file/tip/tazlito

Usage: tazlito merge size1 iso size2 rootfs2 [sizeN rootfsN]...

Merge multiple rootfs into one iso. Rootfs are like russian dolls
i.e: rootfsN is a subset of rootfsN-1
rootfs1 is found in iso, sizeN is the RAM size need to launch rootfsN.
The boot loader will select the rootfs according to the RAM size detected..

Example:
$ tazlito merge 160M slitaz-core.iso 96M rootfs-justx.gz 32M rootfs-base.gz

Will start slitaz-core with 160M+ RAM, slitaz-justX with 96M-160M RAM,
slitaz-base with 32M-96M RAM and display an error message if RAM < 32M.

The resulting iso size is similar to slitaz-core.iso. ifmem.c32 does the
selection.

The flavor core-3in1 (http://hg.slitaz.org/flavors/rev/94ad36c90e05) will
use this method.

3- If you always want the same feature set, move/compress /usr
==============================================================

To build a loram iso you need to install one slitaz-loram* package and
optionaly squashfs (or cromfs) and/or (aufs or funionfs) before running
'tazlito gen-distro':

slitaz-loram.iso               packages slitaz-loram + squashfs or cromfs
  still run in RAM /usr is compressed by squashfs or cromfs (smaller, slower)
  /usr is read-only unless you install funionfs or aufs
  increase iso size by 15%

slitaz-loram-cdrom.iso         package slitaz-loram-cdrom
  /usr is mount from the cdrom (or the usb key)
  /usr is read-only unless you install funionfs or aufs
  increase iso size by 200%

slitaz-loram-cdrom.iso         packages slitaz-loram-cdrom + squashfs or
cromfs
  /usr is compressed and mount from cdrom or usb key
  /usr is read-only unless you install funionfs or aufs
  increase iso size by 17%

slitaz-loram-http.iso          package slitaz-loram-http
  /usr is mount from a web server. See tiny labels in web boot
  http://mirror.slitaz.org/pxe/pxelinux.cfg/default

3.1 A core + a slitaz-loram-cdrom
---------------------------------

The full slitaz DVD have the two boots selected by ifmem.c32
http://mirror.slitaz.org/iso/2.0/packages-2.0.iso (1Gb)
http://mirror.slitaz.org/iso/cooking/packages-cooking.iso (2Gb)
Note: these DVD also include all packages, the wok and the Slitaz web site.

3.2 A slitaz-loram-cdrom only
-----------------------------

Initialization scripts in slitaz-loram-cdrom copy /usr from CDROM (or USB
key) to the RAM if the RAM size is large enough.
You will get a slitaz-loram (if /usr is compressed) or a core.
Since http://hg.slitaz.org/wok/rev/6509db5aa948, the extra boot parameter
'extract-loram' will uncompress in RAM /usr if the RAM size is large enough.
http://mirror.slitaz.org/packages/cooking/slitaz-loram-cdrom-1.5.tazpkg

You need to edit rootcd/boot/isolinux/*.cfg to add 'extract-loram' after
'tazlito gen-distro', and run 'tazlito gen-iso'.

You will have the three slitaz-loram-cdrom, slitaz-loram and slitaz-core
flavors for a 17% extra size. This does not use ifmem.c32.

> Thanks!
You're welcome.

-pascal


---
SliTaz GNU/Linux Mailing list - http://www.slitaz.org/


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/