Debian-Installer: Building the installer yourself

This page explains how to manually build specific images. Alternative approaches are available:

  1. The installer can be built like any other package (using for example dpkg-buildpackage or debuild) although this is probably not what you want, as doing this will generate images you won't need for testing changes, and thus takes much longer.

  2. Take advantage of the fact that udeb repositories on salsa should be configured to use branch2repo, which means that if you fork such a repository and make modifications, the CI pipeline will include a mini-ISO job, that creates a mini-ISO for you that incorporates your changes. This allows you to test that your changes before you create an MR. It is also possible to launch automated tests using openQA

First of all, debian-installer images should only be built in an environment that matches the version of the installer you want to build, so:

Note: Don't forget to mount /proc inside chroot. mkfs.vfat is failing if you are running a chroot in sid, so it is better to have a full lenny installation (you could use Virtual Box or qemu, roughly the same space as a chroot)

If you get this wrong, build errors or non-working images are almost guaranteed! It is sometimes possible to smuggle with testing and unstable, but don't expect any support from the D-I team if you do.

This same procedure can also be followed to build the installer from testing, using udebs from testing. But you should be aware that there are periods during which it is very likely that builds from testing are broken, especially: (1) the period after a new Debian stable release and before the first alpha release of D-I for the next Debian release and (2) when a new release of D-I is being prepared. Building the installer from testing is only really advisable when there is a Release Candidate (RC) release of debian-installer in testing.

/!\ If you build the installer for release purposes, make sure your build environment is "clean", i.e. that it is up-to-date and that you don't have any weird (versions of) packages installed from external repositories. If your system is not clean, use for example pbuilder or create a chroot environment.

Here are the steps to build debian-installer and download required udebs.

Get the source

See CheckOut.

Preparing the build system

Building an image

Because your build environment is for the same Debian release as the version of debian-installer you want to build, the build system should automatically generate a correct sources.list.udeb file based on your /etc/apt/sources.list. However, in some cases it may be necessary to create a sources.list.udeb.local. In some cases you have to explicitly provide main/debian-installer section in the sources.list file of your chroot or local installation.

Adding a udeb or files to the built image

The list of packages added to the netboot image is in installer/build/pkg-lists/netboot/yourarch.cfg , you can try add the desired package there.

In order to just add a few files, you can create your own udeb package:

Package: mypackage
Files: /my/file/on/my/hard/drive /where/to/put/it/in/installer
 /my/other/file /another/place/in/installer