Creating a bootable USB memory stick with Acronis ... · Run the WinBuilder Win7PE_SE project. 2....

17
- 1 - Creating a bootable USB memory stick with Acronis TrueImage and Disk Director Jan Buelens, 12 September 2011 Introduction .................................................................................................................................................................. 2 Prerequisites ................................................................................................................................................................. 2 Step-by-step .................................................................................................................................................................. 2 What if you wanted a bootable CD instead? .............................................................................................................. 14 What does the end result look like? ........................................................................................................................... 14 Acronis tools and Winbuilder...................................................................................................................................... 16 How to add the Acronis tools to a WinBuilder project ............................................................................................... 17

Transcript of Creating a bootable USB memory stick with Acronis ... · Run the WinBuilder Win7PE_SE project. 2....

- 1 -

Creating a bootable USB memory stick with Acronis TrueImage and Disk Director Jan Buelens, 12 September 2011

Introduction .................................................................................................................................................................. 2

Prerequisites ................................................................................................................................................................. 2

Step-by-step .................................................................................................................................................................. 2

What if you wanted a bootable CD instead? .............................................................................................................. 14

What does the end result look like? ........................................................................................................................... 14

Acronis tools and Winbuilder ...................................................................................................................................... 16

How to add the Acronis tools to a WinBuilder project ............................................................................................... 17

- 2 -

Introduction I wrote this document because I found the Acronis manuals and knowledge base documents less than totally clear in a few places - e.g. it took me considerable trial & error to add Disk Director to an existing WinPE image. Also, the Acronis documents take you all the way to burning a DVD but if you want a bootable USB memory stick (aka flash drive, thumb drive etc), you still need to figure out the last few steps for yourself.

There are two possible use cases to be considered:

1. You have an existing WinPE boot image (wim file) and you want to add the Acronis tools to it. 2. You want to build a new WinPE image from scratch.

This document addresses both use cases. There is only one minor difference between them. See Step 3: if you have an existing WinPE image, you need to sneak it into the process as described.

Although the document focuses on building a memory stick, there is also a section on how to build a bootable CD instead.

Prerequisites Before you begin, you should have the following installed:

• Windows 7 or Vista. In my case, I have Windows 7-64, but for the purpose of this document, it should not make a difference which version of Windows 7 or Vista you have

• WAIK • Acronis True Image Home 2011 • Acronis True Image PlusPack • Acronis Disk Director 11 Home

Step-by-step 1. Open Deployment Tools Command Prompt as shown in the screenshot below. (Older version of WAIK call this

Windows PE Tools Command Prompt).

- 3 - 2. In the command prompt window, type copype x86 <folder_of_your_choice>. The folder of my choice was

c:\winpe. I'll just refer to it as c:\winpe in the rest of this document (printed in blue), but keep in mind that your choice may be different. The copype command creates a file structure as shown in the 2nd screenshot below1

3. Notice in particular the winpe.wim file. This is the default WinPE image that the copype command has copied from C:\Program Files\Windows AIK\Tools\PETools\x86. If you want to add the Acronis tools to an existing WinPE image rather than build a new image, copy your existing image to c:\winpe and rename it winpe.wim.

.

4. Start the PlusPack's WinPE Builder. The welcome screen suggests that you're going to end up building an ISO image - presumably to burn a DVD from - fear not, you can also create a bootable USB drive.

1 The copype command creates the <folder_of_your_choice> for you. It will complain if the folder already exists.

- 4 -

5. On the Specify a path to the folder with the WinPE files dialog, point to the ISO subfolder of c:\winpe. It was created for you by the copype command.2

2 This is one part of the exercise where your instinct won't help. It is far from clear what is meant with "the folder with the WinPE files". We could do with a few words of explanation in the dialog box. The help file isn't much help either. The other confusing thing is that, even though the dialog is prompting for a folder name, it also accepts a wim file.

- 5 -

The program's behaviour is slightly more complicated than suggested in the screenshots. Let's summarise things as follows:

