A problem I have run into recently with installing Server 2012 R2 as a virtual machine on Server 2012 R2 HyperV server was I could not get the iso file to boot. Well, at least that is what I though the problem was. The virtual DVD drive with the Server 2012 iso was at the top of the boot order but it seemed to keep skipping it. After searching, and not particularly well because I barely understood what I was searching for, I found a TechNet blog that was describing my problem here: http://blogs.technet.com/b/jhoward/archive/2013/11/11/hyper-v-generation-2-virtual-machines-part-9.aspx. Long story short the gen 2 hosts are popping up the “Press any key to boot off of CD/DVD” message but not waiting for someone to press a key. Therefor it skips the CD/DVD and goes to other options, namely a blank hard drive then usually a network card. So it turns out there is a solution to this, changing the boot files to no longer prompt for a key press but to start your setup automatically.
To do this you need to get the Windows Automated Install Kit (AIK). Download that here: http://www.microsoft.com/en-us/download/details.aspx?id=39982 and of the many options you only really need to install the Deployment Tools and the Windows Preinstallation Environment (Windows PE) parts. Once these are installed here is how to modify your Server 2012 ISO.
- Unzip the contents of your Server 2012 or 2012 R2 ISO to a directory such as c:\Win2012
- Navigate to C:\Win2012\efi\microsoft\boot
- Rename cdboot.efi to cdboot_prompt.efi then rename cdboot_noprompt.efi to cdboot.efi
- Rename efisys.bin to efisys_prompt.bin then rename efisys_noprompt.bin to efisys.bin
- Open up the “Deployment and Imaging Tools Environment” as a administrator (under Start -> Windows Kits -> Windows ADK)
- Type the following command to create a new iso file called Win2012-NoPrompt.iso in the root of your C drive that will no longer prompt for a key:
oscdimg -bC:\Win2012R2\boot\etfsboot.com -m -o -u2 -lServer2012R2 -udfver102 -bootdata:2#p0,e,b"C:\Win2012R2\boot\etfsboot.com"#pEF,e,b"C:\Win2012R2\efi\microsoft\boot\efisys.bin" C:\Win2012R2 c:\Win2012R2-NoPrompt.iso
- Exit the command prompt
You can also use the Windows AIK to preload updates into your image or drivers but that’s a topic for another post.