The software described in this documentation is either no longer supported or is in extended support.
Oracle recommends that you upgrade to a current supported release.

4.6.1 Adding a PXE Client to be Provisioned by Cobbler

To add a PXE client to be provisioned by Cobbler:

  1. Use the cobbler system add command to define the host name, MAC address, and IP address of the target PXE client and the profile that you want to install, for example:

    # cobbler system add --name=svr1 --hostname=svr1 --mac=08:00:27:c6:a1:16 \
      --ip=10.0.0.253 --profile=ol6u6_basic_server

    If you are provisioning a desktop client that uses an IP address from a DHCP address pool, you might use a command such as the following:

    # cobbler system add --name=devsys2 --hostname=devsys2 --profile=ol6u6_devsys --kopts="ksdevice=eth0"

    The --kopts option allows you to specify options to be added to the kernel boot line. In this example, ksdevice=eth0 specifies the network interface that kickstart should use for installation, which prevents the installation pausing to prompt you to choose which network interface to use.

  2. By default, GRUB displays a boot menu for UEFI-based clients and prompts you to choose an entry. To prevent GRUB from displaying this menu, edit /etc/cobbler/pxe/grubsystem.template and add default=0, hiddenmenu, and timeout=0 entries, for example:

    default=0
    hiddenmenu
    timeout=0
    
    title $profile_name
        root (nd)
        kernel $kernel_path $kernel_options
        initrd $initrd_path
  3. Run cobbler sync.

    # cobbler sync
    task started: YYYY-MM-DD_hhmmss_sync
    task started (id=Sync, time=date)
    ...
    generating PXE configuration files
    generating: /var/lib/tftpboot/pxelinux.cfg/01-08-00-27-c6-a1-16
    generating: /var/lib/tftpboot/grub/01-08-00-27-c6-a1-16
    rendering DHCP files
    generating /etc/dhcp/dhcpd.conf
    ...
    *** TASK COMPLETE ***

    Cobbler creates pxelinux and GRUB boot configuration files for the client in /var/lib/tftpboot/pxelinux.cfg and /var/lib/tftpboot/grub. These files are named for the client's MAC address prefixed by 01-, which represents the ARP hardware type for Ethernet, and use dashes to separate each byte value instead of colons. These client-specific files are based on /etc/cobbler/pxe/pxesystem.template and /etc/cobbler/pxe/grubsystem.template.

    Cobbler also creates generic pxelinux.cfg/default and grub/efidefault boot configuration files from /etc/cobbler/pxe/pxeprofile.template and /etc/cobbler/pxe/grubprofile.template.

    Cobbler adds an entry for the client to /etc/dhcp/dhcpd.conf, which is based on /etc/cobbler/dhcp.template:

    # group for Cobbler DHCP tag: default
    group {
        host generic1 {
            hardware ethernet 08:00:27:c6:a1:16;
            fixed-address 10.0.0.253;
            option host-name "svr1";
            if substring(vendorclass, 0, 9)="PXEClient" {
              if pxetype=00:06 or pxetype=00:07 {
                  filename "/grub/grub.efi";
              } else {
                  filename "/pxelinux.0";
              }
            }
            next-server 10.0.0.6;
        }
    }
  4. Enter the cobbler system list command to display the systems that are known to Cobbler.

    # cobbler system list
       svr1
       svr2