diff --git a/app/views/unattended/provisioning_templates/iPXE/windows_default_ipxe.erb b/app/views/unattended/provisioning_templates/iPXE/windows_default_ipxe.erb index 5268d03a907..f14de11bd63 100644 --- a/app/views/unattended/provisioning_templates/iPXE/windows_default_ipxe.erb +++ b/app/views/unattended/provisioning_templates/iPXE/windows_default_ipxe.erb @@ -19,8 +19,16 @@ ping --count 1 ${netX/dns} || echo Ping to DNS failed or ping command not availa set boot-url tftp://<%= foreman_request_addr %>/ kernel ${boot-url}<%= @host.operatingsystem.bootfile(medium_provider,:kernel) %> +iseq ${platform} efi && goto win_efi || goto win_legacy + +:win_efi +initrd -n peSetup.cmd <%= foreman_url('script') %> peSetup.cmd +goto boot + +:win_legacy initrd <%= foreman_url('script') %> peSetup.cmd +:boot initrd ${boot-url}<%= @host.operatingsystem.bootfile(medium_provider,:bcd) %> BCD initrd ${boot-url}<%= @host.operatingsystem.bootfile(medium_provider,:bootsdi) %> boot.sdi initrd ${boot-url}<%= @host.operatingsystem.bootfile(medium_provider,:bootwim) %> boot.wim diff --git a/app/views/unattended/provisioning_templates/iPXE/windows_default_ipxe_httpboot.erb b/app/views/unattended/provisioning_templates/iPXE/windows_default_ipxe_httpboot.erb index 8e9bbba3632..0be17ad4357 100644 --- a/app/views/unattended/provisioning_templates/iPXE/windows_default_ipxe_httpboot.erb +++ b/app/views/unattended/provisioning_templates/iPXE/windows_default_ipxe_httpboot.erb @@ -14,8 +14,16 @@ description: | set boot-url http://<%= foreman_request_addr %>/httpboot/ kernel ${boot-url}<%= @host.operatingsystem.bootfile(medium_provider,:kernel) %> +iseq ${platform} efi && goto win_efi || goto win_legacy + +:win_efi +initrd -n peSetup.cmd <%= foreman_url('script') %> peSetup.cmd +goto boot + +:win_legacy initrd <%= foreman_url('script') %> peSetup.cmd +:boot initrd ${boot-url}<%= @host.operatingsystem.bootfile(medium_provider,:bcd) %> BCD initrd ${boot-url}<%= @host.operatingsystem.bootfile(medium_provider,:bootsdi) %> boot.sdi initrd ${boot-url}<%= @host.operatingsystem.bootfile(medium_provider,:bootwim) %> boot.wim