Translation(s): English - Russian(Русский)


Building a Custom Debian CD Set

An Easier Alternative

One possible "alternative" to this procedure is to use Simple-CDD. If it does everything you need for your custom CD, then there is no reason (except curiosity) to go through the rest of this article.

Introduction

This page describes how to create a partial debian mirror and the steps used to create a custom debian install cd using that mirror. This document shows how to use packages gathered from a prototype system's apt cache as well as a download script that starts with a list of packages and fetches the appropriate versions. The instructions here assume i386 but should work for any architecture simply by replacing i386 in the instructions with the architecture of your choice.

An alternative to the stuff below is to use an apt sources.list and chdist to download packages and then use reprepro to update the apt repository on the CD.

Quick Overview, Using Apt, Binary Only

NOTE Using a full mirror, or a mostly full mirror is best practice. You should only use a partial mirror if you absolutely must (e.g. due to disk constraints) and realize that it is unsupported.

Create a mirror of the Debian archive for Apt

Option 1: Using debmirror

Frans Pop has created a wrapper script for this which is available from alioth. A README explains how to use it. This is the preferred approach.

Option 2: Create a partial mirror of the Debian archive

Create the actual CD set

Note that you must have a mirror of the debian archive which is usable by ?AptGet and which has the DebianInstaller binaries.


Detailed Instructions

NOTE Using a full mirror, or a mostly full mirror is best practice. You should only use a partial mirror if you absolutely must (e.g. due to disk constraints) and realize that it is unsupported.

Preferred: Use debmirror

Frans Pop has created a wrapper script for this which is available from alioth. A README explains how to use it. This is the preferred approach if you have a high bandwidth connection and 30-40 GB of hard drive space to spare.

Optional: Create a partial mirror of the Debian archive for Apt (optional)

1. Getting Your Packages, Option 1

Pro: Will automatically resolve and download dependencies
Con: Only works for packages and dependencies not already installed

Get Your Base System (Optional)

The following will get you a system with no other packages installed, which can make figuring out what packages to include in your pool directory easier. (If you use apt-get to download the packages you want on your CD you will find that the dependencies for the packages will only also be downloaded if they are not already installed. If you are using another method figure out the list of packages to download then you don't need to worry about this).

Getting Additional Packages, Option 1

Getting Additional Packages, Option 2

Optional Order

Instead of copying the network install cd first, copy your Apt cache to your desired pool directory first (as above), then use the above script to copy from the network install pool directory to your pool directory.

Notes on the use of AptMove

You will need to change apt-move.conf to point to your mirror. See AptMove for details (or man apt-move).

1. Getting Your Packages, Option 2

Pro: Works for all packages
Con: You have to figure out the dependencies yourself

1. Getting Your Packages, Option 3

Pro: Works for all packages
Con: You have to learn Germinate and download a script

2. Get DebianInstaller Binaries

Make sure you get the udebs that correspond with the version of the DebianInstaller you downloaded to/from the installer-i386 directory. Using the Germinate method above and immediately downloading installer-i386 is one method while using a stable distribution and copying the udebs from the install cd, and downloading the appropriate installer-i386 is another. There are others.

DebianInstaller, Option 1
  1. Download installer-i386 from a Debian mirror (e.g. ftp://ftp.debian.org/debian/dists/sarge/main/current)

  2. You should have the correct udebs in your tree if you have downloaded the installer-i386 from the same distribution as your network install cd, or you downloaded installer-i386 from the same distribution (and immediately before or after) downloading the

    packages (including udebs) using Germinate

DebianInstaller, Option 2

The really isn't recommended but may be necessary in some cases

  1. Build DebianInstaller (which also downloads udebs). See DebianInstaller/Build.

  2. Copy udebs to your pool directory from debian-installer/installer/build/apt.udeb, using something like the

    script at DebianCustomCD/MoveInstallerUdebs

3. Make Mirror Recognizable to Apt

Download files need by apt-ftparchive
  1. Download /debian/indices/overrides.<dists>.*.gz for your distro (e.g. for sarge, /debian/indices/overrides.sarge.*.gz) into the directory indices which is in the same root directory as your pool (mirror) directory (e.g. /debian/pool, so /debian/indices).

  2. Gunzip the overrides, keeping the compressed files.

4. Generate Package lists and Release files for your 'distribution'

Create the actual CD set

Note that you must have a mirror of the debian archive which is usable by ?AptGet and which has the DebianInstaller binaries.

Create List Of Files To Include On CD

Install and Configure debian-cd

The Remainder of the debian-cd Procedure

This assumes you have both binaries and sources. If you want binary only read the README for debian-cd.

NOTE Frans Pop has developed a relatively easy to use wrapper script for use with debian-cd that works with the current version of debian-cd. It was the mybuild.sh script previously available in available from alioth and has been included in debian-cd itself (starting with version 3.0.5). This script has been further improved and is renamed to easy-build.sh. README.easy-build file explains how to use it.

WARNING The following is very out-of-date and will not work with recent versions of debian-cd (3.0.X onwards). I hope to find time to fix it, but can't promise anything... -- SteveMcIntyre