Differences between revisions 57 and 58
Revision 57 as of 2005-01-23 19:51:41
Size: 6620
Editor: anonymous
Comment:
Revision 58 as of 2005-01-23 19:53:22
Size: 6729
Editor: anonymous
Comment:
Deletions are marked like this. Additions are marked like this.
Line 21: Line 21:
}}}

 * You may want to use unstable instead of testing, depending on the version of d-i you are building{{{

Debian-Installer: Build yourself

HOWTO

Here are the steps to build debian-installer:

  • check out the d-i sources from subversion:

      svn co svn://svn.debian.org/d-i/trunk debian-installer
  • read debian-installer/installer/build/README
  • Install the build-dependencies on the host system

      (cdebconf, dpkg-dev, libdebconfclient0 and libdebconfclient0-dev, 
       libdebian-installer4,
       libdebian-installer-extra4 and libdebian-installer4-dev)

-> hint: run dpkg-checkbuilddeps from the debian-installer/installer/ directory.

  • Create your own sources.list.udeb.local.

      If you don't have own mirror of debian:
      deb ftp://ftp.debian.org/debian testing main/debian-installer
  • You may want to use unstable instead of testing, depending on the version of d-i you are building

  • Run "make" to get a list of available targets in the build directory.
  • Build an image using one of the build_ targets (build_netboot, all_build, etc).

      fakeroot make build_netboot
  • Look in dest/ for the completed images.
  • Look in udebs/ for the udebs associated with this d-i


Originally from http://lists.debian.org/debian-boot/2002/debian-boot-200207/msg00441.html but probably much changed since (build those libs by hand):

  • build cdebconf ( cd tools/cdebconf ; dpkg-buildpackage ) then look in .. (i.e., tools/) for the results)
  • install libcdebconf0 and libcdebconf-dev in the host system. (these were produced in the previous step) -- actually I seem to have libdebconfclient0 and libdebconfclient0-dev

  • build libdebian-installer ( cd libdebian-installer ; dpkg-buildpackage then look in .. for the results) -- build-deps don't include automake1.7, and it is needed for building from cvs versions, so install it first; build-deps don't appear to require autoconf either - it needs to be installed too. Additionally I seemed to need to uninstall automake1.4 which was getting in the way of this build on my system.

  • install libdebian-installer4, libdebian-installer-extra4 and libdebian-installer4-dev in the host system. (these were produced in the previous step)
  • build the different modules by cd-ing into them and building using dpkg-buildpackage.
  • link those new udebs into build/localudebs
  • simply to make symlinks inside build/localudebs that point at the udebs. (else it will try to download them, and the dir structure isn't set up on the mirrors (since debian-installer isn't the current installer))
  • One way: build all the udebs you're gonna build -first-...

    then do cd build/localudebs; for i in $(find ../.. -name ".udeb"); do ln -s $i; done

  • run make demo or make boot_floppy in build/

You will need sudo access or be root to do this.

This will give you a network-enabled installer, if you'd rather want a cdrom installer, run make TYPE=cdrom or TYPE=cdrom144.

NOTE that it's possible to build this under woody, but it's difficult. It might require packages from unstable during the build process. I actually got thru the build process, but haven't seen the thing work yet. I had to install libc from unstable and then my original libc again, then the libc from security.debian.org which might work in the first place. I'm going to redo the build with that lib to see if that clears up problems. If not, I'll search the open seas for a good floppy :)

-Jim Lynch


2004-11-21 DanielDickinson

Building both the udebs (from debian-installer/packages) and debian-installer from the same snapshot is not actually necessary to get a working debian-installer (see above for that). Building the udebs is probably only necessary if you are making changes to the udebs.

  • check out the d-i sources from subversion:

      svn co svn://svn.debian.org/d-i/trunk debian-installer
  • read debian-installer/installer/build/README
  • Install the build-dependencies on the host system
    • hints

      1. run dpkg-checkbuilddeps from the debian-installer/installer/ directory. (e.g. cdebconf, dpkg-dev, libdebconfclient0 and libdebconfclient0-dev, libdebian-installer4, libdebian-installer-extra4 and libdebian-installer4-dev)
      2. run dpkg-checkbuilddeps in each subdir of debian-installer/packages (except linux-kernel, arch, retriever and partman; for arch, retriever and partman you need to go deeper, and linux-kernel is a special case for which you can't just run dpkg-checkbuilddeps)
      3. build-deps don't include automak, and it is needed for building from cvs versions, so install it first; build-deps don't appear to require autoconf either - it needs to be installed too.
      4. Make you sure have automake1.7 and automake1.8 installed but not automake1.4

      5. libtool is also missing from build-deps and is require to build subversion versions.
      6. For the kernel builds you will need the same kernel package installed on the host system (e.g. i386 on 2004-11-21 requires kernel-image-2.4.27-1-386, kernel-pcmcia-modules-2.4.27-1-386, kernel-image-2.4.27-speakup, and kernel-image-2.6.8-1-386)
  • cd debian-installer and, as root, run ./scripts/buildscript 

    • hint2: If you want to use fakeroot for most of the build, use ./scripts/buildscript -r fakeroot -rr real-root-command, where real-root-command is something like sudo.

    • ./script/buildscript performs the following steps

      • build libdebian-installer ( cd libdebian-installer ; dpkg-buildpackage then look in .. for the results)
      • install libdebian-installer4, libdebian-installer-extra4 and libdebian-installer4-dev in the host system. (these were produced in the previous step)
      • build cdebconf ( cd tools/cdebconf ; dpkg-buildpackage ) then look in .. (i.e., tools/) for the results)
      • install libcdebconf0 and libcdebconf-dev in the host system. (these were produced in the previous step) -- actually <thefirstposter> seems to have libdebconfclient0 and libdebconfclient0-dev

      • change into each package subdirectory and build its udebs
      • copy udebs into debian-installer/installer/build/localudebs

      • changes to directory debian-installer/installer/build

      • issues make build_all which builds all installer images ( in debian-installer/installer/build make build_all ) hint3: If the automatic build of the actual installer fails you should try changing to debian-installer/installer/build, say "export ONLINE=n; make build_all".

The debian-installer/installer/build/dest directory should now hold the installer images. If you want to create a debian cd (set), see ["DebianCustomCD"].