Saturday, 23 May 2015

Testing E2B UEFI and MBR\BIOS automated Windows installs using XML answer files

E2B copies the contents of your chosen XML file into the 100K blank  \AutoUnattend.xml file before it boots from the ISO file.
When you run a Windows Install ISO from E2B on a Removable USB drive on a real system, Windows Setup\PE will automatically read the \AutoUnattend.xml file located at the root of the USB drive.

However, If you try to run a Windows 7/8/8.1 Windows install ISO under a VM (e.g. Virtual Box), you will find that you will need to type SHIFT+F10 and then run \_ISO\e2b\firadisk\LOADISO.CMD in order to get the ISO to load as a virtual disk. This is because the \AutoUnattend.XML file is completely ignored by Windows because it does not 'see' the USB drive as a 'Removable' drive.

The problem is that if there are any other settings in the XML file (e.g. Product Key or other automated settings), then these settings are not picked up by Setup because the XML file is never read. This means we cannot run a fully unattended Windows install using one of the unattended XML files that we can create using the Windows Answer File Generator and XMLtoE2B.

As I didn't have a spare UEFI system to test automated installs with, I worked out a way to use Virtual Box instead...


Testing unattended installs under VBox

In order to perform a fully automated install under Virtual Box, we need to convert the ISO to a .imgPTN file using the MPI_FAT32 shortcut.

Once converted we can add the XML file into the image boot.wim file as \AutoUnattend.xml.

The XML file must specify an OS install to Disk 1 however and not Disk 0 - otherwise it will wipe the E2B USB drive!

At the bottom of this page, I have documented  what steps I performed to test a fully automated Windows install under VBox, by booting via VBox from a E2B USB drive.

I actually tested with a Windows 8 32-bit .imgPTN file and an XML file that automatically wiped the virtual disk and created a GPT partition using a UEFI 32-bit VM. Using XMLtoE2B, it is easy to add in a GPT partition setup even though the WAFG only supports MBR partitions.

XMLtoE2B allows you to insert different disk configurations for both MBR and GPT partitions and make it really easy to make semi- or fully-automated unattend answer files!