This document discusses preseeding FreeBSD installations using a Fully Automatic Installer (FAI). It describes extending the bsdinstall script to allow device preparation, installation, and configuration to be automated. Key parameters that can be configured include partitions, ZFS settings, package mirrors, and post-install configuration like hostname, users, and network configuration. The FAI allows unattended FreeBSD installations from a network boot using PXE or iPXE without requiring an NFS server. A demo is provided of a local mirror with DHCP and TFTP servers to netboot multiple clients for automated installation via the FAI.
3. AGENDA
● Introduction
● bsdinstall script extention
● FAI - Fully Automatic Installer
as a distro
● Netbooting FAI
● Universal FAI
● DEMO
3
4. INTRO
● Google Summer of Code 2014 project
● provide a non interactive, unattended
FreeBSD installation process from the
network
● without NFS server
● extension for scripted bsdinstall
● booting the FAI (Fully Automatic
Installer) from the network by PXE
● based on mfsBSD
● simple usage, without high barrier to
entry
4
5. bsdinstall script extention
● more parameters
● division installation into 3 parts:
DEVICE PREPARATION
INSTALLATION
CONFIGURATION
5
10. FAI from mfsBSD
● mfsBSD on github:
(https://github.com/mmatuska/mfsbsd)
● my SVN repo:
https://svnweb.freebsd.
org/socsvn/soc2014/kczekirda/pxe-fai-
head/tools/mfsbsd/
● customs:
mfsbsd/conf/rc.local.sample
/var in tmps
● create directory:
mfsbsd/customfiles/etc/
● put configuration file into:
mfsbsd/customfiles/etc/installerconfig
● make iso BASE=..../10.1-RELEASE/
10
12. ● dhcp server
● tftp server
● http server
NETBOOTING FAI
CLIENT
DHCP REQUEST
RESPONSE WITH TFTP INFO
SERVE EXECUTABLE
TFTP REQUEST
SERVE ISO and iPXE scripts
HTTP REQUEST
12
13. EXECUTABLE
● PXELINUX
LABEL mfsBSD-fai
kernel memdisk
append initrd=/mfsBSD-FAI.iso iso raw
● iPXE
kernel memdisk iso raw
initrd http://example.com/mfsBSD-FAI.iso
boot
● iPXE without MEMDISK
sanboot --drive 0x81 --no-describe
http://example.com/mfsBSD-FAI.iso
13
14. iPXE
● iPXE:
http://ipxe.org
● iPXE features:
boot from www server via HTTP and HTTPS
boot from iSCSI
boot from wireless network!
control with a script
vlan tagging
14
15. DHCP SERVER
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.20;
option routers 192.168.1.1;
next-server 192.168.1.1;
if exists user-class and ( option user-class = "iPXE" ) {
filename "http://example.com/mfsbsdfai.ipxe";
}
else {
filename "undionly.kpxe";
}
}
15
17. UNIVERSAL FAI
● one image for different configurations
● how to tell FAI where the configuration
file is?
● add option bootfile-name
"http://example.com/mfsbsdfai/";
● FAI tries to download file called the
same as the MAC address, or default
17