DHCPd Error on CentOS 6.5

willpolley
New Contributor III

After clicking start on the netboot settings, this is what is written to the syslog.

dhcpd: /etc/dhcpd.conf line 22: expecting hexadecimal number. dhcpd: option vendor-encapsulated-options 01:01:02:08:04:01:00:02:0E:80:17:61:66: dhcpd: /etc/dhcpd.conf line 23: right brace expected. dhcpd: next-server dhcpd: ^ dhcpd: /etc/dhcpd.conf line 27: expecting a declaration dhcpd: } dhcpd: ^ dhcpd: Configuration file errors encountered -- exiting
1 ACCEPTED SOLUTION

Josh_S
Contributor III

@willpolley

I discovered the source of this issue and have a pull request to fix it in the NetSUS project. To fix it for you:

yum install vim-common -y -q

If you've changed your afp password from the default, you may need to reinstall the NetSUS. Or just replace the following file which you can get directly from the NetSUS GitHub repository.

/var/appliance/conf/dhcpd.conf

https://github.com/jamf/NetSUS/blob/master/NetBoot/var/appliance/conf/dhcpd.conf

Edit: You may need to change your afp password, again, to get everything into a consistent state.

View solution in original post

5 REPLIES 5

nessts
Valued Contributor II

Look at whatever sample conf file you started from and check very carefully for ; placement, the format is very specific.

or here is that section of mine which is commented fairly well

class "Apple-Intel-Netboot" {
        match if substring (option vendor-class-identifier, 0, 14) = "AAPLBSDPC/i386";
        option dhcp-parameter-request-list 1,3,17,43,60;
        if (option dhcp-message-type = 1) { 
                option vendor-class-identifier "AAPLBSDPC/i386";
                option vendor-encapsulated-options 08:04:01:00:B4:8E;
                log(info,"BSDP_SELECT_type1-default fell through on choices");
                filename "NB-10.9.3.nbi/i386/booter";
                next-server 192.168.199.15;
                option root-path = "nfs:192.168.199.15:/Volumes/Data1/Library/NetBoot/NetBootSP0:NB-10.9.3.nbi/NetBoot.dmg";
        }
        if (option dhcp-message-type = 8) {
                option vendor-class-identifier "AAPLBSDPC";
                if (substring(option vendor-encapsulated-options, 0, 3) = 01:01:01) {
                        log(info, "BSDP_LIST");
                        option vendor-encapsulated-options
                        01:01:01: # Start BSDP Inform/List Option 1 (01:), Length 1 (01:), Message Type List(1) (01:)
                        03:04: # BSDP option code 3 (length 04) -- Server Identifier
                        C0:A8:C7:0F: # Server IP (192.168.199.15), Dec->Hex
                        04:02: # BSDP option code 4 (length 02) -- Server Priority
                        80:00: # Priority (32768) Dec->Hex
                        07:04: # BSDP option code 7 (length 04) -- Default Image ID
                        01:00:B4:8E: #     Image ID - (46221) Dec->Hex
                        09: # BSDP option code 9 -- Boot image list
                        1C: # Length - =5*<numofimages>+<sumofallimagenames>, eg =5*2+(9+9), =10+18 =28, Dec->Hex =1C
                        01:00:B4:8C: #     Image ID - (46220) Dec->Hex
                        09:4e:42:2d:31:30:2e:38:2e:33: # ascii-hex 9:NB-10.8.3 http://www.dolcevie.com/js/converter.html
                        01:00:B4:8E: #     Image ID - (46222) Dec->Hex
                        09:4e:42:2d:31:30:2e:39:2e:33; # ascii-hex 9:NB-10.9.3
                        # when adding a new image run chcon -R -t tftpdir_rw_t /Volumes/Data1/Library/NetBoot/NetBootSP0/<NEWIMAGENAME>.nbi/
                        # have to add a new elsif clause below for new image as well
                } 
                elsif (substring(option vendor-encapsulated-options, 0, 3) = 01:01:02) {
                        log(info, "BSDP_SELECT");
                        if (substring(option vendor-encapsulated-options, 9, 4) = C0:A8:C7:0F) {
                                log(info, "BSDP_SELECT-Responding, Client is talking to us.");
                                if (substring(option vendor-encapsulated-options, 15, 4) = 01:00:B4:8C) {
                                        log(info, "BSDP_SELECT-Image: 46220:Base-10.8.3");
                                        filename "NB-10.8.3.nbi/i386/booter";
                                        next-server 192.168.199.15;
                                        option root-path = "nfs:192.168.199.15:/Volumes/Data1/Library/NetBoot/NetBootSP0:NB-10.8.3.nbi/NetBoot.dmg";
                                } 
                                elsif (substring(option vendor-encapsulated-options, 15, 4) = 01:00:B4:8E) {
                                        log(info, "BSDP_SELECT-Image: 46221:Base-10.9.3");
                                        filename "NB-10.9.3.nbi/i386/booter";
                                        next-server 192.168.199.15;
                                        option root-path = "nfs:192.168.199.15:/Volumes/Data1/Library/NetBoot/NetBootSP0:NB-10.9.3.nbi/NetBoot.dmg";
                                } 
                                elsif (substring(option vendor-encapsulated-options, 15, 4) = 01:00:00:8A) {
                                        log(info, "BSDP_SELECT-Image: DSR-NB01012012-05122012");
                                        filename "NB-10.8.3.nbi/i386/booter";
                                        option root-path = "nfs:192.168.199.15:/Volumes/Data1/Library/NetBoot/NetBootSP0:NB-10.8.3.nbi/NetBoot.dmg";
                                        next-server 192.168.199.15;
                                } 
                                else {
                                        log(info,"BSDP_SELECT-ERROR: Client responded with an image we don't have a match for! -- (Image added to list, but not in select catch?)");
                                        filename "NB-10.9.3.nbi/i386/booter";
                                        option root-path = "nfs:192.168.199.15:/Volumes/Data1/Library/NetBoot/NetBootSP0:NB-10.9.3.nbi/NetBoot.dmg";
                                        next-server 192.168.199.15;
                                }
                        } 
                        else {
                                log(info,"BSDP_SELECT-Ignoring, Client is talking to another server--We're not worthy!");
                        }
                }
        }
}

