Add Drivers / Insert Drivers to Windows Server ISO Image
I had written a custom script sometime ago which creates a custom Windows Server ISO for 2016, 2019 or 2022 integrating server specific values like Server Name, IP Address, Subnet Mask etc in the answer file called Autounattend.xml file and it also runs some post installation tasks which takes care of installation of few essential agents that we need in our environment.
Recently we got couple of 15th Generation of Dell Physical servers (PowerEdge R750) and we were requested to install Windows Server 2019 on it.
The Windows Server 2019 ISO that we had was few years old and did not contain RAID controller drivers for this model. Due to the absence of RAID Controller drivers, the Installation would fail at the very first step (Disk Selection) mentioned in the Autounattend.xml file which is to wipe clean HDD 0 and start OS installation on it.
Screenshot below shows that the Disk Configuration setting was not initiated.
We can press Shift + F10 and launch a Command prompt
window from the WIN PE/ Windows Setup screen to do some basic troubleshooting
and confirm that the ISO is not able to find the Disk Drive. Let’s run DISKPART, Running List Disk under DISKPART now
shows that there are no fixed drives visible. We can also try
launching Notepad and try browsing to the filesystem and confirm the Disk
Drives are not visible. No fixed Drives are
available other than the ISO and Temporary volume which contains Installation
data. We can now head to
iDRAC of the server and see that the Virtual Disk (RAID Volume) is created and
available there.
Lets head to Storage > Virtual Disks > and confirm
Virtual Disk’s availability.
Lets find out what
RAID controller model is there on the server and then we can find out drivers
for it from Dell’s website.
Lets log On to https://www.dell.com/support/home/en-in?app=drivers
and find the OS Drivers for this RAID Controller.
Lets download the Driver listed below:
Try executing the Driver executable file (As Administrator) that we just downloaded
for this Raid Controller Model.
This step can be done on any machine (Laptop/Deskop) since
we just want to extract the content from the Driver Executable file.
Let us just Extract the content Specify a Folder to extract the content: Here are the extracted content, We don’t need everything
from here and are just interested in the payload directory which contains the
.cat, .sys and .inf files (actual Drivers files).
Here are the contents that we actually need.
Now is the time to start with the process of inserting or
adding these drivers in the ISO. Please not that this is a little complicated process but I
will try to explain it in the easiest way that I can 😊.Let us mount the Windows Server 2019 ISO file by double clicking or
Right clicking and selecting Mount from Windows explorer.
Copy the file boot.wim which is in the sources folder located
at the root of ISO (E:\sources\boot.wim) to a temporary location. Copy the driver files in a folder that we extracted from the
Driver Executable file that we downloaded from Dell. Create a Temporary folder which will be used for Expanding
the content of the boot.wim file. Here is the content of all three folders that we have
created so far:
· 2019bootwimtemp à This is a temporary
folder where boot.wim file will be unpacked and used for adding drivers.
· 2019bootwim à This is a folder where
we have copied boot.wim file from the sources directory at the root of the ISO.
· PERC755 Ã This is the folder
where we have the extracted driver content which we downloaded from Dell.
Let’s Start with the actual process of adding drivers to the
boot.wim File now. First of all lets see what all Indexes we have in the
Boot.wim file. We can see from the below Screenshot that there are 2
indexes, PE (Pre Boot Environment) and Setup (Setup Environment).
C:\>dism /get-wiminfo
/wimfile:c:\temp\2019bootwim\boot.wim
We must Mount the first Index from boot.wim file now to the
Temporary folder that we created earlier.
C:\>dism /mount-image
/imagefile:c:\temp\2019bootwim\boot.wim /Index:1
/mountdir:c:\temp\2019bootwimtemp
Lets add the driver files from the PERC755 directory to the
first index.
C:\>dism
/image:c:\temp\2019bootwimtemp /add-driver /driver:C:\Temp\PERC755 /recurse
It might take few moments to integrate the drivers depending
on the number of files it need to process.
Once the addition process is completed, We can verify to see
if the drivers are getting listed now.
C:\>dism
/image:c:\temp\2019bootwimtemp /get-drivers
If things look good then we can finally commit the changes
so that the added drivers are integrated and the content from the Temporary
folder are repacked and recreate boot.wim file.
C:\>dism /unmount-image
/mountdir:c:\Temp\2019bootwimtemp /commit
We can perform similar procedure to add drivers to the
second index also which is for Setup so that when the ISO is used for
installation it can actually find the Disk Drive on the RAID Controller.
Once the final Step of Repacking boot.wim is completed, We
can simply open the Original ISO of Window Server 2019 with any tool like
UltraISO, Portable ISO, ISO Burn etc.. and replace the original boot.wim file inside
the ISO with the updated one that we recreated in previous steps.
You can refer to following posts for more details on how to
do it:
https://adminthing.blogspot.com/2020/01/create-bootable-windows-iso.html
https://adminthing.blogspot.com/2020/06/modify-windows-ISO.html
We can now boot the server with the updated ISO and it
proceeds to OS installation passing through the Disk selection part.
Although the Installation process has already started but we
can still validate if the Disk drive is visible to Setup. Press Shift + F10 and Try with DISKPART > List disks or
launch Notepad and try browsing to windows Explorer and see the Disk Drive
available there 😊.
Here are all the steps that we did to add drivers to the ISO file.
Microsoft Windows [Version 10.0.14393](c) 2016 Microsoft Corporation. All rights reserved.
C:\Windows\system32>cd\
C:\>
C:\>dism /get-wiminfo /wimfile:c:\temp\2019bootwim\boot.wim
Deployment Image Servicing and Management toolVersion: 10.0.14393.4169
Details for image : c:\temp\2019bootwim\boot.wim
Index : 1Name : Microsoft Windows PE (x64)Description : Microsoft Windows PE (x64)Size : 1, 614, 837, 901 bytes
Index : 2Name : Microsoft Windows Setup (x64)Description : Microsoft Windows Setup (x64)Size : 1, 774, 230, 404 bytes
The operation completed successfully.
C:\>dism /mount-image /imagefile:c:\temp\2019bootwim\boot.wim /Index:1 /mountdir:c:\temp\2019bootwimtemp
Deployment Image Servicing and Management toolVersion: 10.0.14393.4169
Mounting image[==========================100.0%==========================]The operation completed successfully.
C:\>dism /image:c:\temp\2019bootwimtemp /add-driver /driver:C:\Temp\PERC755 /recurse
Deployment Image Servicing and Management toolVersion: 10.0.14393.4169
Image Version: 10.0.17763.1
Searching for driver packages to install...Found 2 driver package(s) to install.Installing 1 of 2 - C:\Temp\PERC755\MegaSas35.inf: The driver package was successfully installed.Installing 2 of 2 - C:\Temp\PERC755\nodev.inf: The driver package was successfully installed.The operation completed successfully.
C:\>C:\>C:\>C:\>C:\>dism /image:c:\temp\2019bootwimtemp /get-drivers
Deployment Image Servicing and Management toolVersion: 10.0.14393.4169
Image Version: 10.0.17763.1
Obtaining list of 3rd party drivers from the driver store...
Driver packages listing:
Published Name : oem0.infOriginal File Name : megasas35.infInbox : NoClass Name : SCSIAdapterProvider Name : AVAGO TECH.Date : 8/10/2021Version : 7.719.6.0
Published Name : oem1.infOriginal File Name : nodev.infInbox : NoClass Name : SystemProvider Name : LSI Corp.Date : 8/10/2021Version : 7.719.6.0
The operation completed successfully.
C:\>C:\>C:\>C:\>dism /unmount-image /mountdir:c:\Temp\2019bootwimtemp /commit
Deployment Image Servicing and Management toolVersion: 10.0.14393.4169
Saving image[==========================100.0%==========================]Unmounting image[==========================100.0%==========================]The operation completed successfully.
C:\>dism /get-wiminfo /wimfile:c:\temp\2019bootwim\boot.wim
Deployment Image Servicing and Management toolVersion: 10.0.14393.4169
Details for image : c:\temp\2019bootwim\boot.wim
Index : 1Name : Microsoft Windows PE (x64)Description : Microsoft Windows PE (x64)Size : 1, 614, 948, 170 bytes
Index : 2Name : Microsoft Windows Setup (x64)Description : Microsoft Windows Setup (x64)Size : 1, 774, 230, 404 bytes
The operation completed successfully.
C:\>dism /mount-image /imagefile:c:\temp\2019bootwim\boot.wim /Index:2 /mountdir:c:\temp\2019bootwimtemp
Deployment Image Servicing and Management toolVersion: 10.0.14393.4169
Mounting image[==========================100.0%==========================]The operation completed successfully.
C:\>dism /image:c:\temp\2019bootwimtemp /add-driver /driver:C:\Temp\PERC755 /recurse
Deployment Image Servicing and Management toolVersion: 10.0.14393.4169
Image Version: 10.0.17763.1
Searching for driver packages to install...Found 2 driver package(s) to install.Installing 1 of 2 - C:\Temp\PERC755\MegaSas35.inf: The driver package was successfully installed.Installing 2 of 2 - C:\Temp\PERC755\nodev.inf: The driver package was successfully installed.The operation completed successfully.
C:\>dism /image:c:\temp\2019bootwimtemp /get-drivers
Deployment Image Servicing and Management toolVersion: 10.0.14393.4169
Image Version: 10.0.17763.1
Obtaining list of 3rd party drivers from the driver store...
Driver packages listing:
Published Name : oem0.infOriginal File Name : megasas35.infInbox : NoClass Name : SCSIAdapterProvider Name : AVAGO TECH.Date : 8/10/2021Version : 7.719.6.0
Published Name : oem1.infOriginal File Name : nodev.infInbox : NoClass Name : SystemProvider Name : LSI Corp.Date : 8/10/2021Version : 7.719.6.0
The operation completed successfully.
C:\>dism /unmount-image /mountdir:c:\Temp\2019bootwimtemp /commit
Deployment Image Servicing and Management toolVersion: 10.0.14393.4169
Saving image[==========================100.0%==========================]Unmounting image[==========================100.0%==========================]The operation completed successfully.
C:\>
· 2019bootwimtemp à This is a temporary folder where boot.wim file will be unpacked and used for adding drivers.
· 2019bootwim à This is a folder where we have copied boot.wim file from the sources directory at the root of the ISO.
· PERC755 Ã This is the folder where we have the extracted driver content which we downloaded from Dell.
C:\>dism /get-wiminfo /wimfile:c:\temp\2019bootwim\boot.wim
C:\>dism /mount-image /imagefile:c:\temp\2019bootwim\boot.wim /Index:1 /mountdir:c:\temp\2019bootwimtemp
C:\>dism /image:c:\temp\2019bootwimtemp /add-driver /driver:C:\Temp\PERC755 /recurse
It might take few moments to integrate the drivers depending on the number of files it need to process.
C:\>dism /image:c:\temp\2019bootwimtemp /get-drivers
If things look good then we can finally commit the changes so that the added drivers are integrated and the content from the Temporary folder are repacked and recreate boot.wim file.
C:\>dism /unmount-image /mountdir:c:\Temp\2019bootwimtemp /commit
Once the final Step of Repacking boot.wim is completed, We can simply open the Original ISO of Window Server 2019 with any tool like UltraISO, Portable ISO, ISO Burn etc.. and replace the original boot.wim file inside the ISO with the updated one that we recreated in previous steps.
You can refer to following posts for more details on how to do it:
https://adminthing.blogspot.com/2020/01/create-bootable-windows-iso.html
https://adminthing.blogspot.com/2020/06/modify-windows-ISO.html
We can now boot the server with the updated ISO and it proceeds to OS installation passing through the Disk selection part.