2.5. Kickstarting a Machine

2.5.1. Kickstarting from Bare Metal

When a machine has no existing operating system or has the wrong operating system installed, it is referred to as a bare metal machine. There are three ways to provision a machine from bare metal:
  • Standard operating system installation media
  • PXE boot

Procedure 2.5. Booting from Installation Media

  1. Insert installation media into the machine. The media must match the kickstart intended to use. For example, if the kickstart is configured to use the ks-rhel-i386-server-5-u2 kickstart tree, use the Red Hat Enterprise Linux 5.2 i386 installation media.
  2. At the boot prompt, activate the kickstart by giving this command:
    linux ks=http://satellite.example.com/path/to/kickstart
    
  3. Once the system boots up, download the kickstart file, and install automatically.

Procedure 2.6. PXE Booting

To perform a PXE boot, each system must support PXE booting at the BIOS level. Nearly all recent hardware should be able to do this. Additionally, a DHCP server is required, even if the systems are to be configured statically after installation.
  1. Important

    If a DHCP server is deployed on another system on the network, administrative access to the DHCP server is required in order to edit the DHCP configuration file.
    If the machines reside on multiple networks, ensure that all of the machines can connect to the DHCP server. This can be achieved by multi-homing the DHCP server (using either a real or trunked VLAN) and configuring any routers or switches to pass the DHCP protocol across network boundaries.
    Configure the DHCP server so that it points to the PXE server by setting the next-server address for the systems to be managed by RHN Satellite.
    To use hostnames when performing the installation, configure the DHCP server to point to the domain and IP addresses, by including the following lines:
    option domain-name DOMAIN_NAME;
    option domain-name-servers IP_ADDRESS1, IP_ADDRESS2;
    
  2. On the DHCP server, switch to the root user and open the /etc/dhcpd.conf file. Append a new class with options for performing PXE boot installation:
    allow booting;
    allow bootp;
    class "PXE" {
      match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
      next-server 192.168.2.1;
      filename "pxelinux.0";
    }
    
    This class will perform the following actions:
    1. Enable network booting with the bootp protocol
    2. Create a class called PXE. If a system is configured to have PXE first in its boot priority, it will identify itself as PXEClient.
    3. The DHCP server directs the system to the Cobbler server at the IP address 192.168.2.1
    4. The DHCP server refers to the boot image file at /var/lib/tftpboot/pxelinux.0
  3. Configure Xinetd. Xinetd is a daemon that manages a suite of services including TFTP, the FTP server used for transferring the boot image to a PXE client.
    Enable Xinetd using the chkconfig command:
    chkconfig xinetd on
    
    Alternatively, switch to the root user and open the /etc/xinetd.d/tftp file. Locate the disable = yes line and change it to read disable = no.
  4. Start the Xinetd service so that TFTP can start serving the pxelinux.0 boot image:
    chkconfig --level 345 xinetd on
    /sbin/service xinetd start
    
    The chkconfig command turns on the xinetd service for all user runlevels, while the /sbin/service command turns on xinetd immediately.

2.5.2. Reprovisioning

Reinstalling an existing system is referred to as reprovisioning. Reprovisioning can be done using the RHN Satellite web interface, and the system will use the same system profile that it had before it was reprovisioned. This will preserve a lot of the information and settings about the system.
Reprovisioning can be scheduled from the Provisioning tab while viewing a system. To configure additional options, go to the Advanced Configurations page, which allows the configuration of details such as kernel options, networking information, and package profile synchronization. The Kernel Options section provides access to the kernel options used during kickstart and Post Kernel Options are the kernel options that will be used after the kickstart is complete and the system is booting for the first time.

Example 2.2. Configuring Kernel Options and Post Kernel Options

This example describes the difference between kernel options and post kernel options in the reprovisioning configuration process.
To establish a VNC connection to monitor the kickstart remotely, include vnc vncpassword=PASSWORD in the Kernel Options line.
To boot the kernel of the resulting system with the noapic kernel option, add noapic to the Post Kernel Options line.

Procedure 2.7. File Preservation

The File Preservation feature can be used to keep files from being lost during a reprovisioning. This feature stores files temporarily during the kickstart and restores them after the reprovisioning is complete.

Note

File preservation lists are only available on wizard-style kickstarts, and can only be used during reprovisioning.
  1. Go to SystemsKickstartFile Preservationcreate new file preservation list and create a list of files to preserve.
  2. Go to SystemsKickstartProfiles and associate the file preservation list with a kickstart by selecting the desired profile.
  3. Go to System DetailsFile Preservation and select the file preservation list.

2.5.3. Virtualized Guest Provisioning

Virtual Guest Provisioning is supported in RHN Satellite 5.5 using the following virtualization technologies:
  • KVM Virtualized Guest
  • Xen Fully-Virtualized Guest
  • Xen Para-Virtualized Guest

Procedure 2.8. Provisioning a Virtualized Guest

  1. Check that the host system has a Virtualization or Virtualization Platform system entitlement.
  2. On the Systems page, select the appropriate virtual host, then select VirtualizationProvisioning. Select the appropriate kickstart profile and enter a guest name.
  3. To configure additional parameters such as guest memory and CPU usage, click the Advanced Configuration button. The following options can be configured:
    • Network: static or DHCP
    • Kernel options
    • Package profile synchronization: when the kickstart finishes the system will synchronize its package profile to that of another system or a stored profile
    • Memory allocation: RAM (Defaults to 512MB)
    • Virtual disk size
    • Virtual CPUs (Defaults to 1)
    • Virtual bridge: The networking bridge used for the install. Defaults to xenbr0 for Xen provisioning, and virbr0 for KVM.

      Note

      The virbr0 networking bridge will not allow outside networking. If outside networking is required, configure the host to create an actual bridge instead. However, xenbr0 is an actual bridge, and it is recommended for use if possible.
    • Virtual storage path: Path to either a file, LVM Logical Volume, directory, or block device with which to store the guest's disk information, such as /dev/sdb, /dev/LogVol00/mydisk, VolGroup00, or /var/lib/xen/images/myDisk.
  4. Click Schedule Kickstart and Finish .

2.5.4. Provisioning Through an RHN Proxy

Provisioning can also be achieved using an RHN Proxy that has been installed and registered to RHN Satellite.
  1. When provisioning a virtual guest or doing a reprovisioning of a system, select the desired proxy from the Select Satellite Proxy drop down box.
  2. For a bare metal installation, replace the RHN Satellite's fully qualified domain name (FQDN) with that of the proxy's FQDN. For example, if the URL to the kickstart file is:
    http://satellite.example.com/ks/cfg/org/1/label/myprofile
    
    Then to kickstart through the proxy, use:
    http://proxy.example.com/ks/cfg/org/1/label/myprofile