Josh_S
Contributor III

@willpolley

Is this using the NetSUS? Make sure that your NetBoot '.nbi' folder does not contain any spaces.

willpolley
New Contributor III

@nessts and @Josh_S

I haven't modified the dhcpd.conf file. The NetSUS script is the only thing that has made changes. Here's the file:

ddns-update-style none; ddns-updates off; ignore client-updates; allow booting; class "AppleNBI-i386" { match if substring (option vendor-class-identifier, 0, 14) = "AAPLBSDPC/i386"; if (option dhcp-message-type = 8) { option vendor-class-identifier "AAPLBSDPC"; if (substring (option vendor-encapsulated-options, 0, 6) = 01:01:01:02:02:01) { option dhcp-parameter-request-list 60, 43; option vendor-encapsulated-options 01:01:01:04:02:FF:FF:07:04:01:00:02:0E:08:04:01:00:02:0E:09:11:01:00:02:0E:0C:46:61:75:78:20:4E:65:74:42:6F:6F:74; } if ((substring (option vendor-encapsulated-options, 0, 6) = 01:01:02:02:02:01 and substring (option vendor-encapsulated-options, 7, 12) = 08:04:01:00:02:0E:03:04:0A:00:14:6F) or (substring (option vendor-encapsulated-options, 0, 6) = 01:01:02:02:02:01 and substring (option vendor-encapsulated-options, 7, 12) = 03:04:0A:00:14:6F:08:04:01:00:02:0E)) { option dhcp-parameter-request-list 17, 43, 60; option vendor-encapsulated-options 01:01:02:08:04:01:00:02:0E:80:17:61:66:70:3A:2F:2F:61:66:70:75:73:65:72:3A::40::2F:4E:65:74:42:6F:6F:74:81:11:4E:65:74:42:6F:6F:74:30:30:31:2F:53:68:61:64:6F:77; next-server 10.0.20.111; filename "Mavericks.nbi/i386/booter"; option root-path "http://10.0.20.111/NetBoot/NetBootSP0/Mavericks.nbi/NetInstall.dmg"; } } }

nessts
Valued Contributor II

sorry then you are going to have to probably break those gigantic long lines up into the separate pieces like mine is so you can tell what is what, and my guess is you have a special character in your NBI name or something funky that the netsus script could not deal with and made a malformed hex translation that it messing up the format.

Josh_S
Contributor III

@willpolley

I discovered the source of this issue and have a pull request to fix it in the NetSUS project. To fix it for you:

yum install vim-common -y -q

If you've changed your afp password from the default, you may need to reinstall the NetSUS. Or just replace the following file which you can get directly from the NetSUS GitHub repository.

/var/appliance/conf/dhcpd.conf

https://github.com/jamf/NetSUS/blob/master/NetBoot/var/appliance/conf/dhcpd.conf

Edit: You may need to change your afp password, again, to get everything into a consistent state.