Freigeben über


Deploying Nano Server to a Bare-Metal Machine using a WIM and WinPE

There are several ways to deploy Nano Server to a physical machine:

  1. Dual-boot a Nano Server vhd or vhdx
  2. PxE-boot a bare-metal machine and install Nano Server from WDS using a vhd or vhdx
  3. PxE-boot a bare-metal machine and install Nano Server from WDS using a wim file
  4. 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!!!

 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):

 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:

 Wpeutil.exe reboot

That’s it. Looking forward to your feedback.

 

ref@

Comments

  • Anonymous
    July 30, 2016
    Hi Refaat. I'm getting INACCESSIBLE_BOOT_DEVICE blue screen after following this. I deployed the wim from Server 2012 R2 (on other drive) onto an MMC which WinPE didn't see (since I only have old 6.1.7600-based PE at hand right now). Could any of those things have caused it?
    • Anonymous
      July 30, 2016
      Hi Jan Ringoš,Based on the BSOD Message "INACCESSIBLE_BOOT_DEVICE", you may be experiencing missing Storage Controller Driver file in your WIM and you should find out what storage controller driver is needed for your hardware and use DISM to Add the required storage driver to your Windows.
      • Anonymous
        July 31, 2016
        Hi Ryen, thanks for you reply, it was exactly that. I was missing "sdstor.sys" driver.
  • Anonymous
    August 18, 2016
    Hi Refaat. I followed all the instructions and I am getting "Select proper Boot Device". The proper boot path is setup correctly in the bios. Any suggestions?
    • Anonymous
      August 22, 2016
      Hi Chris,You may have to use bcdboot to properly initialize the device.
      • Anonymous
        August 23, 2016
        I've run Bcdboot.exe n:\Windows /s s: and it completes successfully. Still does not boot. Also tried to partition as MBR and that doesn't work either.
    • Anonymous
      September 19, 2016
      I think you need to add the "Microsoft-NanoServer-BootFromWim-Package.cab" package to your WIM file.
  • Anonymous
    September 07, 2016
    Might wish to add a warning about the "select disk 0" if the user has more than one disk installed on the system. Should be common sense, but at least I missed it :-)Thanks for an otherwise good guide, so close to getting it to boot.
  • Anonymous
    October 06, 2016
    It doesn't work for me at all. I am able to generate the WIM file using New-NanoServerImage module but it doesn't boot.The computer I am trying to install Nano Server doesn't support UEFI, so the article above is says "modify accordingly, if you’re not using UEFI & GPT", but how? What the partition layout should look like?I am using WinPE to apply the image to the "n" drive, but my system doesn't boot, even after executing : Bcdboot.exe n:\Windows /s s:In my case, the S: drive is another primary partition, which I am unsure if it's correct.The message I am receiving is:No bootable device -- insert bot disk and press any key
    • Anonymous
      October 08, 2016
      For Bios/MBR try:Diskpart.exeSelect disk 0CleanCreate partition primary size=350Format quick fs=ntfs label="System"Assign letter="s"activeCreate partition primaryFormat quick fs=ntfs label="NanoServer"Assign letter="c"List volumeExitDism.exe /apply-image /imagefile:.\ServerDatacenterNano.wim /index:1 /applydir:c:\Bcdboot.exe c:\Windows /s s:
      • Anonymous
        April 26, 2017
        With one addition /f ALL as in bcdboot.exe n:\Windows /s s: /f ALLAll though my MOBO supports UEFI, the RAID card doesn't seem to. Shouldn't one be able to use the EFI shell to "point" to the RAID card / boot image location?
    • Anonymous
      October 09, 2016
      I am replying to my own post because when I asked the question I wasn't logged in.Apparently, the problem with my computer is that it does support UEFI.The bottomline is: If you are using WIM to deploy a bare metal Nano Server, you need to have a UEFI-based computer, described here:https://technet.microsoft.com/en-us/library/dn594399.aspxI tried to boot to Nano Server using VHD that I generated on a Windows Server 2016 on the same machine and it boots with no problems, but I was looking forward to have the bare metal deployment. I will try to find an alternative way to do it.