DHCP/PXE Arch type

Hi,

I have a legacy PXE (pxelinux) server in my network wich works just fine, but now I want to add the possibility to pxe boot the EFI install for Windows 8, whilst keeping the legacy pxe environment.

Booting efi via pxe is simply done by setting another bootfile in the DHCP option, but on some DHCP servers it is possible to select the wanted boot file via dhcp option 93, arch, which is send by the client.

On RedHast (or any other distro) it is done like this:

                  if option arch = 00:06 {
                          filename "pxelinux/bootia32.efi";
                  } else if option arch = 00:07 {
                          filename "pxelinux/bootx64.efi";
                  } else {
                          filename "pxelinux/pxelinux.0";
                  }

See https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-netboot-pxe-config-efi.html for more information

Is this possible on RouterOS?

bump?

I would also know how to do this with RouterOS

to copart:

Hi,

I wonder whether it is possible with RouterOS.
Please, can you post more information, either instructions to get PXE server according Arch type on Mikrotik?
Thank you in advance.

I would also like to know if this is possible. I haven’t found a solution yet.

I have just hit the same issue and am trying to find a solution. I can only configure the DHCP server to boot either my EFI systems or my traditional systems not both at the same time

Has anyone found a work around?

Scott

Hi!
I can recollect two possible workarounds.

  1. iPXE chainloading http://ipxe.org/howto/chainloading
  2. Metarouter

This is possible since RouterOS v7.4. In addition, matching a substring is possible since 7.16 (https://help.mikrotik.com/docs/spaces/ROS/pages/24805500/DHCP#DHCP-Genericmatcher).

The example below covers a working solution for providing the different bootfiles for the netboot-assistant.

/ip pool
add name=dhcp_virtual-servers ranges=10.13.20.100-10.13.20.199

/ip dhcp-server
add address-pool=dhcp_virtual-servers bootp-support=none interface=bridge-virtualServers name=DHCP-VirtualServers

/ip dhcp-server option
add code=67 name=pxe-bios value="'d-i/n-a/pxelinux.0'"
add code=67 name=pxe-uefi value="'d-i/n-a/bootnetx64.efi'"

/ip dhcp-server option sets
add name=pxe-bios options=pxe-bios
add name=pxe-uefi options=pxe-uefi

/ip dhcp-server matcher
add address-pool=dhcp_virtual-servers code=93 matching-type=substring name=pxe-uefi-matcher option-set=pxe-uefi server=DHCP-VirtualServers value=0x0007

/ip dhcp-server network
add address=10.13.20.0/24 dhcp-option-set=pxe-bios dns-server=10.13.20.1 gateway=10.13.20.1 next-server=10.13.20.10 ntp-server=10.13.20.1

@seb13

I’m doing an equivalent setup to yours. As I understand it, the dhcp-server matcher makes sure that the uefi boot image will be served (option value). But I don’t see any matcher on bios boot image, is that implicit?

Anyway, I can confirm that the setup works, also with netboot.xyz running in docker :smiley:

I set the BIOS boot option set as default for the dhcp-server network. Thus, a dhcp matcher for BIOS boot was not required:

/ip dhcp-server network
add [...] dhcp-option-set=pxe-bios [...]

Love that the setup is working for netboot.xyz :slight_smile: