Making a Client CD-ROM

Apparently, BBLCD is no longer supported.

Using Linux Live

The following steps are all performed on the client partition.
  1. Download the latest linux-live-x.y.z.tar.gz and precompiled kernel from ftp://ftp.slax.org/Linux-Live/ (you may, of course, prefer to compile your own kernel to Linux Live specifications).
  2. Untar the linux-live tarball into /tmp.
  3. If you downloaded the precompiled kernel, move it to /boot, and make sure that you can boot your client partition using this kernel (you may need to run mkinitrd to create an initial ramdisk).
  4. cd /tmp/linux-live-x.y.z
  5. Modify the tools/liblinuxlive script, deleting all the users options for mount (the ed command g/,users/s///g will do the trick).
  6. Edit the cd-root/boot/isolinux/isolinux.cfg file, adding noauto to the APPEND line.
  7. Edit the .config file, setting LIVECDNAME="contest", USENTFS3G=no and KERNEL=a.b.c, where a.b.c is the version number of the kernel being used.
  8. Clean up log files and configuration files that will need to be rebuilt when the CD boots:
  9. Run ./build (defaults are okay).
  10. cd /tmp/live_data_nnnn/contest (where nnnn is a four-digit number chosen by the build script, which creates the directory).
  11. Run ./make_iso.sh to create the CD-ROM image, /tmp/contest.iso.
  12. Burn the image to a CD-ROM:
    cdrecord -v fs=8m dev=/dev/cdwriter -data /tmp/contest.iso

Using BBLCD [Obsolete]

[Note: As of this writing, bblcd does not support devfs, so it cannot be used to create a bootable CD-ROM for a distribution that relies on devfs (e.g., Gentoo).]

The CD-ROM image can be created on any machine with a CD writer; it does not have to be the same machine on which the original client partition was made.

  1. Create the contest directories:
    mkdir /usr/local/contest /usr/local/contest/image
    cd /usr/local/contest
    [You may, of course, place your contest directories anywhere you like.]
  2. Untar the bblcd distribution:
    tar xvfj bblcd-version.tar.bz2 
    This creates a directory named bblcd-version. The version used for the following steps was 0.7.10.
  3. Copy the client image files into the contest/image directory. One way is to create a tarball, contest.tar.gz, from the image, copy it to the /tmp directory of the CD writer machine, and untar it into the image directory:
    cd /usr/local/contest/image
    rm -fr *     # if needed
    tar xvfz /tmp/contest.tar.gz 
  4. If the kernel for the CD uses udev, create in /dev the minimal devices necessary to boot the CD:
    (cd /dev; tar cf - hda hdc tty0 tty1 ram0 ram1 null) \
         | (cd /usr/local/contest/image/dev; tar xvf -)
  5. Remove excess files from the image to save space: and zero out any remaining files under var/log:
    for i in `find var/log -type f`
    do
        > $i
    done
  6. cd /usr/local/contest/bblcd-version
  7. Configure bblcd to create a 2.88MB boot image:
    make -C bootdsk floppy-288
  8. Set the fstab to be used on the bootable CD. Edit the file mkisofs.input/etc/fstab:
  9. Configure bblcd:
    make config
    Option     Value
    [1] Path to root of master distribution: /usr/local/contest/image
    [2] Path to kernel: /usr/local/contest/image/boot/vmlinuz-2.6.8-1.521
    [3] Path to modules source directory: /usr/local/contest/image/lib/modules/2.6.8-1.521custom
    [4] List of modules: kernel/drivers/block/loop.ko
    [A] [4] Make /etc writable: yes
    [Note: Values for options [2], [3] and [4] are given as for a Fedora Core 2 image; adjust accordingly.]
  10. Prepare the image to run from a CD-ROM:
    make prep
    Just go through items 1-6 in order.

    Item [2] can be skipped (home directories will be NFS-mounted from the server).

    For item [5] a varfiles.cfg file containing just the line "include ." will suffice (all excess files have already been removed).

    For item [6], just follow the directions and add the line

    test -e /sbin/boot.bblcd && source /sbin/boot.bblcd
    to the initial boot script, just after /proc is mounted.
  11. Create the CD image (bblcd.iso):
    make iso
  12. Burn the image to a CD-ROM:
    cdrecord -v fs=8m dev=/dev/cdwriter -data ./bblcd.iso
[Note: Steps 1-2, of course, need be done only once.]