KillDisk and PXE

How to place a registered Active@ KillDisk into a WinPE image for use in a network PXE boot environment

Note:

To modify WinPE image (WIM) you need to have Windows ADK installed.

  1. Start the Boot Disk Creator form Windows Start menu and prepare a bootable media. For KillDisk settings fill in the data on App Config page.
    Let's assume that the Boot Disk media has an F: letter in our environment.
  2. Run Command Prompt as an Administrator.
  3. Create an empty directory C:\MOUNT and mount BOOT.WIM file using the DISM tool:
    Command: Dism /mount-image /imagefile:F:\sources\boot.wim /index:1 /mountdir:C:\mount
  4. Replace BOOTDISK.KEY in C:\MOUNT directory with BOOTDISK.KEY located at the root of Boot Disk media (F:\ BOOTDISK.KEY). This file is required and contains user's registration information.
  5. Copy your company logo file from Boot Disk media (located F:\_kd\images1.jpg) to C:\MOUNT directory.
  6. Open settings.xml file on Boot Disk media (F:\_kd\settings.xml) for edit using Notepad. Change path for your company logo file to X:\
    Copy modified settings.xml to C:\MOUNT\PROGRAM FILES\BOOTDISK\.
  7. Create folder BootDisk_Scripts in C:\MOUNT\PROGRAM FILES\BOOTDISK\. In any text editor (Notepad) create script file and copy it to the newly created folder BootDisk_Scripts. For example:
    cd x:\program files\bootdisk\
    call killdisk.exe -em=0 -p=1 -v=11 -eh=5 -id -fp -bp 
  8. Dismount the BOOT.WIM image and commit the changes you applied:
    Command: Dism /Unmount-Image /MountDir:C:\mount /commit
  9. Use prepared F:\SOURCES\BOOT.WIM as a network PXE boot environment.

How to load Active@ KillDisk over the network via PXE environment on Windows Server platform

  1. Add roles Windows Deployment Services.
  2. Configure the WDS server, but don’t add images in WDS Configuration Wizard.
  3. Add Windows PE image with Active@ KillDisk software Boot.wim in Boot Images on WDS server.
  4. In properties of WDS server in Boot tab add our image as default boot image for x64 architecture.
  5. Configure the DHCP server for work with WDS server.

For more detailed instructions, read Microsoft TechNet official documentation.

How to load Active@ KillDisk over the network via PXE environment on a Windows 10 computer

There are several steps required to do this: configuring the WinPE WIM, Boot Manager and PXE Server.

For the configuration steps, let's assume that inserted Boot Disk has a F: letter in our configuration environment.

Step 1: Copy WinPE Source Files onto the PXE Server

  • Map a network connection to the root TFTP directory on the PXE/TFTP server and create a \BOOT folder there. We will assign this network drive the Y: letter.
    Note:

    You can the ‘Easy access’ feature in the Windows Explorer to do this. Make sure to enable read/write permissions in the sharing and folder options.

  • Copy the PXE boot files from the mounted \BOOT folder of the Active@ Boot Disk boot.wim to the \BOOT folder on PXE/TFTP server. For example:
    Command: copy C:\mount\windows\boot\pxe\*.* y:\boot
    Note:

    To mount/dismount the boot.wim file, see section “How to place a registered Active@ KillDisk into a Windows PE image for use in a network PXE boot environment”.

  • After dismounting the boot.wim, copy the bootable Windows PE image (F:\ Sources\boot.wim) to the \BOOT folder on PXE/TFTP server.
  • Copy the file boot.sdi (F:\Boot\boot.sdi) to the \BOOT folder on PXE/TFTP server.

Step 2: Configure boot configuration

  • On a Windows 10 computer or in a Windows PE environment, create a BCD store using the BCDEdit tool.
  • In the BCD store, configure the RAMDISK, BOOTMGR and OS Loader settings for the Windows PE image.
  • Copy the BCD file to the \BOOT folder on PXE/TFTP server.
  • Configure your PXE/TFTP server and DHCP server to point PXE clients to download PXEBoot.com or PXEBoot.n12.

These are a few of the files that were copied over to the server in Step 1

For more details, see “Creating a BCD file for PXE boot” below.

Step 3: Deployment process

