Squeeze FAI+PXE installation

From WikiOAR

Jump to: navigation, search

This should work for a Dell server having Broadcom Netxtreme II interfaces that needs non-free firmware to boot correctly.

Contents

FAI install and dhcp config

  • apt-get install fai-quickstart
  • cp /usr/share/doc/fai-doc/examples/etc/dhcpd.conf /etc/dhcp/dhcpd.conf
  • vi /etc/dhcp/dhcpd.conf
  • /etc/init.d/isc-dhcp-server restart

Customization for squeeze (FAI installs only lenny at the moment of speaking)

  • /etc/fai/make-fai-nfsroot.conf :
set FAI_DEBOOTSTRAP="squeeze http://ftp.fr.debian.org/debian"
  • put into /etc/fai/apt/sources.list:
deb http://security.debian.org/ squeeze/updates main
deb http://ftp.fr.debian.org/debian squeeze main contrib non-free

Run fai-setup

fai-setup -v

It exits ok, but with an ERROR:

ERROR: live-initramfs was not installed inside the nfsroot.

Well, anyway, we have to make our own initrd.img, so...

Initrd customization

  • chroot /srv/fai/nfsroot/live/filesystem.dir
  • apt-get install firmware-bnx2
  • vi /etc/initramfs-tools/modules : add "bnx2"
  • rm /boot/initrd.img-2.6.32-5-amd64
  • update-initramfs -k 2.6.32-5-amd64 -c
  • exit (from the chroot)
  • cp /srv/fai/nfsroot/live/filesystem.dir/boot/initrd.img-* /srv/tftp/fai/

Still doesn't work... aufs fix!

  • chroot /srv/fai/nfsroot/live/filesystem.dir
  • Apply this patch to /usr/share/initramfs-tools/scripts/live

http://grml.org/patches/0001-workaround-aufs-issue-in-kernel-versions-around-2.6..patch

  • re-run update-initramfs -k 2.6.32-5-amd64 -c
  • exit from chroot and copy the initrd into /srv/tftp/fai/

Add /srv/fai/config to NFS exports

  • Edit /etc/exports and add missing line like this:
/srv/fai/config 152.77.100.2/28(async,ro,no_subtree_check,no_root_squash)

Start the install

  • fai-chboot -IFv killeen
  • ipmitool -H killeen-bmc power reset
  • After the install, normal boot: fai-chboot -dFv killeen

More FAI configuration

Proxy-cache during and after install

  • vi /srv/fai/nfsroot/live/filesystem.dir/etc/apt/apt.conf.d/proxy
Acquire::http::Proxy "http://www-cache.ujf-grenoble.fr:3128";
  • vi /srv/fai/config/scripts/LAST/50-misc
# add this line at the end:
fcopy -i /etc/apt.conf.d/proxy

Custom packages

  • create a class (ie CIMENT) by editing /srv/fai/config/class/50-host-classes :
   *)
       echo "FAIBASE DHCPC CIMENT" ;;
  • create a file /srv/fai/config/package_config/CIMENT
PACKAGES aptitude
firmware-bnx2
ldap-utils
libnss-ldap
libpam-ldap
vim
bind9-host
less
Personal tools