• If you select a wim file, then the program will use that wim file • If you select the ISO folder and there is a boot.wim file in the ISO\ sources subfolder, then the program

will use that boot.wim file • If you select the ISO folder and there is no boot.wim file in the ISO\ sources subfolder, then the program

will use the winpe.wim file in the ISO folder's parent

- 6 - 6. Step through the next few dialogs as shown in the screenshots below.

- 7 -

7. After a few minutes, the new image is ready. Because we want to use it as the input for the next step (add Acronis Disk Director), we need to move it to the c:\winpe folder and rename it to winpe.wim.

- 8 -

8. Start Acronis Disk Director's Media Builder as shown below. Step through the dialog screens as shown in the screenshots.

- 9 -

Caution: before you go any further, verify that there is no boot.wim file in the sources subfolder of the ISO folder (c:\winpe\ISO\sources). If the program finds a boot.wim there, it will use that boot.wim, not the c:\winpe\winpe.wim that we want it to use.

- 10 -

- 11 -

9. As you click Proceed, Media Builder takes c:\winpe\winpe.wim (the one to which we have already added TrueImage), adds Disk Director and creates a new wim file (AcronisWIMMedia.wim in folder c:\winpe\ISO).

- 12 -

10. When the new image is ready, move it to the sources folder (subfolder of c:\winpe\ISO) and rename it to boot.wim.

11. Prepare the USB memory stick3

3 Or did you want a bootable CD instead? In that case, skip to the next nection, "What if you wanted a bootable CD instead"

. Insert the device. First, we need to know its disk number. Open a command prompt and type diskpart. At the diskpart prompt, type list disk. The output will look something like this:

- 13 -

Based on its size, we decide that our USB memory stick is disk 3.

Caution: take extreme care to get the Disk number right. You don't want to wipe the wrong drive!

12. "Select" the disk. At the diskpart prompt, type select disk n, where n is the disk number that we determined in the previous step (3 in the example). To double check that we have the correct disk, type detail disk. You get something like this:

Looks good - the selected drive - the one we're about to wipe - really is the intended USB drive, not one of our hard drives.

DISKPART> detail disk USB Flash Disk USB Device Disk ID: CF3F7911 Type : USB Status : Online Path : 0 Target : 0 LUN ID : 0 Location Path : UNAVAILABLE Current Read-only State : No Read-only : No Boot Disk : No Pagefile Disk : No Hibernation File Disk : No Crashdump Disk : No Clustered Disk : No Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- ------- Volume 9 J FAT32 Removable 975 MB Healthy

- 14 - 13. Type the following commands at the diskpart prompt:

14. Copy the ISO folder to the USB drive: xcopy c:\winpe\ISO J:\ /s /e (again assuming that J: is the drive letter for the USB memory stick).

15. Done. You now have a bootable USB memory stick with Acronis True Image and Acronis Disk Director.

What if you wanted a bootable CD instead? This document has focused on building a bootable USB memory stick because that's what the author wanted to achieve. If you wanted a bootable CD instead, you should not need this document because the Acronis builder tools take you all the way to building an ISO file. Or do they? Only if you want a CD with either Disk Director or TrueImage. If you want a CD with both, you'll probably get there after some trial & error. But you may find it easier to use this document.

With one difference. Steps 11-14 of the previous section are specific to building a USB memory stick. Replace steps 11-14 with the following, typed from the command line4

oscdimg -n -bc:\winpe\etfsboot.com c:\winpe\ISO c:\winpe\winpe.iso

:

The final parameter of the command line (c:\winpe\winpe.iso in the example) is the ISO file to be created. Where you have it created is your choice, it doesn't have to be c:\winpe.

The final step is using a CD burner tool of your choice to burn the ISO file to CD.

What does the end result look like? The two screenshots below show what you get when you boot from the USB memory stick or CD. As WinPE boots, the two Acronis tools launch automatically. Other than that, all you get is a command prompt.

