Red Hat Training

A Red Hat training course is available for Red Hat Satellite

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
  • Cobbler boot disk. For more information on Cobbler, see Section 4.2, “Cobbler”

Procedure 2.5. Booting from Installation Media

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

Procedure 2.6. PXE Booting

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

    If you have a DHCP server deployed on another system on the network, you will need administrative access to the DHCP server in order to edit the DHCP configuration file.
    If your machines reside on multiple networks, you will need to make certain that all of your machines can connect to the DHCP server. This can be achieved by multi-homing your DHCP server (using either a real or trunked VLAN) and configuring any routers or switches to pass the DHCP protocol across network boundaries.
    Configure your DHCP server so that it points to the PXE server by setting the next-server address for the systems you want to be managed by RHN Satellite.
    Configure your DHCP server to point to your domain and IP addresses, by including the following lines. This will allow it to use hostnames to perform the installation:
    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 you to configure 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.
If you want the kernel of the resulting system to boot 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.4.1 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. This will allow you to configure:
    • 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 you require outside networking, configure the host to create an actual bridge instead. However, xenbr0 is an actual bridge, and it is recommended that you use it 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 Red Hat Network 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