Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[howto] ipxe on ubiquiti router with efi/bios support
2015-11-20, 18:12 (This post was last modified: 2015-11-20 18:15 by biatche.)
Post: #1
[howto] ipxe on ubiquiti router with efi/bios support
im sharing a simple howto for a simple ipxe setup that i use on my ubiquiti

on your edgeos, enter configure mode

configure mode:
Code:
set service dhcp-server global-parameters "deny bootp;"
set service dhcp-server global-parameters "include "/config/scripts/ipxe-option-space.conf";"
set service dhcp-server shared-network-name dhcp-lan subnet 10.8.8.0/24 subnet-parameters "include "/config/scripts/ipxe-green.conf";"
set service dhcp-server shared-network-name dhcp-lan authoritative enable

/config/scripts/ipxe-green.conf
Code:
allow bootp;
allow booting;
next-server 10.8.8.1;
option ipxe.no-pxedhcp 1;

if exists user-class and option user-class = "iPXE" {
    filename "http://10.8.8.11/ipxeroot/bootstrap.ipxe";
} elsif option arch = 00:07 {
    filename "ipxe.efi";
} elsif option arch = 00:00 {
    filename "undionly.kpxe";
} else {
    filename "ipxe.efi";
}
yes im aware the above logic is strange but i needed it for it to work in vmware. please adjust accordingly

/config/scripts/ipxe-option-space.conf
Code:
# Declare the iPXE/gPXE/Etherboot option space
option space ipxe;
option ipxe-encap-opts code 175 = encapsulate ipxe;

# iPXE options, can be set in DHCP response packet
option ipxe.priority         code   1 = signed integer 8;
option ipxe.keep-san         code   8 = unsigned integer 8;
option ipxe.skip-san-boot    code   9 = unsigned integer 8;
option ipxe.syslogs          code  85 = string;
option ipxe.cert             code  91 = string;
option ipxe.privkey          code  92 = string;
option ipxe.crosscert        code  93 = string;
option ipxe.no-pxedhcp       code 176 = unsigned integer 8;
option ipxe.bus-id           code 177 = string;
option ipxe.bios-drive       code 189 = unsigned integer 8;
option ipxe.username         code 190 = string;
option ipxe.password         code 191 = string;
option ipxe.reverse-username code 192 = string;
option ipxe.reverse-password code 193 = string;
option ipxe.version          code 235 = string;
option iscsi-initiator-iqn   code 203 = string;

# iPXE feature flags, set in DHCP request packet
option ipxe.pxeext    code 16 = unsigned integer 8;
option ipxe.iscsi     code 17 = unsigned integer 8;
option ipxe.aoe       code 18 = unsigned integer 8;
option ipxe.http      code 19 = unsigned integer 8;
option ipxe.https     code 20 = unsigned integer 8;
option ipxe.tftp      code 21 = unsigned integer 8;
option ipxe.ftp       code 22 = unsigned integer 8;
option ipxe.dns       code 23 = unsigned integer 8;
option ipxe.bzimage   code 24 = unsigned integer 8;
option ipxe.multiboot code 25 = unsigned integer 8;
option ipxe.slam      code 26 = unsigned integer 8;
option ipxe.srp       code 27 = unsigned integer 8;
option ipxe.nbi       code 32 = unsigned integer 8;
option ipxe.pxe       code 33 = unsigned integer 8;
option ipxe.elf       code 34 = unsigned integer 8;
option ipxe.comboot   code 35 = unsigned integer 8;
option ipxe.efi       code 36 = unsigned integer 8;
option ipxe.fcoe      code 37 = unsigned integer 8;
option ipxe.vlan      code 38 = unsigned integer 8;
option ipxe.menu      code 39 = unsigned integer 8;
option ipxe.sdi       code 40 = unsigned integer 8;
option ipxe.nfs       code 41 = unsigned integer 8;

# Other useful general options
# http://www.ietf.org/assignments/dhcpv6-parameters/dhcpv6-parameters.txt
option arch code 93 = unsigned integer 16;

if you want to have tftpd on your edge router (like mine above), sudo apt-get install tftpd-hpa and place your ipxe files in /config/user-data or whereever you prefer and edit /etc/default/tftpd-hpa accordingly.

kudos to robin and mcb30 for making this howto possible.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)