Skip to content

FlossWare/cobbler

FlossWare Cobbler Kickstarts and Snippets

Welcome to the FlossWare Cobbler kickstarts and snippets project!

Build Status

Concepts

Kickstarts

All defined kickstarts are simple wrappers that call a corresponding snippet:

Supported Distributions:

Red Hat Family (Kickstart):

  • Fedora 38, 39, 40, 41, 42, 43, 44
  • RHEL 8.x, 9.x, 10.x
  • Rocky Linux 8.x, 9.x, 10.x
  • AlmaLinux 8.x, 9.x, 10.x
  • CentOS Stream 8, 9, 10

Debian Family (Preseed):

  • Debian 11 (Bullseye), 12 (Bookworm), 13 (Trixie)
  • Ubuntu 22.04 LTS (Jammy), 24.04 LTS (Noble)

BSD Family (Installscript):

  • FreeBSD 13.x, 14.x (UFS and ZFS options)

Note on Fedora CoreOS: Fedora CoreOS uses Ignition for configuration, not traditional kickstart. See the Fedora CoreOS Support section below for provisioning guidance.

Note on Atomic Host: The old Atomic Host kickstart templates (Fedora/CentOS/RHEL Atomic) have been removed as Atomic Host has been discontinued. For container-optimized systems, use Fedora CoreOS or RHEL CoreOS instead.

Snippets

Snippets represent the bulk of all work. We considered putting some templatization in the kickstarts but felt that keeping that functionality together made the most logical sense. Snippets are broken up into the categories found below. Each concept (with the exception of the Kickstart Counterparts) is contained in a directory of that name.

Kickstart Counterparts

As mentioned above, all kickstarts call a corresponding snippet. The job of these snippets is to set variables (where appropriate) and coordinate assembly of the kickstart result as a whole:

Preseed Templates

For Debian and Ubuntu installations, preseed templates are available:

Preseed files use Debian Installer (d-i) syntax and are fundamentally different from kickstart templates.

FreeBSD Installscript Templates

For FreeBSD installations, installscript templates are available:

FreeBSD installscripts use bsdinstall format and are fundamentally different from both kickstart and preseed templates.

Options

The option snippets represent an option that one may find in a kickstart file - for example autopart for automatically creating partitions.

Should an option afford parameters, simply denoting the name of the option in your ksmeta as the name with the value being what should end up in the resultant kickstart. As an example, let's assume you wish to set the language to en_US in your kickstart:

ksmeta='lang="en_US"'

This will result in the kickstart to:

lang en_US

Modules

Module snippets represent logically related snippets contained in a file (think of them like a subroutine):

Please note we are investigating using Cheetah defs, per issue #18, as a replacement for modules.

Fedora CoreOS Support

Fedora CoreOS uses Ignition for system configuration instead of traditional kickstart/Anaconda. To provision Fedora CoreOS with Cobbler:

  1. Create an Ignition configuration using Butane (formerly Fedora CoreOS Config)
  2. Serve the Ignition file via HTTP from your Cobbler server
  3. Configure Cobbler to pass the Ignition URL via kernel parameters:
cobbler system edit --name=fcos-node1 \
    --kopts="ignition.config.url=http://cobbler.example.com/ignition/node1.ign"

For more information, see the Fedora CoreOS documentation on creating Ignition configurations.

Important: Fedora CoreOS uses a fundamentally different provisioning model than traditional kickstart. The kickstart templates in this project do not apply to Fedora CoreOS.

Ubuntu/Debian Support

Ubuntu and Debian use preseed for automated installations. Preseed templates are available in the preseed directory.

Setting up Debian/Ubuntu with Cobbler

1. Import the distribution:

# Ubuntu 22.04 LTS
cobbler import --name=ubuntu2204 --path=/mnt/ubuntu-22.04-server

# Ubuntu 24.04 LTS
cobbler import --name=ubuntu2404 --path=/mnt/ubuntu-24.04-server

# Debian 12
cobbler import --name=debian12 --path=/mnt/debian-12-amd64

# Debian 13 (Trixie)
cobbler import --name=debian13 --path=/mnt/debian-13-amd64

2. Create a profile using the preseed template:

# Ubuntu profile
cobbler profile add \
    --name=ubuntu-server \
    --distro=ubuntu2204-x86_64 \
    --autoinstall=flossware_ubuntu.preseed

# Debian profile
cobbler profile add \
    --name=debian-server \
    --distro=debian12-x86_64 \
    --autoinstall=flossware_debian.preseed

