Saturday 26 April 2014

Add Windows 7/8 To Go images to your Easy2Boot USB drive

If you have a large E2B USB Hard Disk drive with plenty of space, why not add lots of Windows To Go images to it? Then you can boot to lots of different versions of Windows on any system that is capable of USB booting (even from a USB 3.0 port if it is Win8ToGo).

Note - see this blog post for an easier method which uses WinToUSB.

As a guide, you can follow the RMPrepUSB web site tutorials to make a USB drive (I recommend Win8ToGo as it has USB 3.0 support, more drivers and is easier to install):

When the USB drive has been made (and after you have booted it to complete the OOBE setup), convert the USB drive into a .imgPTN file using MakePartImage.

-- o --

If you don't have a spare USB drive, here is what I did to make a Win8ToGo .imgPTN file without needing to use a spare USB drive. I have a 2TB WD Passport external USB 3.0 HDD as the E2B drive, so I have plenty of space for images.

Note: Win8.1ToGo may have problems booting from a 'Removable' type of USB Flash drive (e.g. never-ending circling dots!). Use a USB Flash drive of the 'Fixed Disk' type or a USB HDD or USB SSD drive.

1. Install ImDisk onto your Windows system - ImDisk is also included in the MPI Tool Pack which you will need to download from the easy2boot site anyway in step 4.

2. You need to create a new empty image file called (say) Win8ToGo.imgPTN (use your fastest hard disk/SSD for this, not the USB drive). To do this, use Control Panel - run the ImDisk Virtual Disk Driver and create a new virtual disk (I used 20GB which was a big mistake! Due to a bug in grub4dos, the file size must NOT be exactly divisible by 4GB or else E2B will not list it - so do not use exactly 20GB like I did  - use 10 or 21 but not 4,8,12,16 or 20!!!!!).

3. Format the new volume as NTFS. You can use the ImDisk Format button for this, or just use Windows Format when Windows complains about an unformatted volume. Note: this may take some time even if 'Quick Format' is used - just wait!

Let us assume it was mounted as M:...

4. Copy the contents of the MakePartImage csm folder to the root of your new volume - you should have now, at least, these 2 files and folder:
M:\e2b folder

Note: You may want to edit the menu.lst file at this point - look for a PAYLOAD= string and replace it with the title you want for the menu - e.g. Win8ToGo Enterprise. Otherwise your menu title will be either 'PAYLOAD=' or will just not appear if using v1.36 or later.
e.g. in v1.36, change the line in \menu.lst to:

set PAYLOAD=WinToGo 8.1 Enterprise

5. In the ImDisk Control Panel applet, click Remove.

6. Copy the .imgPTN image file to your \_ISO\MAINMENU folder on your E2B drive and run WinContig to make it contiguous (RMPrepUSB - Ctrl+F2)

7. Boot from your E2B drive (you can use RMPrepUSB - QEMU for this or any real system) and select the WinToGo.imgPTN file - after switching to the new image, you should see the CSM menu load. Quit QEMU or your VM when done and Eject the USB drive using RMPrepUSB (or Safely Remove in the System Tray).

Tip: If you get the message 'ERROR: No Grub4dos installed to MBR of this drive!'  then simply re-install grub4dos to the MBR using RMPrepUSB - Install Grub4dos - Y.

8. Physically unplug the E2B USB drive and re-connect it. You should see a \e2b folder, etc. files in Windows Explorer now, inside the new volume. If you see a \_ISO folder then you have not selected and run the .imgptn file correctly!

9. The disk partition needs to be made Active (bootable) for WindowsToGo's first boot. If the partition is not Active, you will get a "Windows could not complete the installation. To install Windows on this computer, restart the installation." message when you first try to boot WinToGo.

If you the use .imgPTN file extension then the partition should already be marked as Active and you can skip this step...

If it is not already Active, run the Windows Disk Management plug-in (use Ctrl-K in RMPrepUSB or use Start menu - This PC\My Computer - Manage - Storage - Disk Management). Now right-click on the USB partition (it will appear to have unformatted space either side of it - DON'T attempt to format that unused space or you will erase E2B!) - and choose 'Mark Partition as Active'

10. Mount your Win7/8 ISO using ImDisk (right-click and choose 'Mount as ImDisk Virtual Disk') - I already had and used the snappily named x86 32-bit 90-day Enterprise Evaluation version called 9600.16384.WINBLUE_RTM.130821-1623_X86FRE_ENTERPRISE_EVAL_EN-US-IRM_CENA_X86FREE_EN-US_DV5.ISO. You can download an 8.1 version from here.

Tip: I used a 32-bit version so I could boot it on all types of systems.

Let us assume this is mounted by ImDisk as drive letter L:

(you can use any ISO mounting utility, including the built in Win8 one, to mount the ISO - you don't have to use ImDisk).

11. Now we need to 'Apply' the windows files to the volume and run BCDBOOT - follow the tutorial to do this. As I was running on a Win8.1 system, I used these commands, where the USB volume was E:

dism /apply-image /imagefile:L:\sources\install.wim /index:1 /Applydir:E:

bcdboot e:\windows /s e: /f ALL /v

The actual commands you need to use will depend on what versions of ImageX or Dism or BCDBoot you have (please refer to the tutorial).

Note: If you move the .imgPTN file or copy it, you will need to repeat the bcdboot command to correct the BCD so that it boots correctly.

Example using H: as USB drive and N: as the Windows 8 source

We are now good to go. The E2B drive is still in the 'CSM' image mode. When you boot it you will see the CSM menu.

If you select the 'BOOT from this drive' menu option it will boot to Windows To Go (in MBR mode). It will restart a few times, so always remember to boot back to the USB drive each time. For a description of the Setup stages and how to configure it further, see here.

To get back to the E2B menu, simply select the 0 EASY2BOOT menu option.

So now we have an E2B USB HDD which we can boot any number of different WinxToGo images on or simply copy the .imgPTN file to another E2B drive! Note: If you copy the .imgPTN to a different USB drive and get a 0xc000000e 'Repair' error immediately on boot, you will need to re-run the BCDBOOT command on the image to fix it for the new drive.

P.S. If you want to boot from the WinToGo images but still leave partitions 2 and 3 on your E2B USB Hard Disk in place so that they can be accessed once you have booted to WinToGo, use the .imgPTNA23 file extension for the WinToGo image files instead of .imgPTN.

To make a WinToGo that will boot on both a MBR and UEFI system, you can create two partitions and add both to the E2B drive (e.g. ptn1=FAT32, ptn3=NTFS).

No comments:

Post a Comment