pragmatism first

FAI-CD(8) - Linux manual page online | Administration and privileged commands

Make a bootable CD-ROM or USB stick that performs an FAI.

Nov 2015
fai-cd(8) System Manager's Manual fai-cd(8)


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




This command creates a bootable ISO CD-ROM image that performs the fully automatic instal‐ lation from CD-ROM without an install server. The ISO image will be written to FILE. To create the image, the command needs the NFSROOT, the 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 also be written to an USB stick using dd(1).


-A Create a boot only CD image (also usable for an USB stick) with autodiscover func‐ tion. 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 partitial mirror and the config space; however for it to automati‐ cally 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 CFDIR Use CFDIR as the configuration directory. Default is /etc/fai. You can also set the environment variable FAI_ETC_DIR. -d URL Do not include the config space in the image and set 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. 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 fai.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 grub 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 gzip. -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. -S Create a squashfs image file instead of a complete iso. The image contains the nfs‐ root and can be fetched through various ways over the network. For an example, see the section "FAI without NFS" in the FAI Guide.


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 com‐ mand: # 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


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.


fai-mirror(1) mksquashfs(1)


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


Thomas Lange <>
FAI 5 Nov 2015 fai-cd(8)
This manual Reference Other manuals
fai-cd(8) referred by fai.conf(5) | nfsroot.conf(5)
refer to dd(1) | dracut.cmdline(7) | fai-mirror(1) | fai.conf(5) | mksquashfs(1) | wodim(1)
Download raw manual
Index System Manager's Manual (+2060) FAI 5 (+3) № 8 (+5755)
Go top