FAI @ grml

Install packages

aptitude install fai-server fai-doc

Adjust FAI server

Adjust configuration:

/etc/fai/fai.conf              -> adjust FAI_CONFIGDIR
/etc/fai/make-fai-nfsroot.conf -> adjust NFSROOT and FAI_DEBOOTSTRAP
/etc/fai/apt/sources.list      -> adjust mirrors

mkdir -p /grml/fai/config
cp -a /usr/share/doc/fai-doc/examples/simple/* /grml/fai/config/

Invoke fai dirinstall:

mount -o remount,suid,dev,rw /dev/shm
fai -v -cFAIBASE -u grml dirinstall /dev/shm/fai
chroot /dev/shm/fai bash

Adjust for GRML

Package selection example:

cd /grml/fai/config/package_config
cat > GRML << EOF
PACKAGES aptitude

vim-full
EOF

Adjust stuff like TIMEZONE=Europe/Vienna, ROOTPW='x',… for GRML-class:

cd /grml/fai/config/class
cp FAIBASE.var GRML.var
vim GRML.var

Execute scripts during fai dir-install:

cd /grml/fai/config/scripts/
mkdir GRML
cat > 10-helloworld << EOF
#!/bin/sh
echo Hello World
EOF
chmod 755 10-helloworld

Don't forget to invoke fai with GRML class:

fai -v -cFAIBASE,GRML -u grml dirinstall /dev/shm/fai

Check log files of GRML:

root@grml ~log/fai/dirinstall/grml # l
total 204
-rw-r--r-- 1 root root   235 2007-08-26 11:20 cfagent.log
-rw-r--r-- 1 root root  1255 2007-08-26 11:19 debconf.log
-rw-r--r-- 1 root root 40393 2007-08-26 11:19 debconf.new
-rw-r--r-- 1 root root 40393 2007-08-26 11:19 debconf.old
-rw-r--r-- 1 root root 54444 2007-08-26 11:20 fai.log
-rw-r--r-- 1 root root    33 2007-08-26 11:20 fcopy.log
-rw-r--r-- 1 root root   971 2007-08-26 11:20 shell.log
-rw-r--r-- 1 root root 36375 2007-08-26 11:20 software.log
-rw-r--r-- 1 root root   156 2007-08-26 11:20 status.log
-rw-r--r-- 1 root root  4390 2007-08-26 11:17 variables.log

Tips

mkdebmirror: create local Debian mirror

Important variables for scripts:

$ROOTCMD => execute command inside target chroot
$target  => points to target chroot

Important commands for scripts:

fcopy    => copy files to target chroot
ainsl    => append if no such line (in file)

Adjust 'PACKAGES $COMMAND', check possible values via:

install_packages -H

Create tarball for basic chroot:

mkdir /dev/shm/deboot
debootstrap etch /dev/shm/deboot http://ftp.de.debian.org/debian
cd /dev/shm/deboot && tar zcf base.tgz ./

grep NFS /etc/fai/make-fai-nfsroot.conf
NFSROOT=/grml/fai/nfsroot

mkdir -p /grml/fai/nfsroot/live/filesystem.dir/var/tmp
mv /dev/shm/deboot/base.tgz /grml/fai/nfsroot/live/filesystem.dir/var/tmp/

Now you should see

Extracting /grml/fai/nfsroot/live/filesystem.dir/var/tmp/base.tgz

when invoking:

fai -v -cFAIBASE,GRML -u grml dirinstall /dev/shm/fai

Build NFS-root (uses NFSROOT from /etc/fai/make-fai-nfsroot.conf) and bootable CD-ISO:

make-fai-nfsroot -v
mkdir /grml/tmp_mirror
fai-mirror -c DEFAULT,I386,FAIBASE,GRML -v /grml/tmp_mirror
fai-cd -m /grml/tmp_mirror /grml/fai.iso
 
fai.txt · Last modified: 2011/10/13 21:55 (external edit)
 
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Grml homepage Driven by DokuWiki