Provided by: fai-server_6.0ubuntu1_all bug

NAME

       fai-cd - make a bootable CD-ROM or USB stick that performs an FAI

SYNOPSIS

       fai-cd [OPTION] -m MIRROR ISOFILE
       fai-cd [OPTION] -B FILE
       fai-cd [OPTION] -d URL
       fai-cd [OPTION] -S IMAGEFILE

DESCRIPTION

       This  command  creates  a  bootable  ISO  CD-ROM  image  that performs the fully automatic
       installation from the CD-ROM without an install server. The ISO image will be  written  to
       FILE.  To  create  the  image  the  command requires the NFSROOT, configuration space, and
       optionally a partial mirror (which is created by fai-mirror). The ISO image will contain a
       compressed  squashfs filesystem. This hybrid CD image can be written to an USB stick using
       dd(1).

       NOTE: By default, fai-cd uses the grub file from /etc/fai/grub.cfg, which is designed  for
       demo  purposes.   This  grub menu passes the "menu" flag to the FAI_FLAGS parameter, which
       causes a menu with various installation and boot options to be displayed on each boot.  To
       avoid this, you must specify your own grub file using the -g flag, as described below.

OPTIONS

       -A     Create  a  boot  only  CD  image  (also  usable for an USB stick) with autodiscover
              functionality. The CD will scan the subnet for a FAI server. By default it shows  a
              menu  with all profiles available from which you can select a type of installation.
              This image only needs 25MB.  You can add the -J option to make the image smaller.

       -B     Create a boot only ISO image which does a network installation. It does not include
              the  nfsroot,  the  partial  mirror  and  the  config  space;  however  for  it  to
              automatically initiate the installation -d has to be  set.  By  default  CONFIG_SRC
              will be empty.

       -b     After creating the ISO image burn it by calling wodim(1) (a version of cdrecord).

       -c DIRECTORY
              Override the value of FAI_CONFIGDIR set in nfsroot.conf.

       -C DIRECTORY
              Use  DIRECTORY  as the configuration directory instead of the default /etc/fai. You
              can also set the environment variable FAI_ETC_DIR.

       -d URL Do not include the config space in the image.  Instead  set  the  variable  to  the
              location  of  the config space to URL. This sets FAI_CONFIG_SRC in the grub config,
              which is obtained from the FAI configuration dir (see -C). Set it to "" to not  set
              FAI_CONFIG_SRC at all. If not set, the config space is taken from FAI_CONFIGDIR and
              copied to /var/lib/fai/config in the image. Currently no  file:  is  allowed  here,
              instead set FAI_CONFIGDIR in nfsroot.conf(5).

       -e     Exclude  the  directory /var/tmp from the nfsroot. You may put the file base.tar.xz
              in the configuration space into the subdirectory basefiles. This option  will  save
              about  50MB  of  disk space. This option will exclude the directory even when -H is
              given.

       -f     Force removal of an existing ISO image before creating a new one.

       -g FILE
              Use FILE as the grub.cfg file. The script will look for FILE in CFDIR. If  FILE  is
              located  in another directory then a full path must be specified. If not specified,
              use /etc/fai/grub.cfg.

       -h     Show simple help and version.

       -H     Do not hide directories. Using this option will consume about 45MB more disk  space
              on  your  media. By default, some directories like man pages and locales are hidden
              and will not be put onto the CD or the USB stick.

       -J     Use xz compression when calling mksquashfs. Default is zstd, which is much faster..

       -M     Do not add the package mirror to the CD. Packages that would be  fetched  from  the
              mirror  are  obtained  from the normal sources configured elsewhere, usually remote
              repositories.

       -m DIRECTORY
              Use DIRECTORY as partial FAI mirror. This option is mandatory, unless you use -M or
              -B.

       -n DIRECTORY
              Override the value of NFSROOT set in nfsroot.conf.

       -s blocks
              Add  additional  disk  space  to  the image. Increases the size by the number of 1M
              blocks specified.

       -S     Create a squashfs image file instead of a complete  iso.  The  image  contains  the
              nfsroot  and  can be fetched through various ways over the network. For an example,
              see the section "FAI without NFS" in the FAI Guide.

       -V     Set the volume id of the ISO. Default id  is  FAI_CD.  You  also  must  adjust  the
              CDLABEL in /etc/fai/grub.cfg, or use -g and specify your own grub.cfg.

EXAMPLES

       After you've created a mirror with fai-mirror in /media/mirror, you can create a CD using:

          # fai-cd -m /media/mirror fai-cd.iso

       If  you  want  to  create a bootable USB stick (here /dev/sdf) , write the CD image to the
       stick via dd(1).

          # dd if=fai-cd.iso of=/dev/sdf bs=1M

       It is possible to install over the network without using NFS, i.e. by getting the  nfsroot
       via  an  http  request.  To  do so you have to create a squashfs image using the following
       command:

          # fai-cd -S squashfs.img

       In addition to that you can create said image without a config space and without a mirror.
       This is useful for when you want to avoid creating a new image after modifying your config
       space or updating your mirror:

          # fai-cd -d "" -SMeJ squashfs.img

       To fetch the image via http, use the following kernel command line option:

          root=live:http://your_server_or_IP/path/to/squashfs.img

       Create the autodiscover boot image:

          # fai-cd -JAg /etc/fai/grub.cfg.autodiscover fai-autod.iso

       Create a minimalistic compressed network boot  ISO  image  (~350MB)  without  the  partial
       mirror and basefiles:

          # fai-cd -BMJe fai-cd.iso

       This  ISO  image  can  even  be  further  reduced  in  size using the -s flag to fai-make-
       nfsroot(8).

       Specify your own grub file:

          # fai-cd -g  /srv/fai/config/my_extras/grub.cfg  -m  /srv/fai/mirror  /srv/fai/iso/fai-
       cd.iso

NOTES

       Additional  kernel command line options can be found in the man page of dracut.cmdline(7).
       fai-cd needs enough disk space in TMPDIR (/tmp by default)  for  creating  the  compressed
       filesystem. You may want to set it to another directories, before calling fai-cd.

SEE ALSO

       fai-mirror(1)

       mksquashfs(1)

       fai-make-nfsroot(8)

FILES

       /etc/fai/fai.conf
              The FAI configuration file.
       /etc/fai/grub.cfg
              The default grub2 menu configuration file for fai-cd.

AUTHOR

       Thomas Lange <lange@cs.uni-koeln.de>