FAI Config Space (was Re: debian 6)

Michael Goetze mgoetze at mgoetze.net
Mon Feb 7 14:11:20 CET 2011


Dear Andreas,

On 02/07/2011 01:56 PM, Andreas Schockenhoff wrote:
> First I want to have a idea about the big picture.
> - Only one config space for all Distrys?

yes, that's right.

> - How does you set the difference CLASSES? Over dhcp and hostname and
> than use 50-host-clases? The class names are LENNY SQUEEZE .... or more
> special?

Actually our installation is somewhat interactive. ;) The person doing 
the install gets a nice pxelinux menu where he can choose the distro and 
archictecture to install. This is passed on the kernel command line and 
parsed by class/10-base-classes like so:

#! /bin/bash

# Echo architecture and OS name in uppercase. Do NOT remove these two lines.
uname -s | tr '[:lower:]' '[:upper:]'
[ -x "`which dpkg`" ] && dpkg --print-installation-architecture | tr a-z A-Z

if grep HARDY32 /proc/cmdline > /dev/null
then
	echo "MH_HARDY HARDY32"
elif grep HARDY64 /proc/cmdline > /dev/null
then
	echo "MH_HARDY HARDY64"
elif grep LUCID32 /proc/cmdline > /dev/null
then
	echo "MH_LUCID LUCID32"
elif grep LUCID64 /proc/cmdline > /dev/null
then
	echo "MH_LUCID LUCID64"
elif grep SQUEEZE32 /proc/cmdline > /dev/null
then
	echo "MH_SQUEEZE SQUEEZE32"
elif grep SQUEEZE64 /proc/cmdline > /dev/null
then
	echo "MH_SQUEEZE SQUEEZE64"
else
	if [[ `dpkg --print-installation-architecture` = 'amd64' ]]
	then
		echo "MH_LENNY LENNY64"
	else
		echo "MH_LENNY LENNY32"
	fi
fi

exit 0

The classes LENNY32, LENNY64, etc. are only for getting the correct base 
image from basefiles/, for everything else I use MH_LENNY etc., which 
are basically replacements for the FAIBASE class in simple-examples.

Regards,
Michael


More information about the linux-fai mailing list