|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
Trouble pxe booting a .php file with dhcpd
Hi there! I just started migrating from ubuntu 14.04 to OBSD5.5 and I ran into a problem.
On ubuntu I use isc-dhcp-server to assign ip's and allow clients to pxe boot a .php file. And I want to do the same thing on OBSD. On ubuntu 14.04 I use this config : /etc/dhcp/dhcpd.conf Code:
allow booting; allow bootp; ddns-update-style none; log-facility local7; default-lease-time -1; max-lease-time 7200; authoritative; option space gpxe; option gpxe-encap-opts code 175 = encapsulate gpxe; option gpxe.bus-id code 177 = string; subnet 192.168.1.0 netmask 255.255.255.0 { use-host-decl-names on; range 192.168.1.3 192.168.1.254; option routers 192.168.1.1; option broadcast-address 192.168.1.255; option root-path "192.168.1.2:/tftp"; next-server 192.168.1.2; option domain-name-servers 192.168.1.1; option domain-name "lab.local"; if not exists gpxe.bus-id { filename "undionly.kpxe"; } else { filename "http://192.168.1.2/boot.php"; # filename "gpxe/menu.gpxe"; # filename "gpxe/pxelinux.0"; } server-name "klonstation"; server-identifier 192.168.1.2; } On OpenBSD 5.5 I use this config: /etc/dhcpd.conf Code:
allow booting; allow bootp; #ddns-update-style none; #log-facility local7; default-lease-time -1; max-lease-time 7200; authoritative; #option space gpxe; #option gpxe-encap-opts code 175 = encapsulate gpxe; #option gpxe.bus-id code 177 = string; subnet 192.168.1.0 netmask 255.255.255.0 { use-host-decl-names on; range 192.168.1.3 192.168.1.254; option routers 192.168.1.1; option broadcast-address 192.168.1.255; option root-path "192.168.1.2:/tftp"; next-server 192.168.1.2; option domain-name-servers 83.223.5.2; option domain-name "lab.local"; filename "http://192.168.1.2/boot.php"; # filename "menu.gpxe"; # filename "pxelinux.0"; #THIS WORKS! server-name "fw"; server-identifier 192.168.1.1; } Code:
Oct 1 22:30:51 ubuntu tftpd[2659]: tftpd: trying to get file: http://192.168.1.2/boot.php Oct 1 22:30:51 ubuntu tftpd[2659]: tftpd: serving file from /tftp Oct 1 22:30:51 ubuntu tftpd[2661]: tftpd: trying to get file: http://192.168.1.2/boot.php Oct 1 22:30:51 ubuntu tftpd[2661]: tftpd: serving file from /tftp Thanks! |
|
||||
Hello and welcome!
The built-in dhcpd(8) was a 2004 fork of the ISC daemon. As noted in dhcpd.conf(5), you may use the next-server parameter to define the address of a TFTP server to obtain the filename, but it is limited to an IP address or domain name. Your require a URL, and a non-TFTP protocol. I have never used them, but there are 3rd party packages that do DHCP, and you may find the isc-dhcp package helpful. This is the ISC DHCP reference set. |
|
|||
I finally made it work! The case was I needed to boot the undionly.kpxe FIRST to be able to boot from http.
Code:
allow booting; allow bootp; #ddns-update-style none; #log-facility local7; default-lease-time -1; max-lease-time 7200; authoritative; #option space gpxe; #option gpxe-encap-opts code 175 = encapsulate gpxe; #option gpxe.bus-id code 177 = string; subnet 192.168.1.0 netmask 255.255.255.0 { use-host-decl-names on; range 192.168.1.3 192.168.1.254; option routers 192.168.1.1; option broadcast-address 192.168.1.255; option root-path "192.168.1.2:/tftp"; next-server 192.168.1.2; option domain-name-servers 192.168.1.1; option domain-name "lab.local"; option bootfile-name "undionly.kpxe"; #This line made it work #filename "undionly.kpxe"; filename "http://192.168.1.2/boot.php"; #filename "pxelinux.0"; server-name "klonstation"; server-identifier 192.168.1.1; } |
|
||||
I'm glad you got it figured out. I've never used bootfile-name, my PXE clients have all been successful using filename.
From dhcp-options(5): Code:
option bootfile-name string; This option is used to identify a bootstrap file. If supported by the client, it should have the same effect as the filename declaration. BOOTP clients are unlikely to support this option. Some DHCP clients will support it, and others actually require it. |
Tags |
pxe dhcpd boot |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DHCPd questions | mikesg | OpenBSD General | 2 | 11th October 2013 12:34 PM |
dhcpd, vista and wlan | hamba | FreeBSD Ports and Packages | 5 | 8th September 2009 04:34 PM |
dhcpd and dns | sputnik | OpenBSD General | 8 | 8th May 2009 02:50 PM |
dhcpd within ezjail? | zelut | FreeBSD General | 7 | 10th February 2009 10:31 PM |
Trouble booting if USB drive attached | map7 | FreeBSD General | 1 | 22nd December 2008 04:51 PM |