Kernel panic - FAI 4.1.1

Toomas Tamm tt-fai at kky.ttu.ee
Tue May 13 16:38:42 CEST 2014


On Tue, 2014-05-13 at 14:23 +0100, Rui Teixeira wrote:
> in fact a stupid error... I feel stupid... But even with that class
> defined I don't get it, in NSFROOT I've defined that I want
> linux-image-486, why I have to told FAI that I want it again in
> packages_config/DEBIAN ? And more, I cant define linux-image-486 in
> NSFROOT and in packages_config/DEBIAN define another one... So, what's
> the point to define it in NSFROOT?

I think you are confusing the nfs root and the system being installed.
Don't worry, you are not alone. After eight years of using FAI and
hundreds of installs, I still sometimes make the same kind of
error... :-)

I shall try to explain this in some detail.

The so-called nfsroot is a small but fully capable instance of Debian,
which gets booted when you perform a FAI installation, and once the
installation is over, it is not run on the same host again, until the
next install (or perhaps a sysinfo or softupdate run, but that's another
story).

The nfsroot usually resides on an installation server (aka FAI server)
and is exported via NFS, and mounted by the kernel on the computer being
installed. In such setup, the kernel is usually delivered via TFTP,
although I have successfully used CDs and flash sticks to boot the
kernel, and then mount the nfsroot via NFS.

Alternatively, the nfsroot can be put on a CD of flash stick, together
with a kernel and a package archive, to perform an installation without
use of a network connection. This is called a "FAI CD" and you appear to
be pursuing that route.

The nfsroot is (re)created when you issue the "fai-make-nfsroot"
command, which may be also part of "fai-setup" or "fai-cd" scripts (not
sure of the latter). The packages which go into this system are listed
in the file called "NFSROOT", and that includes the kernel which will be
running during the installation. This is not necessarily the same kernel
that you wish to run on the system after it is installed, although in
many cases they will be the same.

Once the kernel has booted and mounted the nfsroot over NFS or from the
CD or flash stick, it executes a series of scripts which make up the FAI
proper. These scripts install the system on the hard disk(s) of the
computer they are running on. The computer is usually called the
"target" and its root directory is, in fact, mounted as "/target" during
the install.

The lists of packages that you put into package_config in the
configuration space are now inspected, and the packages corresponding to
the classes you specify for the particular host get installed
into /target and its subdirectories. These are entirely separate lists
from the packages that make up the nfsroot - no package is copied from
nfsroot to the target system directly (although there is a nuance here -
see below). In particular, you need to specify a kernel here, and it may
be a different kernel than the one which was installed into the nfsroot,
as long as it is able to boot (and meets your needs) on the target
system.

The nuance I skipped over earlier is that a minimal set of packages (the
so-called essential packages) are not installed from the
corresponding .deb's, but are unpacked from a tar-file directly
into /target instead. This speeds up the installation, and also makes it
possible to do complicated things like cross-distribution and
cross-architecture installations. Ignoring the latter, the tar-file is
usually called base.tar.xz (or .gz) and is built together with the
nfsroot, and resides in /var/tmp of the nfsroot.

When building base.tar.xz, the fai-make-nfsroot script makes use of the
packages and other content which are being installed into the nfsroot,
so there, indeed, the content of nfsroot influences what is eventually
ending up on the target system. However, the creation of the base file
occurs very early during fai-make-nfsroot, before the packages you list
in the NFSROOT file get installed into it. Thus no kernel or other
packages specific to your system end up in the base file. These still
need to be listed separately in various files under package_config.

I hope this clarifies things a little, and remains in the list archive
for future reference of others as well.

Regards,

Toomas Tamm

 




More information about the linux-fai mailing list