Boot the client machine through PXE, connected to the network. After pressing initializing the PXE boot, the system should handle the rest. Here’s what will happen:

  • The client is directed (by using DHCP Options or the PXE Server response) to download PXEBoot.com.
  • PXEBoot.com downloads Bootmgr.exe and the BCD store. The BCD store must reside in a \BOOT directory in the TFTP root folder. Additionally, the BCD store must be called BCD.
  • Bootmgr.exe reads the BCD operating system entries and downloads boot.sdi and the Windows PE image.
  • Bootmgr.exe begins booting Windows PE by running Winload.exe within the Windows PE image.

For more detailed instructions, read the Microsoft TechNet official documentation.

Configuring a PXE Server

Configuring a TFTP server is made simple with a tool called Serva. You can download it here.

This tool is an “Automated PXE Server Solution Accelerator” that supports a variety of server protocols. The ones we will be configuring are TFTP and DHCP.
  • Click the logo in the top left to access the Settings.
  • Configure your DHCP settings. You may copy the ones below, just make sure the address it binds to is a static IP address from your router. Under IP Pool 1st addr, input the first available IP address in your routers IP pool settings.
    Figure 1: DHCP Configuration
  • Configure your TFTP settings. You may also copy the setting below. Again, make sure the IP address is your router’s static IP and the TFTP server root directory is the one you configured in Step 1.
    Figure 2: TFTP Configuration

Once the settings are configured, reset the application and your PXE server should be fully operational!

Creating a BCD file for PXE boot:

This entire process is done in Command Prompt. Be sure to run it as Administrator.

  1. Create a BCD store using bcdedit.exe:
    bcdedit /createstore c:\BCD
  2. Configure RAMDISK settings:
    bcdedit /store c:\BCD /create {ramdiskoptions} /d "Ramdisk options"
    bcdedit /store c:\BCD /set {ramdiskoptions} ramdisksdidevice boot
    bcdedit /store c:\BCD /set {ramdiskoptions} ramdisksdipath \boot\boot.sdi
    bcdedit /store c:\BCD /create /d "winpe boot image" /application osloader

    The last command will return a GUID, for example:

    The entry { bb254249-93e9-11e7-84cb-6c71d9da760e } was successfully created.

    Copy this GUID for use in the next set of commands. In each command shown, replace "GUID1" with your GUID.

  3. Create a new boot application entry for the Windows PE image:
    bcdedit /store c:\BCD /set {bb254249-93e9-11e7-84cb-6c71d9da760e} device ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions} 
    bcdedit /store c:\BCD /set {bb254249-93e9-11e7-84cb-6c71d9da760e} path \windows\system32\winload.exe 
    bcdedit /store c:\BCD /set {bb254249-93e9-11e7-84cb-6c71d9da760e} osdevice ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions} 
    bcdedit /store c:\BCD /set {bb254249-93e9-11e7-84cb-6c71d9da760e} systemroot \windows
    bcdedit /store c:\BCD /set {bb254249-93e9-11e7-84cb-6c71d9da760e} detecthal Yes
    bcdedit /store c:\BCD /set {bb254249-93e9-11e7-84cb-6c71d9da760e} winpe Yes
  4. Configure BOOTMGR settings (remember to replace GUID1 in the third command with your GUID):
    bcdedit /store c:\BCD /create {bootmgr} /d "boot manager"
    bcdedit /store c:\BCD /set {bootmgr} timeout 30 
    bcdedit /store c:\BCD -displayorder {bb254249-93e9-11e7-84cb-6c71d9da760e} -addlast
  5. Copy the BCD file to your TFTP server:
    copy c:\BCD \\PXE-1\TFTP\Boot\BCD
  6. Your PXE/TFTP server is now configured. You can view the BCD settings that have been configured using the command:
    bcdedit /store <BCD file location> /enum all
    Example of BCD settings:
    C:\>bcdedit /store C:\BCD /enum all
    Windows Boot Manager
    --------------------
    identifier              {bootmgr}
    description             boot manager
    displayorder            {bb254249-93e9-11e7-84cb-6c71d9da760e}
    timeout                 30
    
    Windows Boot Loader
    -------------------
    identifier              {bb254249-93e9-11e7-84cb-6c71d9da760e}
    device                  ramdisk=[boot]\boot\boot.wim,{ramdiskoptions}
    description             winpe boot image
    osdevice                ramdisk=[boot]\boot\boot.wim,{ramdiskoptions}
    systemroot              \Windows
    detecthal               Yes
    winpe                   Yes
    
    Setup Ramdisk Options
    ---------------------
    identifier              {ramdiskoptions}
    description             ramdisk options
    ramdisksdidevice        boot
    ramdisksdipath          \boot\boot.sdi
    
     
Note:

Your GUID will be different than the one shown above.