AW: fai-diskimage variable "classes" not inherited to fai

Schulz, Reiner R.Schulz at
Thu Jul 1 11:24:37 CEST 2021

# fai-diskimage -v -N -u dvzsn-ra0317 image.raw
ERROR: No classes are defined

From /usr/sbin/fai-diskimage:

182 if [ -z "$classes" ]; then
183     die 7 "No classes are defined"
184 fi


218 LC_ALL=C fai $renew -u $hname -s $uri -c$classes install $mnt

So "-c" is needed

I hoped to use fai-diskimage like i do pxe boot.  using class/ * to define classes


> -----Ursprüngliche Nachricht-----
> Von: linux-fai [mailto:linux-fai-bounces at] Im Auftrag von Thomas
> Lange
> Gesendet: Mittwoch, 30. Juni 2021 10:32
> An: fully automatic installation for Linux <linux-fai at>
> Betreff: Re: fai-diskimage variable "classes" not inherited to fai
> >>>>> On Wed, 30 Jun 2021 08:09:43 +0000, "Schulz, Reiner" <R.Schulz at dvz-
>> said:
>     > How is "-c" concatenate to the classes from config_space/class ?
>     > We set a couple of default classes (class/49-always_set_classes) and add
> only the invidual, server specific, classes via class/50-host-classes
>     > # fai-diskimage -v -N  -cDEBIAN_10,S2APP  image.raw
> I guess the man page of fai(8) explains it better, since -c and -N
> from fai-diskimage are passed to the fai call itself.
> -N executes the scripts in the class/ subdirectory. -c just sets the
> variable $cmdlineclasses which is then used by class/01-classes. So if
> you do not have the script class/01-classes
> the classes from -c are not used. If you rename 01-classes to
> 99-classes you can change the order of the classes defined by -c.
> BTW, I never use -c and -N at the same time.
> --
> viele Grüße Thomas

More information about the linux-fai mailing list