3. Customize with autoinstall_meta (preseed variables):

cobbler profile edit --name=ubuntu-server \
    --autoinstall-meta="hostname=ubuntu-node1 domain=example.com timezone=America/New_York"

4. Create a system:

cobbler system add \
    --name=ubuntu-node1 \
    --profile=ubuntu-server \
    --hostname=ubuntu-node1 \
    --interface=eth0 \
    --mac=00:11:22:33:44:55 \
    --ip-address=192.168.1.100 \
    --netmask=255.255.255.0 \
    --gateway=192.168.1.1

Preseed Variables

The preseed templates support Cobbler template variables:

  • $hostname - System hostname
  • $domain - Domain name
  • $timezone - Timezone (e.g., America/New_York, UTC)
  • $http_server - Cobbler server address
  • $install_source_directory - Path to installation media
  • $default_password_crypted - Root password (crypted)

Example: Setting a custom root password:

# Generate crypted password
PASSWORD=$(mkpasswd -m sha-512 "YourPassword")

# Set in profile
cobbler profile edit --name=ubuntu-server \
    --autoinstall-meta="default_password_crypted='${PASSWORD}'"

Differences from Kickstart

Preseed templates have some important differences:

  • Syntax: Uses d-i prefix and different command structure
  • Partitioning: Uses partman instead of kickstart partition directives
  • Post-install: Uses preseed/late_command instead of %post section
  • Location: Installed to /var/lib/cobbler/autoinstall_templates/ (not /templates/)

Troubleshooting

Enable preseed debugging: Add to kernel options in Cobbler:

cobbler profile edit --name=ubuntu-server \
    --kopts="auto=true priority=critical DEBCONF_DEBUG=5"

View installation logs: During installation, press Alt+F4 to view logs, or check /var/log/installer/ after installation.

FreeBSD Support

FreeBSD uses bsdinstall with installscript format for automated installations. FreeBSD templates are available in the freebsd directory.

Setting up FreeBSD with Cobbler

1. Import the FreeBSD distribution:

# FreeBSD 13.x
cobbler import --name=freebsd13 --path=/mnt/freebsd-13-amd64 --breed=freebsd

# FreeBSD 14.x
cobbler import --name=freebsd14 --path=/mnt/freebsd-14-amd64 --breed=freebsd

2. Create a profile using the installscript template:

For UFS filesystem:

cobbler profile add \
    --name=freebsd-ufs \
    --distro=freebsd14-x86_64 \
    --autoinstall=freebsd/flossware_freebsd_ufs.installscript \
    --breed=freebsd

For ZFS filesystem (recommended):

cobbler profile add \
    --name=freebsd-zfs \
    --distro=freebsd14-x86_64 \
    --autoinstall=freebsd/flossware_freebsd_zfs.installscript \
    --breed=freebsd

3. Customize with autoinstall_meta (FreeBSD variables):

cobbler profile edit --name=freebsd-zfs \
    --autoinstall-meta="hostname=freebsd-node1 \
                        interface=em0 \
                        ip_address=192.168.1.100 \
                        netmask=255.255.255.0 \
                        gateway=192.168.1.1 \
                        name_servers=8.8.8.8 \
                        install_disk=ada0 \
                        zpool_name=zroot \
                        timezone=America/New_York"

4. Create a system:

cobbler system add \
    --name=freebsd-node1 \
    --profile=freebsd-zfs \
    --hostname=freebsd-node1 \
    --interface=em0 \
    --mac=00:11:22:33:44:55 \
    --ip-address=192.168.1.100 \
    --netmask=255.255.255.0 \
    --gateway=192.168.1.1

FreeBSD Installscript Variables

The FreeBSD templates support these Cobbler template variables:

Common Variables:

  • $hostname - System hostname
  • $interface - Network interface (default: em0)
  • $ip_address - Static IP address
  • $netmask - Network mask
  • $gateway - Default gateway
  • $name_servers - DNS servers
  • $install_disk - Target disk (default: ada0)
  • $timezone - Timezone (default: UTC)
  • $root_password_hash - Root password hash

ZFS-Specific Variables:

  • $zpool_name - ZFS pool name (default: zroot)

Example: Setting a custom root password:

# Generate password hash
PASSWORD_HASH=$(echo "YourPassword" | openssl passwd -6 -stdin)

# Set in profile
cobbler profile edit --name=freebsd-zfs \
    --autoinstall-meta="root_password_hash='${PASSWORD_HASH}'"

