Friday, December 19, 2014

Repairing a failed Windows 2008/Windows 2008 R2 with ISO ( Specially Physical Servers)

Recreating an OS ISO to Boot the Physical Server with the Drivers

This will be useful if you are about to reinstall/repair a existing physical Servers if in case of any issues:

 Recently I was tasked to repair a corrupted registry on a Windows 2008 Server via iLo but unable to do it beceause the OS CD/ISO image doesnt contain the Drivers of the Physical server's HDD Controller. Booting the Server from the Vendor provided ISO (ex.. HP SmartStart ) will also not provide me an option to repair the existing OS instead i can only start the installation from Scratch.


So i worked out on this solution to encoroporate the Physical Servers HDD Drivers into the ISO of the Windows 2008 R2 after which i was able to boot the Server from the ISO which detected the drivers and i could do the repair process.


 This post will cover exactly how to accomplish the task. of extracting of the Windows Server 2008 R2 ISO and add the drivers needed for the installation.
 

Pre-requisites:
First create the following folders:


C:\temp2\WindowsISO (Unpack your iso to this folder)
C:\temp2\drivers (Add all driver folders in this folder the drivers have to be in .inf format)
C:\temp2\wim (Is a temp folder for the WIM file)
C:\ temp2\WindowsISOdrivers (the new .ISO file will be created here)


Download and install the Windows Automated Installation Kit (http://www.microsoft.com/en-US/download/details.aspx?id=5753)


The Process:
Start Deployment Tools Command Prompt from AIK Deployment Tools > Deployment Tools Command Prompt from Start menu
First we need to show what versions are in the install.wim file. Earlier we stated that this is for Windows 2008 R2 Standard (Full Edition). We can see what is available using the dism command.
C:\Program Files\Windows AIK\Tools\PETools>dism /Get-WimInfo /WimFile:C:\temp2\WindowsISO\sources\install.wim

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Details for image : C:\temp2\WindowsISO\sources\install.wim

Index : 1
Name : Windows Server 2008 R2 SERVERSTANDARD
Description : Windows Server 2008 R2 SERVERSTANDARD
Size : 10,510,509,480 bytes

Index : 2
Name : Windows Server 2008 R2 SERVERSTANDARDCORE
Description : Windows Server 2008 R2 SERVERSTANDARDCORE
Size : 3,563,998,339 bytes

Index : 3
Name : Windows Server 2008 R2 SERVERENTERPRISE
Description : Windows Server 2008 R2 SERVERENTERPRISE
Size : 10,510,890,698 bytes

Index : 4
Name : Windows Server 2008 R2 SERVERENTERPRISECORE
Description : Windows Server 2008 R2 SERVERENTERPRISECORE
Size : 3,563,972,455 bytes

Index : 5
Name : Windows Server 2008 R2 SERVERDATACENTER
Description : Windows Server 2008 R2 SERVERDATACENTER
Size : 10,510,997,874 bytes

Index : 6
Name : Windows Server 2008 R2 SERVERDATACENTERCORE
Description : Windows Server 2008 R2 SERVERDATACENTERCORE
Size : 3,564,010,572 bytes

Index : 7
Name : Windows Server 2008 R2 SERVERWEB
Description : Windows Server 2008 R2 SERVERWEB
Size : 10,520,088,768 bytes

Index : 8
Name : Windows Server 2008 R2 SERVERWEBCORE
Description : Windows Server 2008 R2 SERVERWEBCORE
Size : 3,562,616,654 bytes

The operation completed successfully.
As we can see from the output Standard Edition is index 1, so now we can mount the install.wim.
Mount the install.wim file from C:\temp2\WindowsISO to C:\temp2\wim


 c:\> imagex /mountrw C:\temp2\WindowsISO\sources\install.wim 1 C:\temp2\wim

 

http://lifeofageekadmin.com/wp-content/uploads/2014/02/w2k8iso_1.png

Add Drivers with dism


 cd C:\temp2\drivers\hp
 dism /image:C:\temp2\wim /add-driver /driver:. /recurse 

 http://lifeofageekadmin.com/wp-content/uploads/2014/02/w2k8iso_2.png

Now un-mount the WIM Image
 imagex /unmount /commit C:\temp2\wim

 Create the new ISO file:

 oscdimg -n -m -bc:\temp2\WindowsISO\boot\etfsboot.com C:\temp2\WindowsISO C:\temp2\WindowsISOdrivers\en_windows_server_2008_r2.iso

Burn the result to a DVD and the drivers should be available for detection at installation!

No comments:

Post a Comment