Jump to content

LiveCD

From ourproject.org wiki

HowTo Create A LiveCD

Cómo crear un LiveCD

Building a LiveCD based on Mandrakelinux 10.1 Official

Creando un LiveCD basado en Mandrakelinux 10.1 Official

This step by step [[HowTo]] describes how you can master a LiveCD from an installed system. You should be familiar with: doing basic works on command line, setup additional software sources on a Mandrake system, using 'urpmi' to install and remove software.

Este paso a paso detalla cómo puedes crear un LiveCD desde un sistema instaldo. Debes estar familiarizado con: realizar tareas básicas desde la línea de comandos, instalar software adicional en un sistema Mandrake utilizando la herramienta urpmi para instalar y desinstalar software.

0. Mastering a LiveCD requires a minimum of 256 MB RAM and in addition a swap partition. 250 MB should be enough if you create a small LiveCD ( ~ 300 MB ), go for 2 GB if you are planning a bigger system.

0. La creación de un LiveCD requiere un mínimo de 256 MB de RAM además de una partición swap. 250 MB deberían ser suficientes si quieres crear un LiveCD pequeño (aproximadamente 300 MB). Si estás pensando en un sistema más grande, necesitarás 2 GB.

1. Install a clean Mandrakelinux 10.1 Official on one / partition. Don't forget the swap partition. Install the available official updates. Don't install nvidia or ati drivers.

1. Instala Mandrakelinux 10.1 Official en una partition raíz (/). No olvides crear la partición swap. Instala las actualizaciones oficiales disponibles. No instales los drivers de nvidia ó ati.


2. Keep your system simple, and: keep it small. Start with a used space of 800 - 900 MB, this is a full featured KDE system. 'df' is the command to control the used space on your harddrive. Take your time to uninstall (Mandrake Control Center) all unneeded software. A default Mandrake installation includes a lot of stuff that you can safely get rid off. And if urpmi complains about dependencies and wants to uninstall too much, you may want to experiment with: rpm -e --nodeps. That will erase single packages.
 Configure the 'look and feel' of your graphical environment. The LiveCD will look the same.
 Make sure that /etc, /home, /lib, /root, /var is not too big. Otherwise you'll be running out of RAM when starting the LiveCD. Examples: Don't put many (already compressed) video or music files into your home directory. Don't have two kernel versions (/lib) installed. Clean or uninstall your urpmi databases in /var/lib/urpmi.


2. Mantén el sistema simple y pequeño. Comienza con 800 - 900 MB, ésto es un sistema kde completamente funcional. 'df' es el comando para controlar el espacio usado en tu disco duro. Tómate tu tiempo para desinstalar (Mandrake Control Center) todo el software innecesario. Una instalación normal de Mandrake incluye muchas cosas que pueden ser eliminadas. Si debido al cumplimiento de las dependencias urpmi quiere desinstalar demasido, puedes experimentar con: rpm -e --nodeps. Esto borra paquetes por separado.

Configura el 'look and feel' de tu ambiente gráfico. El LiveCD se verá igual a éste.
Asegurate de que /etc, /home, /lib, /root, /var no son demasiado grandes. De otra manera no te alcanzará la memoria RAM cuando arranques el LiveCD. Ejemplos: No pongas muchos archivos de video ó musica dentro de tu directorio home. No tengas instaladas dos versiones del kernel. Elimina ó desinstala tus bases de datos urpmi en /var/lib/urpmi.

3. Add 'contrib' and 'main' to your urpmi software sources. Install the 'kernel 2.6.7 tmb' from 'contrib' on your system. (MCC) The default kernel 2.6.8 won't work on a LiveCD! Reboot with your new kernel, make sure you are running it: uname -r. Uninstall the default 2.6.8 kernel, again reboot.