UFS vs ZFS

UFS (Unix File System):

  • ✅ Traditional, stable, well-tested
  • ✅ Lower memory overhead
  • ✅ Simpler for small installations
  • ❌ No snapshots, compression, or data integrity features

ZFS (Recommended):

  • ✅ Advanced features: snapshots, compression, data integrity
  • ✅ Copy-on-write filesystem
  • ✅ Built-in RAID support
  • ✅ Automatic snapshot on installation
  • ⚠️ Requires more RAM (minimum 4GB recommended)

FreeBSD Package Management

Both templates install basic packages via pkg:

  • vim, curl, wget, bash, sudo

Add more packages: Modify the installscript pkg install -y line or add a post-install script.

Differences from Kickstart/Preseed

FreeBSD installscripts have important differences:

  • Format: Shell script executed during installation
  • Partitioning: Uses gpart instead of parted/partman
  • Filesystems: UFS or ZFS instead of ext4/xfs
  • Services: rc.conf with sysrc instead of systemctl
  • Packages: pkg instead of dnf/apt
  • Location: Installed to /var/lib/cobbler/autoinstall_templates/freebsd/

Troubleshooting

Enable installation debugging:

# Boot FreeBSD installer manually
# Press '3' for shell access during installation
# Check logs in /tmp/

Common issues:

  • Disk not found: Check install_disk variable matches your hardware (ada0, da0, nvd0)
  • Network interface: Verify interface name (em0, igb0, re0) matches your hardware
  • ZFS memory: Ensure system has at least 4GB RAM for ZFS installations

View installation logs: After installation, check /var/log/flossware-install.log on the FreeBSD system.

Migration Guide

Upgrading from Atomic Host

Atomic Host (Fedora/CentOS/RHEL Atomic) has been discontinued and replaced by:

  • Fedora CoreOS: For Fedora-based container-optimized systems
  • RHEL CoreOS: For OpenShift/RHEL-based container systems (primarily for OpenShift)

If you were using the old flossware_*_atomic.ks templates:

  1. For Fedora CoreOS: Use Ignition configuration (see Fedora CoreOS Support above)
  2. For standard RHEL/Fedora workloads: Use flossware_standard.ks which now supports RHEL 8/9/10 and Fedora 38+

Service Management Changes

The kickstarts have been updated to use modern systemctl commands instead of deprecated chkconfig (removed in Fedora 38+ and not present in RHEL 10):

Old behavior (chkconfig - hardcoded, disabled NetworkManager):

# NetworkManager was always disabled
# network service was always enabled

New behavior (systemctl - configurable):

# NetworkManager is now enabled by default (modern standard)
# To use legacy network service instead:
ksmeta='useNetworkManager="false"'

Authentication Configuration

The authconfig tool has been removed in RHEL 9+ and Fedora, replaced with authselect. The kickstart now automatically detects and uses the appropriate tool:

Backward compatible usage:

ksmeta='authconfig="--enablesssd --enablesssdauth"'
# Automatically uses authselect on RHEL 9/10/Fedora or authconfig on RHEL 8

The kickstart will:

  • Check for authselect first (RHEL 9/10, Fedora 38+)
  • Fall back to authconfig if available (RHEL 8, older systems)
  • Your existing authconfig ksmeta parameters continue to work

Note: RHEL 10 only has authselect available; authconfig has been completely removed.

Modprobe Configuration

Configuration now uses /etc/modprobe.d/ directory instead of deprecated /etc/modprobe.conf:

# maxLoop configuration now creates /etc/modprobe.d/loop.conf
ksmeta='maxLoop="64"'

RHEL 10 Compatibility

RHEL 10 is now GA and fully supported. All modernizations in this project are compatible with RHEL 10:

  • systemctl: RHEL 10 uses systemd (chkconfig is not available)
  • authselect: RHEL 10 only includes authselect; authconfig has been removed
  • NetworkManager: Default network management tool in RHEL 10
  • modprobe.d: Standard configuration location
  • DNF5: RHEL 10 uses DNF5 by default (kickstart repo syntax unchanged)

The kickstart templates will work without modification on RHEL 10, Rocky Linux 10, AlmaLinux 10, and CentOS Stream 10.

Tested with: RHEL 10 GA and derivatives. No code changes required from RHEL 9 kickstarts.

Sections

