Debian-Installer: General Overview on the GTK frontend
Note: Development of the graphical debian-installer (g-i) takes place mainly for i386, so instructions and examples below may need to be adapted for other architectures.
This page explains how to create a g-i miniiso, that is a miniiso image which contains the GTK frontend and all the related stuff: since this image is very small (10/15MB) and quick to build, it is an ideal playground to experiment with.
Daily images including the GTK frontend are part of the regular ISO build process from a year or so. For i386 and AMD64 the following types of images are supported: CD images, hd-media, gtk-miniiso. For powerpc currently only the gtk-miniiso image is available.
During the build process most fonts are taken from tarballs that are downloaded from alioth (and not, as is normal for d-i, extracted from udebs).
The latest images built this way are available from the Debian Installer project page.
Manual build of the images
Manual builds can be done by following the instructions below.
checkout the build system:
$ mkdir -p gtk-miniiso $ cd gtk-miniiso $ svn checkout svn://svn.debian.org/svn/d-i/trunk/installer
the above command will checkout the Lenny installer, if you want to checkout the Etch installer, you'll need to do a $ svn checkout svn://svn.debian.org/svn/d-i/branches/d-i/etch/installer
run dpkg-checkbuilddeps from the installer directory and make sure you have the dependencies installed
build the image (from the build directory):
$ fakeroot make build_netboot-gtk
Note that if you have made changes in the localudebs directory, it is advisable to run 'fakeroot make reallyclean' before rebuilding.
The result of the build is a "miniiso", an minimalist image of about 15-20MB (depending on architecture).
Font magic in daily builds
Most fonts are not yet available as udebs (see also DebianInstaller/GUIToDo. In order to be able to create an image with support for most languages, we had to create a hack. The solution was to put fonts in tarballs and download and unpack those when building images.
The location from which the font tarballs are loaded is set in the variable GTK-TARBALL-SOURCE in build/config/<arch>/gtk-miniiso.cfg.
This means it is fairly easy to play around with fonts. You just need to set up a webserver1, put the fonts you want work with in one or more *.tgz files on that server and change GTK-TARBALL-SOURCE to point to the directory containing the tarball(s).
If you would like to exclude the ttf-freefont fonts, you will need to comment out the relevant line in build/pkg-lists/gtk-miniiso/common.
To change font configuration files in /etc, you will need to modify and rebuild the udeb rootskel-gtk.
Note that how fonts behave can depend on what other fonts are present.
Building cdebconf (or the single gtk.so) against the fresh new libs
gtk.so is part of the cdebconf package (cdebconf-gtk-udeb in particular), archived in the SVN repository of the installer. To rebuild cdebconf against directfb rather than X ("yourpath" is the absolute path containing the various libraries):
svn co svn://svn.debian.org/svn/d-i/trunk/packages/cdebconf
cd cdebconf
export LD_LIBRARY_PATH=yourpath/d-i_build/lib
export PKG_CONFIG_PATH=${LD_LIBRARY_PATH}/pkgconfig
fakeroot dpkg-buildpackageIn case you wanted to recompile only gtk.so rather than the various udebs:
svn co svn://svn.debian.org/svn/d-i/trunk/packages/cdebconf cd cdebconf sh ./configure cd src/modules/frontend/gtk export LD_LI
Debugging the graphical installer
Here are collected some techniques that may help in debugging the graphical installer.
Testing the installer from local directory
When you build a g-i ISO, everything you find inside the ISO comes of course from a directory of your hard disk: here is explained how to setup a chroot environment with details specific to the case of the debian-installer.
Assuming you've just built an ISO with the automating ISO building process described above, let's cd to build/tmp/gtk-miniiso/tree : the contents of this directory are what gets packed later inside the initrd during the ISO building process. Now, as root and from inside build/tmp/gtk-miniiso/tree , do the following
#chrooting inside the directory that initrd.gz was generated from chroot ./ sh #creating all device files needed to access the framebuffer cd /dev mknod fb0 c 29 0 mknod tty c 5 0 mknod tty0 c 4 0 mknod tty8 c 4 8 #starting the debian-installer debconf-loadtemplate d-i /var/lib/dpkg/info/*.templates export DEBIAN_FRONTEND=gtk debconf -f gtk -o d-i /usr/bin/main-menu
This should start the graphical installer from the chroot'ed directory: now you can attach gdb to cdebconf, use tools like ltrace or strace easily. Please note that you need your real system to have been booted with framebuffer mode active (you should have passed something like video=vesa vga=788 to your kernel at boot time).
Testing the installer from an iso image
We noticed that, especially on PowerPC, sometimes the graphical interface crashes and restarts without rest over and over, blocking the user from accessing other terminals inorder to analyze error logs.
The suggested woraround is booting the installer in textual mode by entering the following line at boot prompt
install DEBIAN_FRONTEND=newt
At the end of the boot process the classical textual, blue interface will show up: you can now switch to VT2 and modify the /etc/directfbrc DirectFrameBuffer configuration file (it's like xorg.conf for the X11 server)
nano /etc/directfbrc
Then , type
export DEBIAN_FRONTEND=gtk debian-installer
The GTK frontend will start, but this time you'll be able to read error messages on VT1 which usually provide useful informations about the crash
E.g. using boa as a lightweight server on your desktop. (1)