4 oscdimg is part of WAIK. Type this command in a command prompt opened from the "Deployment Tools Command Prompt" shortcut as shown on page 1.

Diskpart commands to initialise the USB memory stick. Remember, before we got here, we had already selected the disk (select disk n). The select disk command is therefore not shown again. The assign command will work fine without a drive letter (J in the example), but you may want to specify it explicitly so it stays the same as before.

Again: Take extreme care typing these command. Make sure you have the correct disk number selected. The clean command wipes the drive!

clean create partition primary select partition 1 active format quick fs=fat32 assign letter=J exit

- 15 -

- 16 - As you can see in the 2nd screenshot above, there is a file manager called A43 that you can launch from the command line. As far as I have seen, it is not mentioned in the Acronis product documentation, probably because it is freeware and Acronis has only thrown it in as an unsupported extra.

The A43 file manager is a lot more comfortable than the command line to browse your computer's hard drives, map network drives etc. Would you want A43 to launch automatically? That can be achieved by appending a line to the startnet.cmd file in the wim image (\windows\system32\startnet.cmd). At the very end of this document, there is a quick how-to on mounting and editing a wim file.

Acronis tools and Winbuilder Even with the A43 file manager, a basic WinPE remains a sparse environment. If you want a more advanced WinPE environment, with a nice GUI, a windows explorer-like shell and much more, have a look at Winbuilder. This is a freeware application designed to build WinPE based bootable media. It is highly configurable, with many options to include a variety of tools. The WinBuilder project that is probably the most appropriate is the one known as Win7PE_SE (http://reboot.pro/12427/).

Below is a screenshot of a WinBuilder Win7PE_SE based WinPE with the Acronis tools added.

- 17 -

How to add the Acronis tools to a WinBuilder project There is a lively WinBuilder community. Among the many things you will find on the WinBuilder forum are scripts that allow you to add Acronis Disk Director and TrueImage to a WinBuilder project5

Here is some more detail of the steps to follow

. I have not tested these scripts. They may well work, but I have preferred to use the procedures described in this document to add the Acronis tools to a wim image previously built by WinBuilder. The advantage is that in this way, we rely on the Acronis Builder tools only, rather than on a third party script.

1. Run the WinBuilder Win7PE_SE project. 2. Assuming that you unpacked the WinBuilder package to C:\WinBuilder, WinBuilder's end product is a wim

file (boot.wim) in C:\WinBuilder\Target\Win7PE_SE\sources. Use this file as input to the Step-by-Step process described at the start of this document.

3. One disadvantage of not using WinBuilder scripts to add the Acronis tools is that no icons are added to desktop/start menu. To add icons, you need to edit the windows\system32\Win7PE.cfg file in the wim file and add 4 lines to the [shortcuts] section:

You need to understand how to use the imagex command to mount a wim image. Here's a crash course if you haven't done this before:

• Open Deployment Tools Command Prompt (see Step-by-Step, page 2 of this document). • imagex /mountrw <wim_file> 1 <folder> • The wim image is now mounted in <folder>. Edit the Win7PE.cfg file as described above. • imagex /unmount /commit <folder>

5 Provided of course that you have the Acronis tools installed on your computer! This is not a way to get an unlicensed copy of the tools.

Desktop|Acronis True Image 2011|%SystemDrive%\Program Files\Acronis\TrueImageHome\trueimage_starter.exe||

Desktop|Acronis Disk Director 11|%SystemDrive%\Program Files\Acronis\DiskDirector\trueimage_starter.exe|%SystemDrive%\Program Files\Acronis\DiskDirector\ManagementConsole.exe|

Acronis|True Image Home 2011|%SystemDrive%\Program Files\Acronis\TrueImageHome\trueimage_starter.exe||

Acronis|Disk Director Home 11|%SystemDrive%\Program Files\Acronis\DiskDirector\trueimage_starter.exe|%SystemDrive%\Program Files\Acronis\DiskDirector\ManagementConsole.exe|