Section snippets correspond to sections in kickstarts like package, pre, post and add ons. To define values on sections:

  • For the section itself, simply define a ksmeta variable whose name represents the section and whose value is what to put on the section. As an example: ksmeta='post="--errorfail"'
  • To provide a body, denote a snippet in your ksmeta variables that is named [section]_body. As an example: ksmeta='post_body="flossware/sections/post_body/standard"'

How To

Installing

Manual

Clone this git repo and:

  • copy the contents of kickstarts to /var/lib/cobbler/kickstarts.
  • create a /var/lib/cobbler/snippets/flossware directory.
  • copy the contents of snippets to /var/lib/cobbler/snippets/flossware.

DNF/Yum Install

To install via DNF/Yum, enable the FlossWare Cobbler repository from packagecloud.io:

Quick setup script:

curl -s https://packagecloud.io/install/repositories/flossware/cobbler/script.rpm.sh | sudo bash
sudo dnf install flossware-cobbler

Manual setup:

For RHEL/Rocky/AlmaLinux/CentOS:

# Create repo file
sudo tee /etc/yum.repos.d/flossware-cobbler.repo <<EOF
[flossware-cobbler]
name=FlossWare Cobbler Repository
baseurl=https://packagecloud.io/flossware/cobbler/el/\$releasever/\$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/flossware/cobbler/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOF

sudo dnf install flossware-cobbler

For Fedora:

# Create repo file
sudo tee /etc/yum.repos.d/flossware-cobbler.repo <<EOF
[flossware-cobbler]
name=FlossWare Cobbler Repository
baseurl=https://packagecloud.io/flossware/cobbler/fedora/\$releasever/\$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/flossware/cobbler/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOF

sudo dnf install flossware-cobbler

APT Install (Debian/Ubuntu)

To install via APT on Debian or Ubuntu systems:

Quick setup script:

curl -s https://packagecloud.io/install/repositories/flossware/cobbler/script.deb.sh | sudo bash
sudo apt-get install flossware-cobbler

Manual setup:

For Debian:

# Add packagecloud GPG key
curl -fsSL https://packagecloud.io/flossware/cobbler/gpgkey | gpg --dearmor | sudo tee /usr/share/keyrings/flossware-cobbler-archive-keyring.gpg > /dev/null

# Add repository
echo "deb [signed-by=/usr/share/keyrings/flossware-cobbler-archive-keyring.gpg] https://packagecloud.io/flossware/cobbler/debian/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/flossware-cobbler.list

# Install
sudo apt-get update
sudo apt-get install flossware-cobbler

For Ubuntu:

# Add packagecloud GPG key
curl -fsSL https://packagecloud.io/flossware/cobbler/gpgkey | gpg --dearmor | sudo tee /usr/share/keyrings/flossware-cobbler-archive-keyring.gpg > /dev/null

# Add repository
echo "deb [signed-by=/usr/share/keyrings/flossware-cobbler-archive-keyring.gpg] https://packagecloud.io/flossware/cobbler/ubuntu/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/flossware-cobbler.list

# Install
sudo apt-get update
sudo apt-get install flossware-cobbler

Default Use

By default, the kickstarts and snippets can be used upon deployment with no additions to ksmeta.

Default behavior:

  • Root password: cobbler (you should change this!)
  • NetworkManager: Enabled (modern default for RHEL 8/9/10/Fedora)
  • SSH: Enabled
  • Authentication: System defaults

To customize, use ksmeta variables (see examples below).

Define the Root Password

  • Using plaintext: ksmeta='rootpw="--plaintext mypassword"'
  • Using encrypted: ksmeta='rootpw="--iscrypted laskdjfaklkmcLKMCSDNKJANDF"'

Layout LVM partitions

Simply provide a space or comma separated list of the disks to use in the partition as a ksmeta variable lvmDisks. As an example assume you wish to use sda, sdc and sdd: ksmeta='lvmDisks="sda sdc sdd"'

Use Legacy Network Service

By default, NetworkManager is enabled (modern standard for RHEL 8/9/10 and Fedora 38+). To use the legacy network service instead:

ksmeta='useNetworkManager="false"'

This will enable the network service and disable NetworkManager.

Examples

For more concrete examples, please see Flossy's Cobbler Scripts for his home network.

About

Modern Cobbler templates for automated provisioning of RHEL/Fedora, Debian/Ubuntu, and FreeBSD systems with support for kickstart, preseed, and installscript formats.

Topics

Resources

License

GPL-3.0, Unknown licenses found

Licenses found

GPL-3.0
LICENSE
Unknown
LICENSE.md

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages