Лупайте сю скалу...

Іван Франко


 RSS | Atom

19 June 2015

TOP »

Selected projects See all »

Banalize: Bash static code analyzerDBIx::Report::ExcelShell settings, AKA dotfilesNagios Monitoring for Couchbase serverNagira: RESTful API for NagiosStartpack for Github pages developmentWeb iPhoto

Travel Blog Витрішки »

Україномовний блог Витрішки - блог про все, крім роботи. Цикл статей "Літо на півночі Японії" з цього блогу тепер опублікований у Витрішках

Computer Blog All posts »

iPhoto and files permission Is MacOSX 10.9 == MacOS 9.x? Running Chef roles from Capistrano und Capiche Github & Jekyll: Speeding up Jekyll siteGithub & Jekyll: More experience with Jekyll and setup changesBuild new hosts with Capistrano and Chef Request Tracker: More about custom CSS for RT4Ruby 2 test drive Nagira v0.2.5 release It's UNIX my dear Watson

Slides See all »

Nagira @TLUG, 2012Rspec and Guard

About

Ярило Yarylo, Jarilo me @ github me @ CPAN Dmytro (CV)

Making Debian 6.x play nicely with Cobbler

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.

Problems

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 initrd file. 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.

Process

Cobbler server

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).

Install dependencies

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 win32-loader >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.

Kernel configuration

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 ./config/amd64.cfg:

< script src="https://gist.github.com/2964138.js?file=config__amd64.cfg">

Missing udebs

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 pkg-lists/netboot/common file.

Below is list of additions to the file. Full listing of pkg-lists/netboot/common file can be found in Github gist

Pre-seeding

Automation of Cobbler installs is done by preseed file. Preseed file can resign on Cobbler server and configured by --kickstart option.

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 initrd file.

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 config/local file:

    PRESEED = preseed.cfg

Build

Now everything is ready and we can build:

    make reallyclean
    fakeroot make build_netboot

Install

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\
      )"
   )

Done.






дмитро ковальов
dmytro @ github
dmytro.sytes.net