Wednesday 13 May 2009

Creating a multiboot USB drive - Part three: using WinSetupFromUSB to create the bootable USB drive

Essential items & software for this part:

This is the part where we pull together the previous two parts and actually create a bootable USB drive, using WinSetupFromUSB to do most of the work for us.

Part 3.1 - Use WinSetupFromUSB to copy the Windows installation to the USB drive and make it bootable

Connect your USB drive to the computer and launch WinSetupFromUSB. If you haven't prepared your USB drive properly, you will see the error "No USB disks dectected or not properly formatted" in the USB Disk Selection field - go back to part one and follow the instructions there. If you see your USB disk in this field, then it has been correctly prepared.

Select the checkbox next to Vista/7 setup/PE/Recovery ISO, and then enter E:\LonghornAIO\Distribution (or wherever you created your working folder in the previous step) into the box. You will be warned if the source is too large to fit on your USB drive, and will not be able to proceed, so make sure your install.wim is small enough to fit on the drive. WinSetupFromUSB should now look like this;



Notice the number in the bottom left corner? That's how much space the entire distribution folder and the required support files will take on your USB drive. I am using my Windows Vista Ultimate x64 & x86 and Server 2008 Enterprise x64 & x86 install.wim that I created in the previous step. Click GO to begin the process. If your USB drive is disk 10 or above, you may receive the following error;



It appears that the grubinst.exe that WinSetupFromUSB uses can only access the first 10 drives in your computer. In my case, I have a USB card reader with lots of slots, each given it's own drive number by windows. Disconnecting it and then connecting my USB drive instead resolved the issue.

WinSetupFromUSB will copy all of the files from your E:\LonghornAIO\Distribution directory to the USB drive, which can take a long time if you have a slow USB drive. You can check the progress at the bottom of the window;



WinSetupFromUSB may appear to crash when it is copying the wim files - don't worry, it will respond once the file transfer has finished.

After a few minutes (or longer, if you have a slow USB drive and a large install.wim) WinSetupFromUSB will report that the process is complete. You now have a bootable USB drive from which you can install whatever versions of Windows you integrated into the install.wim. If that is all you want to use the USB drive for, then you do not need to proceed any further. If you want to add Windows XP/2003 or any 3rd party utilities, read on. Now would be a good time to check that the USB drive works as intended - insert it into a computer that supports booting from USB and select it as the boot device. You should see the "Windows is loading files..." message, and eventually be taken to Windows Setup.

Part 3.2 - Install Grub4DOS onto the USB drive

In order to be able to select different options for boot, we need to install a boot loader and Grub4DOS is one of the most popular ones. Download Grub4DOS and the Grub4DOS Toolbox, and extract them into a directory on your hard disk, E:\Tools for example. Make sure that you put both in the same directory, otherwise the Grub4DOS Toolbox will be unable to find Grub4DOS.

Connect your USB drive and launch the Grub4DOS Toolbox. From the Tasks menu, select Add Grub4DOS to bootmgr boot menu (Vista/2008 above), then select the bootmgr file on your USB drive - if you are running Vista/2k8/7 you will also see C:\bootmgr as an option, however make sure you do not select it. Leave the name of the Grub4DOS mbr file and title entry as default, and select the Boot by default option. You can select whatever timeout suits you; I have selected 5 seconds. Once you've set these options, you should see something similar to this;



Click Do It! to begin the process. Grub4DOS Toolbox will report that the operation was a success. Click Exit to close Grub4DOS Toolbox. Now browse to the directory you extracted Grub4DOS to and copy gldr.mbr to the root of your USB drive. When you boot from the USB drive, you should see the following menu;



If you select Windows Setup the Windows Setup will run, and you will be able to install your Windows Vista/2k8/7 images as before, however if you select Grub4DOS you will see the default Grub4DOS menu. Now we have a bootable USB drive with the correct boot loader, it's time to start adding our additional boot options to the USB drive. I'll explain how to do so in part four.

No comments:

Post a Comment