3. Agrega 'contrib' y 'main' a tus fuentes de soft de urpmi. Instala el 'kernel 2.6.7 tmb' de 'contrib' en tu sistema. (MCC) El kernel 2.6.8 no funciona en un LiveCD! Reinicia con tu nuevo kernel, asegurate de que lo estás corriendo: uname -r. Desinstala el kernel 2.6.8, reinicia nuevamente.


4. The next step is to install the mklivecd scripts that will build your .iso file. I've made an archive which contains: a working mklivecd.rpm (from cvs, 01.01.2005), the file install_any.pm and this [[HowTo]]. Download the archive here: livecd_101.tar.gz
 Unpack the archive to your home directory and install the rpm, using the urpmi command. This will take care of all dependencies and will download and install more stuff. You did setup your urpmi sources (contrib, main), hey?
 As root copy the file install_any.pm to /usr/lib/libDraKX


4. El próximo paso es instalar los scripts de mklivecd, ésto creará tu imagen .iso. Hay un archivo que contiene: un mklivecd.rpm funcionando (en cvs, 01.01.2005), el archivo install_any.pm y éste HowTo. Descarga el archivo aquí: livecd_101.tar.gz

Desempaqueta el archivo en tu directorio home e instala el rpm, usando el comando urpmi. Esto se encargará de todas las dependencias y descargará e instalará más cosas. Haz configurado tus urpmi sources (contrib, main)?
Como root copia el archivo install_any.pm a /usr/lib/libDraKX

If you want to include an installer into your LiveCD you also need the package livecd-utils.rpm. Get it here

Si quieres incluir un instalador en tu LiveCD necesitarás además el paquete livecd-utils.rpm. Consiguelo aquí


5. Clickup a console. Get root. Run: mklivecd --help
 The command to build your iso is as simple/enhanced as you want.
 Examples:
 # mklivecd myown.iso
 # mklivecd --verbose --resolution 800x600 --fstab=rw,auto --splash=no --keyboard=fr rainbow.iso
 The script takes care of compressing the files and building a bootable image, and will cleanup after it is done.
 Burn your iso. Have fun.


5. Abre una consola. Como root tipea: mklivecd --help

El comando para crear tu iso es tan simple/avanzado como tu quieras.
Ejemplos:
# mklivecd mipropio.iso
# mklivecd --verbose --resolution 800x600 --fstab=rw,auto --splash=no --keyboard=fr rainbow.iso
El script se encarga de comprimir los archivos y crear una imagen booteable, y limpiará todo después de hacerlo.
Graba/Quema tu iso. Que te diviertas.

6. If you are running into problems, please read the archives of the livecd-users mailinglist at berlios.de, or even better, join the list.

6. Si estás teniendo problemas, por favor lee los archivos de la lista de correo livecd-users en berilio.de, o mejor, suscríbete a la lista.

7. Some notes on Kernel problems with Mandrake 10.1 OE. To build a LiveCD with the mklivecd scripts the kernel has to be patched with squashfs. The default Mandrake 10.1 kernel (2.6.8.1) has the wrong, not working patch! And the 2.6.8 kernel has broken append options! You can use the 2.6.7 tmb kernel from contrib. It's working fine. If you want a newer kernel version (2.6.9 or 2.6.10), you need to patch and compile your own kernel. More info on the users-list or on the irc channel #pclinuxos (efnet), where you can talk to the developers of the mklivecd scripts.

7. Algunas notas sobre problemas con el Kernel de Mandrake 10.1 OE. Para crear un LiveCD con los scripts de mklivecd el kernel debe ser parcheado con squashfs. El kernel 2.6.8.1 de Mandrake 10.1 tiene el parche incorrecto y no funciona! Y el kernel 2.6.8 tiene rotas las opciones de append! Puedes usar el kernel 2.6.7 tmb de contrib. Este funciona bien. Si quieres una versión más nueva de kernel (2.6.9 o 2.6.10), necesitarás parchear y compilar tu propio kernel. Más info en la lista de correo ó en el canal irc #pclinuxos (efnet), dónde puedes conversar con los desarrolladores de los scripts de mklivecd.

