Creating a TeraByte Recovery Environment, WinRE Boot Disc, or UFD Containing Image for Windows (TBWinRE)

This tutorial is a guide to creating a WinPE boot disc or USB flash drive (based on the Windows Recovery Environment) containing Image for Windows. This tutorial also covers adding Image for Windows to the existing Windows Recovery Environment (WinRE) installed with Windows 7, Windows 8, and Windows 10.

Note: This tutorial covers using the TBWinPE/RE Builder Windows program. If you are using the TBWinRE.cmd script please click here to switch tutorials.

Requirements:

Before beginning, please review the following requirements for the project:

  • Operating System:

    Windows 7, Windows 8, Windows 8.1, or Windows 10. Both 32-bit and 64-bit versions are supported (Legacy BIOS and UEFI).

    Note: The installed Recovery Environment needs to be functional for the program to update it. Creating the boot media may still be possible on a system with a non-functional Recovery Environment. Additionally, when creating the TBWinRE boot media it's recommended to do so on the system on which it will be used as some systems require files not available on all systems.

  • TBWinPE/RE Builder Files:

    The TBWinPE/RE Builder files are installed automatically with Image for Windows (version 2.95 or later) and are located in the tbwinre folder in the Image for Windows installation folder. For example, on a default installation on a 64-bit system, the paths would be:
    V3 installation: C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite\tbwinre
    V2 installation: C:\Program Files (x86)\TeraByte Unlimited\Image for Windows\V2\tbwinre

    If desired, this folder can be copied to a different location (e.g. D:\TBWinRE). Using a non-system folder will allow easier editing of the files when creating custom builds.

    Alternatively, the TBWinPE/RE Builder files can be downloaded and extracted to a folder on the system you are using to create the build.
    http://www.terabyteunlimited.com/downloads/wp/tbwinre.zip

  • Image for Windows:

    Image for Windows 2.95 or later must be installed on the system which you are using to create the build. Using the most current version of Image for Windows is recommended.

    Optional: The Image for Linux CD Boot files will be included if installed. The TBIView, TBIMount, and TeraByte OSD Tool Suite Pro (TBOSDTS) programs will also be included in the build if they are installed. Additionally, the standard TBOSDTS installed scripts and scripts in the public sub-folder will be included. TBOSDTS 1.47 or later is required to create the TBWinRE.bin boot file.

  • Hard Drive Space:

    Approximately 500MB of free space is required during the TBWinRE build process. An additional approximate 300MB is required if creating the TBWinRE.bin boot file.

  • Memory (RAM):

    The target system requires a minimum of 512MB. Booting the TBWinRE build on a system with less than 512MB is not recommended or supported.

  • Drivers:

    Depending on the system, it may be necessary to add storage controller drivers to the build to have access to the drives when booted to TBWinRE. Examples of other drivers that may need added include USB 3 drivers and NIC drivers. Refer to Appendix 2, if necessary.

    Note: Windows 8 and Windows 10 include native support for USB 3 (adding USB 3 drivers is not necessary). Commonly used Windows 7 USB 3 drivers can be downloaded by TBWinPE/RE Builder and included in builds based on Windows 7.

    Important Note for Systems using Drives Larger than 2.2TB: The versions of the Intel Rapid Storage Technology (RST) drivers included in the Windows 7 & 8 (8.0 version) WinRE do not properly support drives larger than 2.2TB. As a result, when this driver is used, the drive will be reported with an incorrect size (e.g. a 3TB drive showing as 746GB) and the file system on the drive may be corrupted. If using large drives on a system utilizing Intel RST it's strongly recommended to download the current driver and include it in the TBWinRE build. Go to the Intel Rapid Storage Technology (RST) page, click the driver link in the Latest Downloads section, then download either the f6flpy-x64.zip (for 64-bit Windows) or f6flpy-x86.zip (for 32-bit Windows) file. Note: If you must use an older version of the driver, version 10.1 is required for AHCI and version 10.5 is required for RAID.

Step 1: Download and Extract the TBWinPE/RE Builder Files

Note: If you are using the TBWinPE/RE Builder files installed with Image for Windows you can skip this step. If creating a customized build, you may find copying the files to an alternate folder with standard user-level permissions will make the process easier.

Download the TBWinRE ZIP file from the link below:
http://www.terabyteunlimited.com/downloads/wp/tbwinre.zip

The download will be in the form of a ZIP file containing the TBWinPE/RE Builder program, TBWinRE CMD script, and supporting files.

Important Note: Since this file comes from another computer, Windows may block it. Whether this happens or not depends on the version of Windows and the security settings. If the file is blocked, it won't work correctly. To check if the file is blocked, right-click on the downloaded file, select Properties from the pop-up menu, and see if an Unblock button or checkbox exists on the General tab. If it does, click the Unblock button or check the box, then click OK. An example of a blocked file is shown below:

Extract the contents of this file to the folder from where you want to run TBWinPE/RE Builder. It is recommended that you create a new folder in the root of a drive (C:\TBWinRE, D:\TBWinRE, etc.) and extract the files there.

An example of the files extracted to the C:\TBWinRE folder is shown below:

Step 2: Running TBWinPE/RE Builder

The TBWinPE/RE Builder program can be run from either the installed shortcut or directly from its folder:

  • To run from the installed shortcut:

Windows 7: Access the Windows Start menu and browse All Programs to the TeraByte Unlimited >> Image for Windows >> V2 section. Then click the IFW-Create Recovery Boot Disk shortcut. If UAC is enabled (the default), click Yes at the UAC prompt to allow the program to run.

Windows 8: Access the Windows Start screen (e.g. press the Windows key or move mouse to lower-left corner of screen and click). Locate the section with the TeraByte program shortcuts and click IFW-Create Recovery Boot Disk (if the shortcut is not visible you may need to right-click a blank area of the screen and select All apps from the pop-up or just start typing the shortcut name). If UAC is enabled (the default), click Yes at the UAC prompt to allow the program to run.

Windows 10: Access the Windows Start menu (e.g. press the Windows key or click the Windows icon in lower-left corner of the screen). Click All apps. Locate the TeraByte Unlimited section (expand it, if necessary) and click IFW-Create Recovery Boot Disk. If UAC is enabled (the default), click Yes at the UAC prompt to allow the program to run.

  • To run from the TBWinRE folder:

Browse to the TBWinRE folder. Double-click the TBWinPE.exe file or right-click on it and select Open from the pop-up menu. If UAC is enabled (the default), click Yes at the UAC prompt to allow the program to run.

The TBWinPE/RE Builder program will run and display the Welcome screen.

Click Next. The Project Type screen will be shown.

The TBWinRE project type is selected by default.

Note: Default settings will work for most standard builds. If you need to adjust the program or build settings click Settings. Details on the available settings can be found here.

Click Next. The License screen will be shown.

Enter your Image for Windows licensed name and product key. Leave the fields blank if using the trial version of Image for Windows. Enter the license information for the version of Image for Windows being included in the build. To skip this step in future builds if the format of the license information previously entered or imported appears valid, check the option. Click Next to continue.

