I love the idea of this. Can you advise what the ISC DHCP config should look like for a Win 2016 host? I have:
host win2016test {
hardware ethernet 00:1a:4a:34:fe:a5;
fixed-address 192.168.96.31;
option host-name “win2016test”;
next-server sat6.local;
}
Using Satellite 6.6… I’m also missing a bunch of templates. Could you advise where I could find missing templates such as Windows default iPXE, Windows peSetup.cmd and the Windows partition table?
Hi there! @UXabre Thank you for your tutorial, it’s really helpful!
i have some question.
There is tagging traffic on a NIC. I use native vlan to deploying OS.
One more VLAN should be set up on this NIC. Is it possible for Windows?
I’ve added necessary networks in foreman and settings os host.
Hi @Andrey,
VLAN tagging is possible only on windows servers (and some very limited NICs offer support for it as well in the non-server editions but that’s something you’ll have to look into).
Now, on that subject, these scripts are not adapted for that use-case unfortunately; but feel free to share any adjustment to the templates (and more specifically, the network templates) to the community.
if you are booting UEFI with iPXE and the WinPE complains that it can’t find the peSetup.cmd the note that under UEFI iPXE uses different syntax to name the downloaded files:
From what I can tell, you are already using iPXE so the iPXE chainload part can be omitted in your case and just load the regular pxelinux bootloader instead. The error is because the tftp server is not able to muster up the ipxe.lkrn file (which is part of the ipxe-bootimgs package).
The reason why we use the iPXE chainloader is because that one has support for HTTP loading, which we need to download the installation script (peSetup.cmd) into the image.
So, these are the files that I have copied to the /var/lib/tftpboot folder. (Sorry for the long list but I’m trying to shotgun us a way to a solution )
/usr/share/ipxe/ipxe.lkrn
/usr/share/syslinux/chain.c32
/usr/share/syslinux/ldlinux.c32
/usr/share/syslinux/menu.c32
/usr/share/syslinux/libcom32.c32
/usr/share/syslinux/libutil.c32
/usr/share/syslinux/linux.c32
/usr/share/syslinux/pxelinux.0
/usr/share/syslinux/vesamenu.c32
You could copy the linux.c32 file and take it from here (I think I have all these files for a reason though…although is has been ages since I worked on this so might be there are too many files; at least you know have the locations where you should be able to find them).
I can only confirm that I have the same issue. I see that the ‘…patching WIM dir.file peSetup.cmd’ message is missing compared to the BIOS boot. iPXE downloads the file correctly from the server, so that’s not the issue. It just seems that BOOTX64.EFI is completely ignoring the file.
did you ever figure this out?
i’m stuck at the exact same thing.
tftp:///
what is weird is that PXE doesnt have this problem, it can pull ipxe.lkrn from tftp (via DHCP option), but iPXE seems to ignore it
i was never able to fix this issue, so I looked up in which provision template the code was (it was windows default iPXE), then cloned the template and modified the script to hardcode my IP instead of the ${next-server},publish the template for my location and org. Change the template used in windows to the new one
yes - hardcoding is not nice, but DHCP next-server option didnt seem to be the issue as it worked fine for PXE (before chaining)
I’m really missing the mark here. My Windows Deployments are working great. Everything from booting iPXE, partioning, pushing the image with DISM… EXCEPT for my finish scripts. I really need my domain join powershell script to run at the end - can’t figure out why it’s not executing.
I’ve tried calling it as a snippet and just putting it raw into a script template as well. I can’t see any sign of it running once the I get past the first boot. I know it works because pasting into powershell and running it gets the system on the domain. Any ideas?
If you call your code as a finish script it is a .bat file so the first command will open powershell and all other commands will fails since they are not known with cmd.
You can test this by logging onto a finished host and running the foreman-finish.bat manually in C:\deploy\ .
If you want to execute a command in powershell you will need to use.
powershell.exe -command “insert command here”
For domain join you could also use the below cmd command to accomplish the same thing.
netdom join %computername% /domain:example.com /userd:example\user /passwordd:password
I’ve finally with the help from this page got efi provisioning with windows - using foreman 3.9.1.
I am stumped as to the windows_default_user_data template as it looks like it creates a sysprep file not a powershell command. I don’t see how it can possibly work as a ps1 file, it just errors out on the first line of a yaml file