8. When building your iso, you can specify a standard keyboard layout. Default is the US keyboard. Later on your LiveCD you can use a cheatcode (keyb=fr) to alter the layout. If you want an easy way to change the keyboard while running the LiveCD, you need to edit the file '/usr/lib/libDrakX/Xconfig/xfree.pm ', before building your iso. Lines 25 and 71, change the resp. 'keyboard' to 'kbd', that will load the correct keyboard driver.

8. Cuando crees tu iso, puedes especificar una distribución estándard de teclado. El teclado por omisión es el US. Luego en tu LiveCD puedes usar el código que corresponda (keyb=es) para cambiar la distribución del mismo. Si quieres una forma sencilla de cambiar el teclado mientras corre el LiveCD, necesitarás editar el archivo '/usr/lib/libDrakX/Xconfig/xfree.pm ', antes de crear tu iso. Lineas 25 y 71, cambia la línea 'keyboard' a 'kbd', ésto cargará el driver correcto del teclado. _

Building a LiveCD with Mandrakelinux 10.0 OE

Creando un LiveCD con Mandrakelinux 10.0 OE

Step 1
  • Install Mandrakelinux 10.0 Official on one / partition, 3 - 5 GB, that depends on your needs. Make sure you have enough RAM and/or SWAP. Example: I am building a ~300 MB iso off a 700 MB big installed system, got 256 MB RAM and a big SWAP partition (but 250 MB SWAP might be enough). Make sure you have the syslinux rpm installed: # urpmi syslinux
Extract the file install_any.pm.gz from your first mdk install cd (/Mandrake/mdkinst/usr/bin/perl-install) to /usr/lib/libDrakX
Step 2
  • Make your system as small as possible. You iso is limited to 700 MB, your system should not extend 1,8 GB. Better start with a pretty small installation.
Step 3
  • Add contrib (for 10.0) to your urpmi sources.
Step 4
  • Install the kernel-tmb-2.6.7-2.tmb.6mdk-1-1mdk.i586.rpm on your system. You can find the rpm on the *contrib 10.1* ftp mirrors.
Step 5
  • Install the latest stable mklivecd scripts for 10.0, the version is 0.5.8-1mdk, get them here .
The mklivecd rpm contains the scripts for building your livecd, the livecd-utils rpm is only needed if you want to implement a harddisk installation in your LiveCD. Use urpmi to install the rpms, it will take care of the dependencies, you have added contrib to your urpmi sources, don't you? And you might need CD 4, if you don't have it, just add also the /main ftp tree to your sources!
Step 6
Clickup a console. Get root. Run: mklivecd --help
The command to build your iso is as simple/enhanced as you want.
Examples:
# mklivecd myown.iso
# mklivecd --verbose --kernel 2.6.7-2.tmb.6mdk --resolution 800x600 --fstab=rw,auto --splash=no --keyboard=fr --usbhome rain.iso
The script takes care of compressing the files and building a bootable image, and will cleanup after it is done.


Step 7
Burn your iso. Have fun. - Problems? Read the mailing list.


Paso 7

Graba tu iso. Diviértete. -Problemas? Lee la lista de correos.

Mandrakelinux 9.2.: Make your own Linux Live CD

Mandrakelinux 9.2.: Crea tu propio Linux Live CD

