1.4.9 About Boot-Loader Configuration Files

The default file is the default boot-loader configuration file for BIOS-based PXE clients and uses pxelinux configuration settings, for example:

prompt 0
default ol6u6
timeout 0

label ol6u6
kernel vmlinuz-OL6u6
append initrd=initrd-OL6u6.img ksdevice=eth0 kssendmac ks=http://10.0.0.11/ksfiles/ol6u6_cfg.ks

To allow the boot: prompt to be displayed, change the value of prompt to 1. To display the prompt, press Shift or Alt at the console.

The default directive identifies the default boot entry by its label value, ol6u6.

Pxelinux boots the client using the default boot entry after timeout/10 seconds.

The kernel directive defines the name of the kernel executable and the append directive defines any parameters that should be appended when loading the kernel, such as the name of the ram-disk image and the location of the kickstart file.

You can use a configuration file such as the following to support a choice of installations:

prompt 0
default ol6u6
timeout 50

label ol6u6
kernel vmlinuz-OL6u6
append initrd=initrd-OL6u6.img ksdevice=eth0 kssendmac ks=http://10.0.0.11/ksfiles/ol6u6_cfg.ks

label ol7u1
kernel vmlinuz-OL7u1
append initrd=initrd-OL7u1.img ksdevice=eth0 kssendmac ks=http://10.0.0.11/ksfiles/ol7u1_cfg.ks

The efidefault file is the default boot loader configuration file for UEFI-based PXE clients and uses GRUB configuration settings, for example:

default=0
hiddenmenu
splashimage=(nd)/splash.xpm.gz
timeout=0

title Oracle Linux 6 Update 6 Installation
    root (nd)
    kernel /vmlinuz-OL6u6 ksdevice=eth0 kssendmac ks=http://10.0.0.11/ksfiles/ol6u6_cfg.ks
    initrd /initrd-OL6u6.img

The timeout=0 and hiddenmenu directives cause the default kernel to boot immediately without allowing you to press a key to display a menu or modify the configuration of a boot entry. The default kernel is defined as the first entry (0), which is the only entry listed in this file.

splashimage specifies the splash screen that hides boot messages unless you press Esc. In the example, the splash-screen file is shown as being available on (nd), which is the network device. The root directive defines that the kernel and initial ram-disk image files are also available on (nd).

The kernel directive defines the name of the kernel executable and any parameters that should be appended when loading the kernel, such as the location of the installation packages, and how to access these packages. The initrd directive specifies the initial ram-disk image file.

You can use a configuration file such as the following to support a choice of installations:

default=0
splashimage=(nd)/splash.xpm.gz
timeout=10

title Oracle Linux 6 Update 6 Installation
    root (nd)
    kernel /vmlinuz-OL6u6 ksdevice=eth0 kssendmac ks=http://10.0.0.11/ksfiles/ol6u6_cfg.ks
    initrd /initrd-OL6u6.img

title Oracle Linux 7 Update 1 Installation
    root (nd)
    kernel /vmlinuz-OL7u1 ksdevice=eth0 kssendmac ks=http://10.0.0.11/ksfiles/ol7u1_cfg.ks
    initrd /initrd-OL7u1.img

The kernel and ram-disk image file paths are assumed to be relative to the subdirectory such as efi or pxelinux that contains the boot loader. If you placed the vmlinuz and initrd.img files in a subdirectory such as efi/OL6u6 or pxelinux/OL6u6, the appropriate kernel and append lines for pxelinux would be:

kernel OL6u6/vmlinuz
append initrd=OL6u6/initrd.img ksdevice=eth0 kssendmac ks=http://10.0.0.11/ksfiles/ol6u6_cfg.ks

For GRUB, the appropriate kernel and initrd lines would be:

kernel /OL6u6/vmlinuz ksdevice=eth0 kssendmac ks=http://10.0.0.11/ksfiles/ol6u6_cfg.ks
initrd /OL6u6/initrd.img

To support different types of client, you can create a configuration file named for:

  • A client's UUID (for example, a8943708-c6f6-51b9-611e-74e6ac80b93d)

  • A client's MAC address prefixed by 01-, which represents the ARP hardware type for Ethernet, and using dashes to separate each byte value instead of colons (for example, 01-80-00-27-c6-a1-16)

  • A client's IP address expressed in hexadecimal without any leading 0x (for example, 0A0000FD represents the IP address 10.0.0.253)

The configuration files should be placed in either efi or pxelinux/pxelinux.cfg, depending on whether the client is UEFI or BIOS-based.

The boot loader looks for a configuration file in the following order until it finds a matching file name:

  • UUID (for example, a8943708-c6f6-51b9-611e-74e6ac80b93d)

  • 01-MAC_address (for example, 01-80-00-27-c6-a1-16)

  • Full 32 bits of the IP address (for example, 0A0000FD)

  • Most significant 28 bits of the IP address (for example, 0A0000F)

  • Most significant 24 bits of the IP address (for example, 0A0000)

  • Most significant 20 bits of the IP address (for example, 0A000)

  • Most significant 16 bits of the IP address (for example, 0A00)

  • Most significant 12 bits of the IP address (for example, 0A0)

  • Most significant 8 bits of the IP address (for example, 0A)

  • Most significant 4 bits of the IP address (for example, 0)

  • default (BIOS) or efidefault (EFI)

To reduce the number of configuration files that are required, you can group clients of the same type by IP address. For example, a configuration file named 0A0000E represents the IP address range 10.0.0.224 through 10.0.0.239.

If several configuration files have contents that should remain identical, you can use the ln command to link the files to a master copy, for example:

# ln master-ol6u6 0A0000FC
# ln master-ol6u6 0A0000FD
# ln master-ol7u1 0A0000FE

For more information about GRUB, enter the info grub command to access the GRUB manual.

For more information about pxelinux, see http://www.syslinux.org/wiki/index.php/PXELINUX.

For information about configuring and using kickstart to perform automated installation, see Chapter 3, Installing Oracle Linux by Using Kickstart.