There are several ways to deploy Nano Server to a physical machine:
- Dual-boot a Nano Server vhd or vhdx
- PxE-boot a bare-metal machine and install Nano Server from WDS using a vhd or vhdx
- PxE-boot a bare-metal machine and install Nano Server from WDS using a wim file
- Booting a bare-metal machine into WinPE and deploying Nano Server using a .wim file
In this blog, we’ll talk about the last one. For the first two, check out Getting Started with Nano Server & How to use WDS to PxE Boot a Nano Server VHD
To build the .wim image, please follow the instructions in Getting Started with Nano Server and use New-NanoServerImage. Make sure to use a .wim extension with the -TargetPath parameter.
Boot into WinPE and make sure that the .wim file you just created is accessible from WinPE. (I copied the .wim file to a bootable WinPE image on a USB thumb drive).
Once WinPE boots, use diskpart.exe to prepare the target machine’s hard drive. Enter the following diskpart commands (modify accordingly, if you’re not using UEFI & GPT):
Note that these commands will wipe out all data from the hard drive!!!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | Diskpart.exe Select disk 0 Clean Convert GPT Create partition efi size=100 Format quick FS=FAT32 label="System" Assign letter="s" Create partition msr size=128 Create partition primary Format quick FS=NTFS label="NanoServer" Assign letter="n" List volume Exit |
Apply the Nano Server image (adjust the path of the .wim file):
1 2 3 | Dism.exe /apply-image /imagefile:.ServerDatacenterNano.wim /index:1 /applydir:n: Bcdboot.exe n:Windows /s s: |
Remove the DVD media or USB drive and reboot your system using:
1 | Wpeutil.exe reboot |
That’s it. Looking forward to your feedback.
ref@