|
# Setup for installing CentOS 7 with PXE and kickstart
|
|
# Setup for installing CentOS 7 with PXE and kickstart
|
|
after a successful centos installation a kickstart file can be found in ``/root/anaconda-ks.cfg``. A kickstart file contains a set of instructions for the installer to repoduce the current (initial) installation. The file includes the following:
|
|
## What is kickstart
|
|
|
|
After a successful CentOS installation a kickstart file can be found at ``/root/anaconda-ks.cfg``. A kickstart file contains a set of instructions for the installer to repoduce the current (initial) installation. The file includes the following (and possibly more):
|
|
* the image source (disk, http, nfs)
|
|
* the image source (disk, http, nfs)
|
|
* networking info (links, static or dhcp)
|
|
* networking info (links, static or dhcp)
|
|
* partitioning (disk, raid, lvm, sizes, filesystem types, mountpoints)
|
|
* partitioning (disk, raid, lvm, sizes, filesystem types, mountpoints)
|
|
* package selections (package groups, individual packages)
|
|
* package selections (package groups, individual packages)
|
|
* services and firewall (can enable ssh and allow access through firewalld)
|
|
* services and firewall (can enable ssh and allow access through firewalld)
|
|
* custom user (post) installation scripts
|
|
* custom user (post) installation scripts
|
|
|
|
The kickstart file is machine specific with regards to networking and partitioning configuration. But it can be made quite universal, if dhcp is used for the network setup and all nodes you want to install contain the same number of disks (and a minimum amount of space on each disk).
|
|
|
|
|
|
|
|
## How do you (we) kickstart
|
|
|
|
* the node to be installed is konfigured for PXE boot (via ipmi configuration)
|
|
|
|
* a DHCP server is present in the network and provides the PXE boot information (TFTP server address and path to bootstrap kernel)
|
|
|
|
* the node loads the bootstrap kernel (syslinux) and interprets the boot config file (default filename is known to PXE)
|
|
|
|
* the config file either tells the node to boot from disk (regular boot) or to load another kernel with an initramfs and parameters (this triggers the installation)
|
|
|
|
* the kernel and initramfs were part of the CentOS 7 iso and the additional parameters specify a NFS path to a kickstart file
|
|
|
|
* the kernel fetches the kickstart file from the NFS server and starts the install process
|
|
|
|
* the packages for the installation are also available over NFS (path is specified in the kickstart file)
|
|
|
|
* the installation is fully automatic (if no problems occur) and can be monitored via ipmi sol
|
|
|
|
|
|
|
|
NOTE: to prevent an infinite installation loop you either have to disable PXE boot after the node is successfully installed or you have to edit the PXE bootstrap config file to default to boot from disk
|
|
|
|
|
|
|
|
## where are the files
|
|
|
|
* storagenode (configuration is shared with diskless node PXE boot config)
|
|
|
|
* DHCP config ``/etc/dhcp/dhcpd.conf``
|
|
|
|
* NFS exports ``/etc/exports``
|
|
|
|
* TFTP config ``/etc/xinetd.d/tftp``
|
|
|
|
* CentOS 7 image (repo) ``/tftp/centos7/unpacked``
|
|
|
|
* bootstrap kernel ``/tftp/$nodename/pxelinux.0``
|
|
|
|
* bootstrap config ``/tftp/$nodename/pxelinux.cfg/default``
|
|
|
|
* CentOS 7 kernel ``/tftp/$nodename/vmlinuz``
|
|
|
|
* CentOS 7 initramfs ``/tftp/$nodename/initrd.img``
|
|
|
|
* kickstart file ``/tftp/$nodename/kickstart.cfg``
|
|
|
|
|
|
# Guides & Ressources
|
|
# Guides & Ressources
|
|
* http://www.smtps.net/pxe-kickstart.html
|
|
* http://www.smtps.net/pxe-kickstart.html
|
... | | ... | |