Skip to content

Commit feacdef

Browse files
committed
Windows Guide edits
1 parent c4dd0aa commit feacdef

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

_posts/2025-04-14-Cobbler-v3.3.7-Windows-Deployment-Guide.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,11 @@ Starting where the [Beginner's guide](/blog/2024/Cobbler-v3.3.6-Beginners-Guide/
2020

2121
### Caveats
2222

23-
1. **IMPORTANT:** Issues were encountered running the PXE client as a VirtualBox VM with UEFI firmware, so instead it is recommended to run the PXE client on physical *(bare metal)* hardware or as a [VMWare Workstation/Fusion](https://blogs.vmware.com/workstation/2024/05/vmware-workstation-pro-now-available-free-for-personal-use.html) or HyperV VM for UEFI installations.
23+
1. **IMPORTANT:** There was a frequent issue with PXE clients using VirtualBox UEFI firmware. For this reason, it is recommended to run both Cobbler server and PXE client as either bare metal systems or [VMWare Workstation/Fusion](https://blogs.vmware.com/workstation/2024/05/vmware-workstation-pro-now-available-free-for-personal-use.html) or [HyperV](https://learn.microsoft.com/en-us/windows-server/virtualization/hyper-v/hyper-v-overview) VMs for UEFI installations.
2424

25-
- More info on the issues encountered in the **Tips & Troubleshooting** section below.
25+
- You may experience different results depending on your Windows or VirtualBox version and settings; more info in the **Tips & Troubleshooting** section below
2626

27-
- If running the PXE client as a VMWare or HyperV VM it is recommended to also run the Cobbler Server under the same VM host or as a bare-metal server, using the same specs/settings as described in the [Beginner's guide](/blog/2024/Cobbler-v3.3.6-Beginners-Guide/), as the network complexity of using different hypervisors would be beyond the scope of this guide.
28-
29-
- Your experience may differ depending on your hardware and Windows and VirtualBox software versions and settings.
30-
31-
1. This guide assumes you have already acquired the Windows 10 and 11 64-bit ISO installation files by using the [Windows 10](https://www.microsoft.com/en-us/software-download/windows10) and [Windows 11](https://www.microsoft.com/en-us/software-download/windows11) Media Creation Tool, which requires an existing Windows 10 or 11 system to create *(like the VirtualBox Host described in the [Beginner's guide](/blog/2024/Cobbler-v3.3.6-Beginners-Guide/))*
27+
1. This guide assumes you have already acquired the Windows 10 and 11 64-bit ISO installation files by using the [Windows 10](https://www.microsoft.com/en-us/software-download/windows10) and [Windows 11](https://www.microsoft.com/en-us/software-download/windows11) Media Creation Tool
3228

3329
- Also on the Windows 11 download page linked above is the minumum system requirements for installing Windows 11, which include UEFI Secure Boot and TPM support, making a *supported* installation to a VM an advanced topic beyond the scope of this guide.
3430

@@ -171,7 +167,7 @@ CMD3=$(echo 'reg add HKLM\\SYSTEM\\Setup\\LabConfig /v BypassRAMCheck /t REG_DWO
171167
CMD4=$(echo 'reg add HKLM\\SYSTEM\\Setup\\LabConfig /v BypassCPUCheck /t REG_DWORD /d 1 /f' | unix2dos)
172168
CMD5=$(echo 'reg add HKLM\\SYSTEM\\Setup\\LabConfig /v BypassStorageCheck /t REG_DWORD /d 1 /f' | unix2dos)
173169
CMD6=$(echo '\$distro_share\\sources\\setup.exe \$unattended' | unix2dos)
174-
sudo sed -i -E "s,^#else.?$,#else if \$os_version == \"11\"\n${CMD1}\n${CMD2}\n${CMD3}\n${CMD4}\n${CMD5}\n${CMD6}\n#else," /etc/cobbler/windows/startnet.template
170+
sed -i -E "s,^#else.?$,#else if \$os_version == \"11\"\n${CMD1}\n${CMD2}\n${CMD3}\n${CMD4}\n${CMD5}\n${CMD6}\n#else," /etc/cobbler/windows/startnet.template
175171
```
176172

177173
Now, take similar steps as with Windows 10 to import and automatically deploy Windows 11 Pro over PXE.
@@ -192,23 +188,33 @@ The **PXE Client** VM can now be powered on, and should automatically boot to PX
192188

193189
1. The [Cobbler 3.3.6 Beginner's Guide](/blog/2024/Cobbler-v3.3.6-Beginners-Guide/) **Tips & Troubleshooting** section contains some basic recommendations and limitations of Cobbler which will not be repeated here.
194190

195-
1. Windows distros can only be customized to the Profile level, System-level settings in Cobbler will not be accounted for on Windows deploys since the Answerfile is defined in the `startnet.cmd` script which is archived into the `winpe.wim` Windows image during `cobbler sync` actions.
191+
1. Unline other OS deployments with Cobbler, by default, Windows system deploys can only be customized to the `cobbler profile` level, with only the MAC address and other DHCP-related options being used from *Windows* `cobbler system` items.
192+
193+
- This is because the `startnet.cmd` script is generated by cobbler during `cobbler sync` actions and compressed/archived into the `winpe.wim` Windows image.
194+
195+
- The `startnet.cmd` script runs immediately upon loading WinPE and is used to run Windows `setup.exe` with the desired Answerfile (`autounattended.xml`), so it is only able to specify the Profile-level answerfile.
196196

197-
- [Windows Setup implicit answer file search order](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-automation-overview#implicit-answer-file-search-order)
197+
- Furthermore, Cobbler's `answerfile.template` is only customizeable to the profile level, as it does not include system specific configurations, and more importantly, is only set to call a Cobbler *Profile-level* post-installation script, as seen below:
198+
199+
<CommandLine>c:\post_install.cmd @@profile_name@@</CommandLine>
200+
201+
- Even though you can arbitrarily specify unique names for the different `autoinstall-metadata` variables for *Windows* `cobbler system` & `cobbler profile` items, so they will be generated under those names, say for `post_install.cmd`, specifying `new_post_install.cmd` will generate a file with that name under `distro_mirror/{DISTRO}/sources/$OEM$/$1`. However, those unique names are not referenced in the `answerfile.template` file to properly use them.
198202

199-
- Theoretically it would be possible to program additional logic into the `startnet.cmd` or `post_install.cmd` to detect the interface MAC address connected to the Cobbler netword from the PXE client and retrieve a custom anwerfile or post_install script (kickstart) named appropriately, but that is beyond the scope of this guide for now.
203+
- [Windows Setup implicit answer file search order](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-automation-overview#implicit-answer-file-search-order)
200204

201-
- The `post_install.cmd` script has a dynamic name per profile, but the answerfile.template does not account for it.
205+
- This is all simply default behavior in cobbler, but it would be possible to program additional logic into the `startnet.cmd` or `post_install.cmd` to, for instance, retrieve a diffent answerfile or post-install script based on the hostname (configuratble through DHCP), but that would likely be accompanied by different limitations and requirements is beyond the scope of this guide for now.
202206

203207
1. **VirtualBox Issues**
204208

205209
- Specifially, the `ipxe-x86_64.efi` bootloader would fail to "initialize devices" and even though using the `ipxe-snponly-x86_64.efi` bootloader instead would load properly, the PXE client VM would *usually* just hang when downloading on of the WinPE files (i.e. `wimboot`, `boot.sdi`, `bootmgr.exe`, `bcd`, `winpe.wim`)
206210

207-
- Tried several troubleshooting steps and could not get a consisten fix:
211+
- Tried several troubleshooting steps and could not get a consistent fix:
208212

209213
- Tried different virtual network adapters.
210214

211-
- Using the "Paravirtualized Network (virtio-net)" adapter did resove this issue with the iPXE boot process and load into the WinPE/wimboot image successfully, but then did not detect any network adapters and failed to begin Window Setup, and further troubleshooting would be beyond the scope of this guide.
215+
- Using the "Paravirtualized Network (virtio-net)" adapter did resove this issue with the iPXE boot process and load into the WinPE/wimboot image successfully, but then did not detect any network adapters and failed to begin Windows Setup; further troubleshooting would be beyond the scope of this guide.
216+
217+
- Tried running PXE client on another host PC with different VirtualBox version
212218

213219
- Tried installing the appropriate VirtualBox Extensions for my version of VB.
214220

@@ -218,9 +224,10 @@ The **PXE Client** VM can now be powered on, and should automatically boot to PX
218224
219225
- Found no relevant entries/errors in VirtualBox VM logs and nothing abnormal in Cobbler server logs (HTTP, TFTP, DHCP).
220226

221-
- A live Windows OS installation can be converted from MBR (legacy-BIOS) to GPT (UEFI) via powershell commands, which can be used as a workaround for compatibility with VirtualBox VM UEFI firmware
227+
- A live Windows 10 installation can be easily converted from MBR (legacy-BIOS) to GPT (UEFI) via powershell commands, which can be used as a workaround for compatibility with VirtualBox UEFI firmware
228+
229+
- source: [mbr2gpt](https://www.windowscentral.com/how-convert-mbr-disk-gpt-move-bios-uefi-windows-10).
222230

223-
- source: [https://www.windowscentral.com/how-convert-mbr-disk-gpt-move-bios-uefi-windows-10](https://www.windowscentral.com/how-convert-mbr-disk-gpt-move-bios-uefi-windows-10).
224231

225232
1. **start-net.cmd issue**
226233

0 commit comments

Comments
 (0)