Step 1
Install a 'basic' Mandrake 9.2 - on a separate partition. Choose individual package selection, concentrate on one Desktop Environment, KDE or Gnome or a light one. Or install as the only OS on your PC, does not matter. You will need 'one' ~5 GB partition. And a swap partition, you can use your already existing swap. 250 MB is the minimum swap, it's ok, when you plan to create a small Live CD. More swap will speed up the creation process. Your RAM is also important, minimum 256 MB! Create one user with a password, and root of course. If you have a multi-boot box, tell the installer to write lilo to /, not to the mbr. Modify your lilo in your main install to call lilo in your new partition. Or do what you use to do in this case.
Step 2
Boot your fresh MDK. Run immediately menudrake, choose 'menustyle' - second choice: Mandrake Menu. Save it. Now you won't get the menu bug and you don't have to install all the updates.
Get the following rpm's from a Mandrake 9.2 ftp/contrib mirror:
- kernel-tmb-2.4.22.21.tmb.1mdk-1-1mdk.i586.rpm
- busybox-1.00-0.4mdk.i586.rpm
- cloop-utils-1.02-1mdk.i586.rpm
Get the latest stable version of mklivecd- scripts (mklivecd-0.5.7-0.cvs.20031118.1mdk.noarch.rpm) here: developer.berlios.de Install the kernel on the new partition, using the softwaremanagement tool. Uninstall the old kernel. Reboot and make sure everything is ok. Install the rpms busybox, cloop and mklivecd on your new partition.
Step 3
- Remove all stuff using the Mandrake Control Center, that you don't need. Hints: python, gimp etc. Don't remove the gnome-libs, mdk config tools need them. Check in a terminal how big your used space is:
# df
Hint: clean /usr/share/doc and /usr/share/man and /usr/share/wallpapers (~200 MB)
- Install additional stuff from contrib and plf etc.
- You iso should have a maximum of 700 MB to fit on a cd. Your used space should be < 1,7 GB. The compression rate is ~ 41 %
Step 4
Make your desktop look nice. Configure everything - your live cd will look and behave almost exactly like your installed system. Don't forget to clean your browser cache, the cookies, your trash can, stuff in your home directory. Once again: # df
Step 5
Open a terminal, su to root :
# mklivecd --help
Here you'll find all options to run the script. Most simple is:
# mklivecd name.iso (where 'name' is your choice)
This will create an iso file in your current directory. This is what I am using:
# mklivecd --verbose --keyboard=pt --fstab=rw,auto --splash=no livecd.iso
Explanation:
--verbose
You can see in your console window, how the sript is working. Very nice!
--keyboard=de_nodeadkeys
Default is the US layout, so this is your keyboard for the LiveCD.
--fstab=rw,auto
Default creates the script a fstab without mounting the partitions on the hd. This option creates a fstab with read-write mounted partitions, Windows and Linux partitions, exception is NTFS (you have to mount it manually to an already set mount point)
--splash=no
This will create a live cd without the Mandrake bootsplash and the background while booting. I've set it this way to get rid of it. When you have your own bootsplash theme, and you want to use it, dont set this option. Default is with bootsplash.
livecd.iso
This is the name of the iso file, that the script creates. Your choice.
There are many options you can use like: writing the iso to a different partition, excluding directories and files from the creation, using a different /tmp dir for the whole process. One of the most interesting is: you can install the script to your *main* OS and not into the new partition, so you would build the iso from 'outside'. Then you need to tell the script where it can find the 'root' directory of the system which will get compressed, for example:
--root /mnt/spiel
The mountpoint of course must exist, and the partition has to be mounted before running your script.
How long does it take: on a Pentium 4, 2 Ghz with 256 MB RAM and a swap of 250 MB it took 7 minutes to create a 230 MB iso from a used space of ~600 MB.


Step 6
Burn the iso to a cd-rw or a cd-r. Or copy it to a different partition where you have your burning application.


Paso 6

Graba la iso en un CD grabable o regrabable. O copia la imágen iso en una partición diferente de donde tengas tu aplicación de grabado de CDs


Step 7
Boot your cd.


Paso 7

Bootea desde tu CD.


Step 8: Add a grahical installer to your Live CD
You need to learn:
 - how to work with CVS versions
 - how to work with sources and build them
 - to figure out which additional software und which kernel is required to use this version
 You will find the information usually in the archives of the mailing lists.