# Customize Boot Image

In order to use Adaptiva OneSiteDownloader during the Operating System Deployment (OSD) process, a new boot image must be customized for OneSite and added to ConfigMgr. These steps show you how to create, customize, and deploy boot images for OSD.

Adaptiva provides a [Workflow(preferred)](https://support.adaptiva.com/hc/en-us/articles/13391548876813-Workflow-for-OneSite-Boot-Wim-Creation) and a [PowerShell script](https://support.adaptiva.com/hc/en-us/articles/115001545992-Create-OneSite-Boot-Image-Script-Read-Me) that automates this process for you. Follow the guidance in the Knowledge Base article to use that script.

To create a new custom boot image manually, perform the following steps.

## Manually creating a New Custom Boot Image

We recommend you update the [Windows Assessment and Deployment Kit (Windows ADK)](https://learn.microsoft.com/en-us/windows-hardware/get-started/adk-install) before proceeding. For more information on managing boot images in ConfigMgr, review Microsoft's [OS deployment documentation](https://learn.microsoft.com/en-us/intune/configmgr/osd/get-started/manage-boot-images) for boot images.

*Perform the following on your ConfigMgr server.*

1. On the ConfigMgr server, create and share a new folder to store the custom boot image. This folder will be the package source for the boot image and will need to be referenced as a UNC path.

   Example: **E:\PkgSource\OSD\OneSiteBootx64**
2. Copy the default ConfigMgr boot image `boot.wim` from `%InstallPath%\OSD\Boot\x64\` to your package source folder.

   Example: `E:\Program Files\Microsoft Configuration Manager\OSD\Boot\x64\boot.wim`
3. Rename the `boot.wim` file to something more descriptive, such as: **OneSiteBootx64.wim**.
4. Open the ConfigMgr Console and navigate to **Software Library > Operating Systems**.
5. Right-click **Boot Images** and select **Add Boot Image**.

   ![](https://3413670903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcngs4tdupbQfdQ7fXLB%2Fuploads%2Fgit-blob-ae4b595b06ef9c1677f176651fcb444e62f39cbc%2Fadd-boot-image.png?alt=media)
6. On the Data Source page, click **Browse** and enter the UNC path to the new boot image. Click **Next** to continue.

   ![](https://3413670903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcngs4tdupbQfdQ7fXLB%2Fuploads%2Fgit-blob-09fa0719b2c82bb14f3a9bab41ab1b8a6c688088%2Fboot-image-wizard.png?alt=media)
7. At the General screen, enter a Name of **OneSite Boot (x64)**, and then click **Next**.
8. Complete the wizard. The new boot image is listed in the console.
9. Right-click the **OneSite Boot (x64)** boot image and select **Distribute Content**.

   ![](https://3413670903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcngs4tdupbQfdQ7fXLB%2Fuploads%2Fgit-blob-5c8219f3ef52f52af9831cd6e05c96ca9126a6ba%2Fdistribute-image.png?alt=media)
10. Complete the Distribute Content Wizard to send the boot image package to at least one Distribution Point.

## Add files to boot image

Several files will need to be added to the boot image. These will come from the media for the task sequence. To do this, a temporary ISO file should be compiled and mounted.

1. Under **Operating Systems**, right-click **Task Sequences** and select **Create Task Sequence Media**.

   ![](https://3413670903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcngs4tdupbQfdQ7fXLB%2Fuploads%2Fgit-blob-bbe5e82c9a6b9eb4b4161124bc26475ce1c03f9a%2Fcreate-media.png?alt=media)
2. In the Create Task Sequence Media Wizard, at the Select Media Type screen, select **Bootable media** and then click **Next**.

   ![](https://3413670903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcngs4tdupbQfdQ7fXLB%2Fuploads%2Fgit-blob-accf5224f8eee2883307228a8d3dc99011790b57%2Fcreate-bootable-media.png?alt=media)
3. On the Media Management page, choose the best option for your environment.

   ![](https://3413670903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcngs4tdupbQfdQ7fXLB%2Fuploads%2Fgit-blob-946d5e884576ff843a1a492596427a0d64c8ac32%2Fmedia-management.png?alt=media)

   * Select **Dynamic media** if you want to allow a management point to redirect the media to another management point, based on the client location in the site boundaries. This is the recommended setting for a multi-site hierarchy.
   * Select **Site-based** media if you want the media to contact only the specified management point. This is recommended for a single Primary Site hierarchy.
4. By default, Dynamic media is selected. Click **Next** to continue.
5. On the Media Type page, select **CD/DVD set**.
6. Next to Media file, click **Browse** and enter the path and file name of the temporary ISO file that you will create. This is a temporary file and does not need to be shared. You can put it anywhere with *\~400MB* space.
7. Click **Next** to continue.

   ![](https://3413670903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcngs4tdupbQfdQ7fXLB%2Fuploads%2Fgit-blob-5eee866ecabcdc38d0525519cf3ab6d41678525a%2Fmedia-file.png?alt=media)
8. On the Select security settings for the media page, choose the best options for your environment.
   * **Enable Unknown Computer Support** - Select this option if you want to be able to PXE boot and build unknown computers that are not yet registered in SCCM.
   * **Specify a password to protect task sequence media** - If you require a Password to be entered after the boot image is loaded then enter this here. As Adaptiva does not use a DP, this replaces the **Require a password when computers use PXE** setting you would usually set on the PXE tab options under Distribution Point properties.
   * **Create a self-signed media certificate...** - If ConfigMgr is configured to use HTTPS for MPs and DPs, you should import your PKI certificate at this screen. If not, select the default option of **Create self-signed media certificate**. We recommend you set the expiration date to some distance in the future, for example over 2 years, otherwise the boot image will stop working and this process will need to be repeated once the expiration date has passed.
9. Click **Next** to continue.
10. On the Select the boot image for the media page, next to Boot image, click **Browse** and select the new OneSite boot image.
11. Next to Distribution point section, click **Browse** and select the DP to download the boot image from for the ISO image creation.

    ![](https://3413670903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcngs4tdupbQfdQ7fXLB%2Fuploads%2Fgit-blob-158c9e81d45321db9eaa4ce576bd5b083f1c6f72%2Fmedia-boot-image.png?alt=media)

    If you selected **Dynamic Media** in step 3, the associated management points section will be shown. Select **Add** to choose one or more Management Points that the media will use in its initial communication.

    ![](https://3413670903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcngs4tdupbQfdQ7fXLB%2Fuploads%2Fgit-blob-591779e4f5b543ed4f42afd261c505e5d7ea951f%2Fdynamic-media.png?alt=media)

    If using **Site-based media** in step 3, select **Browse** to choose the Site the media will use. Click **Next** and continue the wizard until it is complete.

    ![](https://3413670903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcngs4tdupbQfdQ7fXLB%2Fuploads%2Fgit-blob-dbcd321b84b44d5002b87869489c3d77d9fb3e17%2Fsite-based-media.png?alt=media)
12. Click **Next** and complete the wizard. It will take a few moments to create the ISO.
13. Navigate to the folder containing the ISO file. In this example, **E:\Temp\OneSiteBootx64.iso**.
14. Right-click the **OneSiteBootx64.iso** and click **Mount**.
15. In the mounted folder, navigate to the `SMS\data` folder and copy out the **TsmBootstrap.ini** and **Variables.dat** to the Temp folder.

    ![](https://3413670903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcngs4tdupbQfdQ7fXLB%2Fuploads%2Fgit-blob-809b13edc741b3ab27a9c4be403d831c1b456f1c%2Fiso-mount.png?alt=media)
16. Unmount the ISO file and delete it.

## Mount and Finalize the Boot Image

Copy these files and the **OneSiteDownloader.exe** to the boot image.

1. Navigate to **E:\PkgSource\OSD\OneSiteBootx64** and create a new folder named **mount**.

   ![](https://3413670903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcngs4tdupbQfdQ7fXLB%2Fuploads%2Fgit-blob-f79529c7236406e16133c4cef8b9a989eba48b87%2Fmount-folder.png?alt=media)
2. Open an administrative command prompt or Windows Powershell from the Start menu then change directory to this location. Run the following DISM command to mount the boot image file to the Mount folder created earlier.

   ```cmd
   DISM.exe /Mount-Image /ImageFile:E:\PkgSource\OSD\OneSiteBootx64\boot.wim /Index:1 /MountDir:E:\PkgSource\OSD\OneSiteBootx64\Mount
   ```
3. Navigate to the **mount** folder and run the following command to create the folder structure: `mkdir SMS\data`.
4. Copy the **TsmBootstrap.ini** and **Variables.dat** files from **E:\temp** to the **data** folder.

   ![](https://3413670903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcngs4tdupbQfdQ7fXLB%2Fuploads%2Fgit-blob-e2b09d89164ab0f543bc5b71effe2b6f420c229c%2Fmount-data-folder.png?alt=media)
5. At the root of the mount directory, create a folder called **OneSite**. This path will be referenced in a task sequence variable later.
6. Copy the **OneSiteDownloader.exe** to this **OneSite** folder.

   ![](https://3413670903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcngs4tdupbQfdQ7fXLB%2Fuploads%2Fgit-blob-c2c666e1a71ea7050ae81785b153adfb00da5852%2Fmount-downloader-folder.png?alt=media)
7. Copy any other tools and utilities that you want available in your boot image. Once all files are copied to the **mount** directory close Windows Explorer and make sure there are no open files or folders in the **mount** folder.
8. Use the DISM command to unmount and commit the contents of the mount folder into the original WIM:

   ```cmd
   DISM.exe /Unmount-Image /MountDir:E:\PkgSource\OSD\OneSiteBootx64\mount /commit
   ```
9. Now that the OneSiteBootx64.wim has been updated, you can delete the mount folder.
10. In the ConfigMgr console, navigate to **Operating System > Boot Images**, right-click **OneSite Boot (x64)** and select **Update Distribution Points**.
11. On the initial **General** page of **the Update Distribution Points Wizard**, make sure you **DO NOT** tick the option to Reload this boot image...; *If you tick this option, the custom files for the TS Boot Media and the OneSiteDownloader.exe you added to the boot image will be lost.*

    ![](https://3413670903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcngs4tdupbQfdQ7fXLB%2Fuploads%2Fgit-blob-04d197f688a7520414080c5f99f86968c9700855%2Fboot-image-distribution-wizard.png?alt=media)
12. Complete the wizard to update the distribution points.

### Publish the Boot Image in OneSite Anywhere

If automatic publication is not enabled in OneSite, the new boot image needs to be published in Adaptiva.

1. Log in to the OneSite Cloud Admin Portal at `https://AdaptivaServer:[port]` and click **OneSite Anywhere** on the top bar navigation.
2. In the left-hand navigation of OneSite Anywhere, click **Content Publication > Boot Images**.
3. Verify that the new OneSite Boot x64 image has a Publication Status of **Published**. If not, right-click the **OneSite Boot (x64) en-US** image, and click **Publish**.

   ![](https://3413670903-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcngs4tdupbQfdQ7fXLB%2Fuploads%2Fgit-blob-c134d32fb5b8fd1f0cbb004289cb25fe327daf10%2Fboot-image-publication.png?alt=media)

The boot image is now ready for use. When creating/modifying your OSD task sequence, select the boot image you just created.
