Best practice to compile new FAI-Kernel?

Terry Gliedt tpg at umich.edu
Mon Sep 12 22:02:30 CEST 2005


Juraj Holtak wrote:
> 
> is it a good idea to grab kernel config from a present FAI kernel and
> just apply it to a kernel of higher version?
> 
> I need more actual kernels because I`m trying to setup some fancy
> maschines with sata drives and unsupported NICs.
> 
> Are there any gotchas doing it so?
> 
> Is somebody interessted in an unofficial FAI-kernel debian repository
> and a FAI script exchange website? I`m playing with the idea to setup
> something like this.

I just went through this, so here's what I discovered.

I guess in theory you can take any 2.4 or 2.6 kernel source from 
kernel.org, but my experience was that I wasn't smart enough to actually 
make that work. The following, however, will absolutely work. The 
precise details might vary with your environment, but this should be 
very close to a "vanilla" setup. Good luck


* Get the Debian kernel source (e.g. /usr/src/kernel-source-2.4.27)
   I always make a symlink like this:
     ln -s /usr/src/kernel-source-2.4.27 /usr/src/linux

* Get the config file from FAI. I did:

   dpkg -x /data/tpg/libfai/kernel/kernel-image-2.4.27-fai_1_i386.deb  \ 

        /tmp/crap
   Copy the config file from /tmp/crap/boot to /usr/src/linux/.config

* Make the kernel as a Debian package
     cd /usr/src/linux
     make menuconfig
     make-kpkg clean
     make-kpkg --rootcmd fakeroot --append-to-version -fai \
         --revision 2 kernel-image

* This results in a Debian FAI kernel package in /usr/src
   Copy this to /usr/lib/fai/kernel
     cp -p /usr/src/kernel-image-2.4.27-fai_2_i386.deb \
       /usr/lib/fai/kernel

* Configure FAI to use this new kernel by setting this in
   /etc/fai/make-fai-nfsroot.conf
     KERNELPACKAGE=/usr/lib/fai/kernel/kernel-image-2.4.27-fai_2_i386.deb

* Create a new FAI boot image
     make-fai-nfsroot -K

* Create a new FAI bootfloppy or CD or whatever you use to boot. E.g.
     /usr/sbin/make-fai-bootfloppy -v \
       nfsroot=192.168.1.2:/usr/lib/fai/nfsroot \
       FAI_FLAGS=verbose,createvt vga=1

-- 
=============================================================
Terry Gliedt     tpg at umich.edu       http://www.hps.com/~tpg/
Biostatistics, Univ of Michigan  Personal Email:  tpg at hps.com



More information about the linux-fai mailing list