Build requirements will be checked. If successful, the WinRE image file will be backed up and verified (if backup doesn't already exist).

If no warnings are issued and no errors found the next screen will be displayed automatically. If there are errors or warnings (if not ignored) they will be displayed for review. To ignore warnings in the future check the Ignore warnings when checking requirements option. Click Next to continue.

By default, if the build is based on Windows 7 (Windows 7 WinRE, in this case) and the USB 3 drivers aren't found you will be prompted to download them. It is recommended to include these drivers to support systems with USB 3. Click Download to start the process. Once downloaded, the license agreements will be displayed. Click to accept the licenses and then click OK to use the drivers.

Click Next to continue. The Build Type screen will be shown.

Select the desired build type to create. Options will be disabled if not supported.

The following build types are available:

Create a TBWinRE CD, USB Flash Drive (UFD) or ISO file: Select this to create a bootable CD, UFD, or ISO file containing TBWinRE. The installed WinRE will not be modified.

Modify the installed Windows Recovery Environment (WinRE): Select this to modify the installed WinRE to include the TeraByte programs. The WinRE is accessed from the Windows Advanced Boot Options menu (via F8 when booting Windows 7) or the Boot/Restart menu (Windows 8 or later). Note: The installed WinRE must be functional for this option to be available.

Restore the original Windows Recovery Environment (WinRE): Select this to restore the Windows Recovery Environment (WinRE) back to its original state. When a build is created, a backup is automatically created in the WinRE_Backup folder if one does not exist. Note: This option is not available if a backup does not exist. Additionally, the installed WinRE must be functional for this option to be available.

Create boot file TBWinRE.bin for use with TeraByte's BOOTFILE program: Select to create the TBWinRE.bin boot file for use with TeraByte's BOOTFILE program (supports booting directly to the file from Windows).

Select the desired build option and click Next to continue. The Build Summary screen will be shown.

At this point you can either create the build by clicking Start or go back if you need to make changes.

The build process may take several minutes, depending on the speed of the computer.

Note: When the script is unmounting the winre.wim file it may take several minutes. Some anti-virus programs may cause a slow unmount or an unmount error. If the unmount fails you will be prompted to try it again.

TBWinPE/RE Builder will stop if it encounters an error during the build process. A log file (TBWinPE.log) is also created by default and can be examined if there are issues (select View Log from the Help menu).

When the build has completed, if creating a TBWinRE CD, USB flash drive (UFD), or ISO file, click Finish to launch TeraByte's MakeDisk utility to create the desired TBWinRE boot media. Otherwise, just exit the program.

Click Next to start the process and then select the bootable media type you want to create. In the example below, a USB flash drive is selected.

Important: When creating a TBWinRE bootable USB flash drive (UFD), it's recommended to use a Partition USB Layout option (e.g. Partition - MBR FAT/FAT32 Partition). Using the No Partition mode may not allow the drive to boot correctly. If you have problems booting the UFD, please see this KB article: Using a UFD (USB Flash Drive) as installation/boot media for TeraByte Unlimited products.

Click Finish to create the bootable media. If you wish to create another boot media (e.g. you created a CD and also want a UFD), you can run MakeDisk from the TBWinRE folder (it's not necessary to recreate the build unless you've updated the installed TeraByte programs or the TBWinPE/RE Builder files).

Step 3: Using TBWinRE

If you modified the installed Windows 7 Recovery Environment (WinRE), you can boot into it by using the Windows Advanced Boot Options menu accessed via F8 when booting Windows. Select the Repair Your Computer option.

If you modified the installed Windows 8 Recovery Environment (WinRE), you can boot into it by restarting into the recovery environment (e.g. press WinKey+I, click Power, hold down Shift and click Restart, click Troubleshoot).

If you modified the installed Windows 10 Recovery Environment (WinRE), you can boot into it by restarting into the recovery environment (e.g. press the Windows key, click Power, hold down Shift and click Restart, click Troubleshoot).

If the program was able to integrate Image for Windows into the menu you can select it in the Troubleshoot section. Otherwise, select Advanced options and then the Command Prompt. Image for Windows will be run by default and you can access the other Windows options by running the System Recovery Options program from TBLauncher.

If using the TBWinRE boot media, boot to either the TBWinRE CD or the TBWinRE UFD. Booting on both Legacy BIOS and UEFI systems is supported.

Booting into TBWinRE may take several minutes, depending on the system, startup options selected, and boot media type.

The TBWinRE desktop will look similar to the screenshots below. Please note that this type of build is a relatively plain WinRE build and does not include a taskbar or Windows-type shell. TBLauncher can be used to easily run the included programs or shut down or restart the system.

Depending on the mode set for TBLauncher and the version of Windows, either the System Recovery Options program or Image for Windows will be run automatically.

The screenshot below shows TBLauncher set to WinPE mode (the default). The System Recovery Options program can be run from TBLauncher if it's needed.

 

The screenshot below shows TBLauncher set to WinRE mode (built using the Windows 7 RE). Note that when the System Recovery Options program runs you may need to enter your Windows user name and password and it may scan for compatible versions of Windows.

To exit TBWinRE, remove the TBWinRE boot media (if using a CD or UFD) and click either the Shut down or Restart button in TBLauncher.

Note: Some systems using the Windows 8 WinRE may exhibit a delay when shutting down or restarting. If this happens you can hold down the Shift key when clicking the button to force the action.

The TeraByte programs included in the build can be also run from a Command Prompt window by typing the program name and pressing ENTER: imagew, tbiview, tbimount, tbosdtw


 

Appendix 1 - Using Custom Settings

By default, TBWinPE/RE Builder expects the TeraByte programs to be at their installed/default locations. If any of these programs are not installed or are not found automatically you will need to set the correct paths.

Details on settings and options available for the build can be found in Settings.

Appendix 2 - Adding Windows Drivers

Windows Drivers can be added to the build by placing them into the Drivers folder. This folder should be located in the build folder (C:\TBWinRE in this example): C:\TBWinRE\Drivers

The Drivers folder will be searched for drivers when the build is being created. Placing the files for each added driver into their own folder is usually the simplest method. For example, if you're creating the TBWinRE build on Windows 7 and need to add 64-bit USB 3.0 drivers, you might place the driver files into C:\TBWinRE\Drivers\usb3x64 (as shown below):

Drivers must be of the INF type (.inf) and all supporting files (.cat, .pnf, .sys, .oem, .dll, etc.) must be included. All driver related files and sub-folders should be in the same folder with the .inf file. In most cases, the driver files are packaged together in a folder and you can just copy that folder into the Drivers folder (this will copy all the files and any sub-folders).

Windows installer (e.g. .msi files) or other driver package types (like .exe files) are not supported. In addition, INF files that are not valid driver packages will be ignored.

Important: Drivers must be correct for the version of WinRE being used (32-bit or 64-bit). If you're building on a 32-bit version of Windows, use 32-bit drivers. If you're building on a 64-bit version of Windows, use 64-bit drivers. Additionally, the drivers should be correct for the version of WinRE used for the build (e.g. use Windows 10 drivers if building using the Windows 10 WinRE).

Appendix 3 - The "WinRE_Backup" Folder and Other Build Folders

The WinRE_Backup folder will be created in the TBWinRE folder during the building process. It contains a backup of the original winre.wim file found on the system. It is recommended that you keep this backup in case it's needed later.

The ISO folder contains the files needed to create the TBWinRE CD, UFD, or ISO file. If desired, this folder can be deleted after the build has completed and the boot media has been created. However, if you don't delete this folder you can create (or recreate) the boot media any time by running MakeDisk from the TBWinRE folder (it's not necessary to recreate the build unless you've updated the installed TeraByte programs or the TBWinPE/RE Builder files).

The build folder is used to hold the copy of the winre.wim file during the build process. This folder is removed when the build completes.

The mount folder is used to mount the winre.wim file being modified.

The config folder contains the configuration files used by TBWinPE/RE Builder.

The Drivers_Win7PEUSB3 folder contains the downloaded USB 3 drivers for builds based on Windows 7.

Appendix 4 - Directly Booting TBWinPE/RE WIM File in Windows 7 or Later

TBWinPE/RE Builder can configure Windows to directly boot the WIM file from a standard TBWinPE or TBWinRE build when using Windows 7 or later. This allows booting into the TBWinPE/RE environment with a simple restart of Windows with no boot media required. Note: When creating a WIM to boot it's recommended to use a standard boot media build type (e.g. TBWinRE CD/UFD/ISO option). If just creating the WIM for booting it's not necessary to create the boot media when the build finishes - the WIM file (boot.wim) is located in the build's ISO\sources folder.

To utilize this feature, run TBWinPE/RE Builder (TBWinPE.exe) from the command line and specify the /bootwim parameter. Usage information is detailed below.

BOOTWIM Command Usage

/bootwim wim_path [ /run script_file ] [ /noboot ] [ /quiet ] [ /force ] [ /idt ]
/bootwim /reset
/bootwim /remove
/bootwim /?

Boots the WIM file specified by wim_path. If path or filename includes spaces, surround with quotes. WIM path can be relative or absolute and can use a drive letter or volume GUID. The location of the WIM file cannot be read-only as several support files must be created in the WIM file's folder.

run - Runs the specified script or command file after booting. If path or filename includes spaces, surround with quotes. script_file can be a .cmd/.tbs/.run script or a text file (.txt) with command line parameters for IFW. The file must be located on a partition accessible when booted to TBWinRE/PE. To specify a script file that is internal to the WIM, preface the path with [WIM] instead of a drive letter (full path must be used, starting at root). This option requires a TBWinRE/PE WIM configured to use TBLauncher v1.13+ (TBLauncher is used by default in these builds).

Keep in mind that when a script is specified to run that it will replace any TBLauncher auto-run option configured in the WIM when it was created. For example, if you had configured TBLauncher to run a RunScript.cmd file on startup, that script will not be run. However, if the InitScript.cmd script was configured it will still be run prior to the specified script.

noboot - Don't restart the system after configuring to boot WIM.

quiet - Don't display messages or prompt to restart.

force - Force system to restart. This may cause data loss if you have unsaved files.

idt - Ignore drive type (allow unsupported drive types).

reset - Clears booting of WIM on next restart.

remove - Removes TBWinPE BOOTWIM entries from BCD and clears booting of WIM on next restart if configured.

? - Displays usage information.

Examples:

tbwinpe.exe /bootwim custom.wim /force

  • Will configure the system to boot custom.wim, prompt user to restart, and force a restart.

tbwinpe.exe /bootwim offline.wim /run backup-c.txt /quiet

  • Will configure the system to boot offline.wim and run IFW using the command line parameters in backup-c.txt. User will not be prompted to restart.

  • Keep in mind that any scripts or IFW command files should reference disks and partitions as they will be when booted to TBWinPE/RE, which can be different from normal Windows. For example, backup-c.txt uses the GUID values instead of drive letters:

    /b /d:{6DC69B20-2C93-40AE-AE07-B3025C4E29D8}@0x4 /f:{363CA4D2-9012-47E0-A1B3-852AD9C4A27A}@0x2:"\Win10 Drive C" /v /desc:"Backup of Win10 partition" /hash

tbwinpe.exe /bootwim "\\?\Volume{3cdba6bf-0c87-993e-6bde-77590f490200}\IFW Offline\boot.wim"

  • Will configure the system to boot boot.wim using the volume GUID (no drive letter assigned) and prompt the user to restart.

tbwinpe.exe /bootwim iso\sources\boot.wim /run [WIM]\myscripts\backupwin10.cmd

  • Will configure the system to boot boot.wim and run the backupwin10.cmd script, which is included in the WIM in the \myscripts folder.