0

Is it possible to configure dhcpd.conf such that a specific host group would use an additional kernel boot parameter passed on to the kernel loading?

Thanks!

Pavel
  • 1,038
  • 1
  • 11
  • 30

1 Answers1

2

It is not DHCP who can do this, but PXE.

An example (not necessarily useful for you) dhcpd.conf file:


allow booting;
allow bootp;
authoritative;
default-lease-time      600;
max-lease-time          7200;
option domain-name      "domain.com";
ddns-update-style       none;
log-facility            local7;
deny unknown-clients;
subnet 192.168.124.0 netmask 255.255.255.0 {
  option routers               192.168.124.1;
  option subnet-mask           255.255.255.0;
  option domain-name-servers   199.245.70.156;
  filename                     "pxelinux.0";
  next-server                  192.168.124.81;
    host foo {
      hardware ethernet        f4:xx:46:xx:xx:67;
      fixed-address            192.168.124.25;
      option host-name         "foo";
    }
}

I have used a rule to match a specific MAC address, modify to match a group as needed. The next-server and filename parameter tell the host requesting an IP (and matching the requirements) to boot using the pxelinux.0 file, that can be found in 192.168.124.81.

The TFTP server at that IP address will typically have a default configuration in the lines of:


default menu.c32
prompt 0

menu title PXE Boot Menu
menu include pxelinux.cfg/graphics.conf
menu autoboot Starting Local System in # seconds

label rhel6
  menu label Install - ^RHEL6 64
  kernel rhel/6/x86_64/vmlinuz
  initrd rhel/6/x86_64/initrd.img
  append ks=http://10.0.0.2/rhel6/ks/rhel6.cfg ksdevice=eth0

You can use the append parameter here to add any valid custom value to the kernel.

dawud
  • 15,096
  • 3
  • 42
  • 61