posted by Daniel de Kok on Mon 9th Jun 2003 16:56 UTC
IconLinux Live CD's are very popular these days, especially since the inception of Knoppix. Live CD's are very useful as a plug and play Linux systems for schools who want to use Linux beside their normal operating system, but Live CD's are also useful for demo-ing Linux or to try if Linux works well on some machine. Another advantage of Live CD's is that it is more difficult to break things, after rebooting the Live CD you will have a completely fresh system.

Warning: This document is based on Slackware Linux 8.1, but the instructions will probably work on Slackware Linux 9.0 without a hassle

Introduction

Those who bought an official Slackware Linux CD set already have a Slackware Live CD. However, it is often more useful to make a custom Live CD, which is tuned for some purpose. You can, for example, make a CD-ROM which contains a live system and Open Office (a full-featured office suite). In this document I will try to explain the basics of making a Live CD. This is what you will need:

  • A system that runs Slackware Linux.
  • The Slackware Installation CD-ROM (CD1 of the Slackware CD set).
  • The Slackware "Ready-To-Boot Linux Disc" (CD 2 of the Slackware CD set).
  • A CD writer and the cdrecord and mkisofs programs.
  • Sufficient disk space.

If you do only have the installation CD you have to get hold of the initrd.img file of the Live CD. The initrd.img file contains a basic system that sets up the live system using some initialization scripts.

Constructing the system

The first phase of making a Live CD is constructing the Slackware installation that initrd is going to use. From now on I will presume that you will construct the Live CD in the /root/livecd directory. The first step is making the directory structure for the Live CD:

mkdir /root/livecd
cd /root/livecd
mkdir isolinux
mkdir kernels
mkdir live

The isolinux/ directory will contain the files used to boot the system (e.g. the isolinux bootloader for booting the CD), the kernels that have to be available will be placed in the kernels/ directory, and the live/ directory will be used to hold the Linux installation of the Live CD. After creating the directory structure you can start with installing the necessary parts of Slackware on the Live CD. For this you will need the Slackware installation CD-ROM. Put the CD-ROM in your drive, mount it and go to the slackware/a/ directory on the CD. It is a good idea to install the complete "a" diskset, because it is the base of the system, besides that the "a" packages are not really big. You can install the "a" packages using the following command:

installpkg -root /root/livecd/live *.tgz

Installpkg will show a short message for each package and after installpkg is finished you have a basic Slackware system in /root/livecd/live. Now you can add all packages you need (as long as it fits on a CD) by executing "

installpkg -root /root/livecd/live
". Please be aware that many packages need extra libraries which also need to be installed. Let's look at an example. A while ago I made a special browser live CD and installed the following packages beside those in the "a" diskset:

libungif-4.1.0b1-i386-3
mozilla-1.0-i386-1
dhcpcd-1.3.22pl1-i386-3
glib-1.2.10-i386-1           
tcpip-0.17-i386-13
gtk+-1.2.10-i386-2
windowmaker-0.80.0-i386-2
xfree86-4.2.0-i386-5
xfree86-fonts-100dpi-4.2.0-i386-1
xfree86-fonts-misc-4.2.0-i386-1
xfree86-fonts-scale-4.2.0-i386-1

During the next step you will need to check some things and make some minor adjustements to the system. It is a good idea to do this by using the new system. First of all you need to make sure symbolic links for some libraries are in place by executing "ldconfig -r /root/livecd/live/". Go to the /root/livecd/live/ directory and execute "chroot .". After executing chroot the shell of the Live CD system is started and the Live CD system is the / directory. This is a good moment to check if you have all the required libraries. You can do this by executing ldd /path/to/binary and look if there are any libraries missing. Beware! This does not work for shell scripts.

If you gave installed XFree86 and want to use the kernel virtual framebuffer execute "cp /etc/X11/XF86Config-fbdev /etc/X11/XF86Config". If you want to use your own XF86Config copy it to /root/livecd/live/etc/X11/ after exiting the chroot environment. Of course, it is also possible to configure which window manager you want to use by executing the "xwmconfig" command.

When everything is set up as you like it you can exit the chroot environment by typing "exit".

Table of contents
  1. "Live Slackware, Part I"
  2. "Live Slackware, Part II"
e p (0)    8 Comment(s)

Technology White Papers

See More