Prerequisites: To get the most from this article, understand these concepts and terms before reading: basic Core Utilities, configuration files, INSERT YOUR PREREQUISITES HERE

Discussion

1. LH Scripts

Introduction

The lh_* scripts are helpers that do the work of making a debian-live image. Each helper script is given simple and specific task. This method of operation helps keep the debian-live system modular and configurable.

Overview

The live-helper build process involves calling two scripts, lh_config and lh_build. The job of lh_config is to make sure that the configuration files exist for the other lh_scripts to source. The next script to be called is the lh_build script. This script is responsible for calling all of the lh_* scripts that are responsible for creating and building a debian-live image.

2. lh_config

Introduction

Text for subsection A here...

subsection B

Text for subsection B here...

3. lh_build

Introduction

The lh_build script is a wrapper around four other helper scripts, which are themselves, wrappers around other helper scripts. These four scripts represent general steps in creating a debian-live image. These steps are bootstrap, chroot, binary, and source. The last step, source, is optional and isn't required to create a debian-live image.

3.1. lh_bootstrap

lh_bootstrap

The lh_bootstrap script is responsible for generating a very minimal system in the chroot directory. There are two scripts that are called by lh_bootstrap, lh_bootstrap_debootstrap and lh_bootstrap_cdebootstrap. Only one of these scripts is actually executed, and it creates the stage file .stage/bootstrap .

3.2. lh_chroot

lh_chroot

The lh_chroot script is a wrapper that calls a large amount of lh_chroot_* helper scripts.

3.2.1. lh_chroot_proc

The lh_chroot_proc script mounts or unmounts the proc filesystem in chroot/proc .

3.2.2. lh_chroot_sysfs

The lh_chroot_sysfs script mounts or unmounts the sysfs filesystem in chroot/sys .

3.2.3. lh_chroot_hosts

The lh_chroot_hosts script copies the hosts file from /etc/hosts to the chroot directory.

3.2.4. lh_chroot_resolv

The lh_chroot_resolv script copies the /etc/resolv.conf file to the chroot directory.

3.2.5. lh_chroot_sources

3.3. lh_binary

lh_binary

The lh_binary script is a wrapper around a large amount of lh_binary_* helper scripts. It also calls some of the lh_chroot_* scripts before and after the lh_binary_* scripts are called.

3.3.1. lh_binary_chroot

The lh_binary_chroot helper creates a copy of the chroot directory and moves it to chroot/chroot . Successful execution of this script creates the stage file .stage/binary_chroot .

3.3.2. lh_chroot_*

These lh_chroot_* scripts that are called at the beginning of the lh_binary step are to help prepare the chroot for generating the binary image. All of these scripts are given the argument "install" .

3.3.3. lh_binary_rootfs

The lh_binary_rootfs script is responsible for creating the root filesystem for the binary image. It makes the image from the directory chroot/chroot . This script requires the stage files .stage/bootstrap and .stage/binary_chroot . This script creates the stage file .stage/binary_rootfs

3.3.4. lh_binary_manifest

The lh_binary_manifest script creates files containing lists of the packages installed in the chroot directory.

3.3.5. lh_binary_encryption

The lh_binary_encryption script will encrypt the rootfs image created by the lh_binary_rootfs script, provided that the rootfs sits on a loopback filesystem.

3.3.6. lh_binary_linux-image

The lh_binary_linux-image script copies the kernel and initrd images into the binary directory.

3.3.7. lh_binary_debian-installer

The lh_binary_debian-installer script installs the debian-installer into the binary directory. This script seems to be incomplete, currently.

3.3.8. lh_binary_memtest

The lh_binary_memtest script will install either the memtest86 or memtest86+ package into the binary as a boot option.

3.3.9. lh_binary_grub

The lh_binary_grub script installs the grub bootloader into the binary directory.

3.3.10. lh_binary_syslinux

The lh_binary_syslinux script installs the syslinux bootloader into the binary directory.

3.3.11. lh_binary_yaboot

The lh_binary_yaboot script installs the yaboot bootloader into the binary directory.

3.3.12. lh_binary_includes

The lh_binary_includes script installs files from an "includes" directory into the binary directory. This script is only does something if the debian-installer option is enabled.

3.3.13. lh_binary_local-includes

The lh_binary_local-includes script installs files from the config/binary_local-includes directory to the binary directory.

3.3.14. lh_binary_md5sum

The lh_binary_md5sum script generates a md5sums.txt file of all files underneath the binary directory.

3.3.15. lh_binary_hdd

The lh_binary_hdd is the last step in creating a binary image. This script will build a binary image for a hard disk.

3.3.16. lh_binary_iso

The lh_binary_iso is the last step in creating a binary image. This script will create an iso image for making live cdroms.

3.3.17. lh_binary_net

The lh_binary_net is the last step in creating a binary image. This script will create a gzipped tar file to be used over a network.

3.3.18. lh_binary_usb-hdd

The lh_binary_usb-hdd is the last step in creating a binary image. This script will create an image ready to be dd'ed to a usb flash card.

3.3.19. lh_chroot_*

These lh_chroot_* scripts that are called at the end of the lh_binary step are to help ...(finish me)

3.4. lh_source

lh_source

Text for subsection B here...

4. Debian Live

DebianLive

DebianLive/HelperTree (last edited 2009-03-16 03:31:17 by localhost)