Cobbler works OK when client system is RedHat-based — RHEL or CentOS — but support for other OS’s is less than perfect. Recently I had to configure Debian (currently at
6.0.5) to be built by Cobbler, and here is a HOWTO for making it work.
There are several issues when making Debian to be able to be installed by Cobbler.
- First of all current (6.0.5) Debian netboot installer is broken. It fails with “No disks found” message, reason being that no IDE, SCSI or SATA udebs are included with netboot installer. This has been reported but not fixed yet. The only way to fix this issue seems to be rebuild the installer from scratch.
- Additionally I wanted to avoid any questions asked by installer—make it fully unattended. This requires some addition to Debian’s netboot
initrdfile. Otherwise even if you provide seed file it keeps stopping and asks you about keyboard layout and network configuration. Reason is—these questions have to be asked before network is up and seed file from network can be loaded.
On your Cobbler server first of all import Debian as usual:
cobbler import --breed=debian --name=Debian6.0.5 --path=...
Build server for the Installer
Build your Debian installer build server. Setup system using instruction at Debian Installer page
This involves installing dependencies, checking out Debian Installer and installing dependencies again (in some cases).
Use Debian Installer Checkout page for the reference.
Installing installer basically performed with following commands:
svn co svn://svn.debian.org/svn/d-i/trunk debian-installer cd debian-installer scripts/git-setup mr -p checkout
Check dependencies are satisfied
apt-get build-dep debian-installer dpkg-checkbuilddeps
In my case lat command complained about missing
>0.7.2. This is package from
Wheeze (7.0) but Squeeze has only
0.6x. I had to download
deb file from Wheezy mirror and install it manually:
wget http://ftp.yz.yamagata-u.ac.jp/debian/pool/main/w/win32-loader/win32-loader_0.7.4.3_all.deb dpkg --install win32-loader_0.7.4.3_all.deb
Add/change configuration files
All configuration files reside below
debian-installer/installer/build directory. All paths below refer to sub-directories starting from this point.
First is kernel, installer image must have same kernel version as build host, since kernel and modules are copied from build host to installer image. Make sure this is set correctly in
./config/<arch>.cfg. In my case, I am building 64-bit installer, therefore architecture config file is
Next part is where actually broken installer fixed, here we will add missing drivers.
Netboot package lists are configured by files in
pkg-lists/netboot directory. To make the change work for all architectures the easiest is to change
Below is list of additions to the file. Full listing of
pkg-lists/netboot/common file can be found in Github gist
Automation of Cobbler installs is done by preseed file. Preseed file can resign on Cobbler server and configured by
However when using netboot installer there are some configuration options that need to be set before kickstart is downloaded from Cobbler: console keyboard, language during installation etc. For this reason they need to be in
There are several ways to do this. If you are using pre-built installer, you can add
preseed.cfg file to it. Simple shell script can help with this.
But, since we need to make initrd ourselves anyway, it is easier to add preseed to the image during build process. Create
preseed.cfg file with following content:
and add this line to
PRESEED = preseed.cfg
Now everything is ready and we can build:
make reallyclean fakeroot make build_netboot
Copy all sub-directory
dest/netboot/debian-installer/amd64 to Cobbler’s
/var/www/cobbler/ks_mirror/Debian6.0.5/install/debian-installer/amd64 and sync:
( cd dest/netboot/debian-installer/amd64 && \ tar cf - . | ssh root@cobbler \ "(cd /var/www/cobbler/ks_mirror/Debian6.0.5/install/debian-installer/amd64 && \ rm -rf * && tar xf - && cobbler sync\ )" )