Skip to content

Instantly share code, notes, and snippets.

@TomCan
Last active March 10, 2024 19:52
  • Star 33 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save TomCan/9644966 to your computer and use it in GitHub Desktop.
Inject drivers in Windows installation after motherboard change
Today, after working with Windows for over 15 years now, I finally came across the solution to the
dreadfull BSOD STOP 0x0000007B after replacing the motherboard of a computer, or after moving the
harddrive to another computer, or after doing a P2V, or after ... you get the point.
Requirements:
- Windows install / boot CD
- Chipset / Mobo / Storage drivers of the new motherboard or storage controller
Steps:
- extract all the drivers to a USB thumb drive
- boot with the Windows CD
- go to the recovery console (typically hidden somewhere under repair, or advanced tools
- find out what drive letter your windows installation is in (probably C:) and what drive letter your
USB thumb drive is in (let's assume D:)
- type in the magic command:
DISM /Image:C:\ /Add-Driver /driver:D:\ /recurse
- wait until the process completes. You should see lines indicating what driver is being injected
- reboot
After rebooting, you should be able to boot into windows (if the boot menu for start-up repair shows,
just select the option to boot Windows normally). Once booted, Windows will probably install some more
drivers and you will probably need to reboot once more. There's also a chance that you'll need to
re-activate your Windows.
@N0rdmann
Copy link

Thank you so much for this Tom, this just saved my ass BIG time ;)

@SamDunham
Copy link

Can't thank you enough for this. It completely solved my issue with migrating a VMWare VM to a Scale box.

@popov654
Copy link

Is this instruction suitable for injecting into Windows XP?

@mircosebr
Copy link

Tom, you are my saviour!
I have created an account on github specially to thank you!
I've also been working with IT (Windows etc) for a long time, in fact about 25 years.
And today I was baning my head against the wall trying to find a way of getting a cloned Windows 10 / 11 to work from older laptop into a new HP Pavilion 11th gen Intel laptop.
Unfortunately, stupid HP (I really dislike this company).. in all their wisdom they decided to not give the option to disable Intel RST / Volume Management Device - VMD inside the bios.. for this reason my cloned SSD was failing to book because it didn't have the VMD drivers.
Anyway, after finding your post I was able to download the RST VMD drivers and my cloned SSD works! Thank you very much man!

@K1ltu
Copy link

K1ltu commented Jul 11, 2022

I could take you out to dinner for this.. you saved me probably weeks to months of reconfiguring my system with a fresh install this worked perfectly to migrate from an nvme single drive to AMD RAID 0 nvme

@ashencraft
Copy link

Hi, i have create an account just to say : "thank you !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"

@4Silentmaster
Copy link

Hi, thank you man! Saved my day!

@DuderMcGroover
Copy link

This helped me so much. For Real, thank you!
Wanted to add to this by saying, in some cases even Windows Recovery Console won't recognize the storage controller on the new hardware. If you cannot find your drive in the recovery console after booting into the Windows CD, simply use the drvload command as follows from the default directory of X:\sources:
drvload D:\path_to_the_driver_inf_file.inf (D being the drive letter of the drive that contains your drivers)

Even though you are only pointing drvload to one .inf file MAKE SURE you have all the files extracted from the supplied driver package obtained by whatever manufacturer, NOT JUST THE .INF FILE. Drvload needs all the .sys, .dll, .exe, and .cat files in the same folder as the actual .inf file in order to load the storage driver.

After loading the storage driver into the recovery console, you should be able to to proceed with the DISM driver addition specified above, and boot into Windows.
Cheers!

@dns72
Copy link

dns72 commented Feb 2, 2023

That is genius. I’ve also been searching for a simple solution to this probables for years! The amount of time this will save me 👍

@brianmillum
Copy link

Like ashencraft, i specifically created an account to thank you for your time both DuderMcGroover (Which i needed to start the process) and TomCan for this simple solution. Thankyou again! Brian

@Themiller12
Copy link

Thank you so much dude!

@j03ll0b0
Copy link

Only question: could this be done before migrating to be hardware?

@LordH3lmchen
Copy link

You saved my day. I migrated Windows VMs from Proxmox to Debian. After installing the virtio drivers my VMs bootet. Windows booted in Rescue Mode. I think this should work with the Windows Setup CD as well.

  1. open the cmd
  2. diskpart
  3. list volume
  4. if your Windows Virtio Dirve isn't there user drvload to load the driver in my case the virtio
  5. drvload E:\viostor\w10\amd64\viostor.inf
  6. DISM /Image:C:\ /Add-Driver /driver:E:\ /recurse

@thepracticalitsolution
Copy link

Holy crap. This worked great! You guys are awesome.

@pcase99
Copy link

pcase99 commented Jul 21, 2023

  1. Thank you!
  2. For me I had to specify the entire file path for the driver not just the USB it was on. so E:\usbdriver, E:\chipsetDriver, etc.

@Unodir1
Copy link

Unodir1 commented Jul 24, 2023

Just wanted to throw out there that this works fantastic (Confirmed just now). This is very similar to Sysprep commands we used to use to build an installation media to roll out to many PC's.

Scenario for me: I run a small Pc Repair shop and generally use Acronis (used to use Ghost) to Image\Clone a HDD or SSD 1 to 1 from an old Device to new. This works great up to the 90% - However, a large amount of my clients are picking up cheaper HP Laptop and Desktops that force the Intel VMD Driver- (e.g. one cannot disable VMD in favor for AHCI). As such, Acronis and a large amount of cloning software's cannot detect the physical controller if cloning while on the new Device.

If pulling the drive and cloning from an alternate System (E.g. taking old and new drives out of the respective Systems to an interim bench system)- You can clone fine, but once introducing to the newly cloned drive to the new machine, it wont fully boot (gives the expected errors.)

On functionally any other make Laptop or Desktop (Lenovo, Asus, etc) one can simply switch controller mode via BIOS from VMD to AHCI and that solves the mystery there.

In any case- Here is my workflow now for HP- Pre-download the VMD drivers from HP. From there, one can boot into Recovery Command prompt of the OLD system.

Run the DISM commands as above, thus injecting driver on old Drive. Do this first and save some hassle.

Pull old and new drives from respective Systems. Clone on Bench. Place the newly cloned drive, with injected drivers into the new Device and I found it booted right up (beautiful).

Alternately, I also found that I can pull both drives, attach to bench and clone 1 to 1. On that same bench system, run CMD elevated. Run the DISM commands as above, but simply change drive letters to reflect the hierarchy of what the bench sees in Windows explorer. Better put- You can run this DISM command on an interim System externally just fine- In my case, C:\ was primary of the bench. The newly cloned drive was E:\ and I already had a thumbdrive (f:) with the .sys and .dll's. I just ran DISM in this scenario as: DISM /Image:E:\ /Add-Driver /driver:F:\ /recurse

and it injected the driver into the System state of E:, even though I was running Windows live on the C:\ of the alternate System. Pretty cool stuff. Just saved a ton of work from not having to reload all apps, and tie in all the other items.

Mucho obliged. I hope what I typed out is sensical enough to help out. Let me know if I need to clarify a bit better.

@LitlJayHeise
Copy link

Just wanted to throw out there that this works fantastic (Confirmed just now). This is very similar to Sysprep commands we used to use to build an installation media to roll out to many PC's.

Scenario for me: I run a small Pc Repair shop and generally use Acronis (used to use Ghost) to Image\Clone a HDD or SSD 1 to 1 from an old Device to new. This works great up to the 90% - However, a large amount of my clients are picking up cheaper HP Laptop and Desktops that force the Intel VMD Driver- (e.g. one cannot disable VMD in favor for AHCI). As such, Acronis and a large amount of cloning software's cannot detect the physical controller if cloning while on the new Device.

If pulling the drive and cloning from an alternate System (E.g. taking old and new drives out of the respective Systems to an interim bench system)- You can clone fine, but once introducing to the newly cloned drive to the new machine, it wont fully boot (gives the expected errors.)

On functionally any other make Laptop or Desktop (Lenovo, Asus, etc) one can simply switch controller mode via BIOS from VMD to AHCI and that solves the mystery there.

In any case- Here is my workflow now for HP- Pre-download the VMD drivers from HP. From there, one can boot into Recovery Command prompt of the OLD system.

Run the DISM commands as above, thus injecting driver on old Drive. Do this first and save some hassle.

Pull old and new drives from respective Systems. Clone on Bench. Place the newly cloned drive, with injected drivers into the new Device and I found it booted right up (beautiful).

Alternately, I also found that I can pull both drives, attach to bench and clone 1 to 1. On that same bench system, run CMD elevated. Run the DISM commands as above, but simply change drive letters to reflect the hierarchy of what the bench sees in Windows explorer. Better put- You can run this DISM command on an interim System externally just fine- In my case, C:\ was primary of the bench. The newly cloned drive was E:\ and I already had a thumbdrive (f:) with the .sys and .dll's. I just ran DISM in this scenario as: DISM /Image:E:\ /Add-Driver /driver:F:\ /recurse

and it injected the driver into the System state of E:, even though I was running Windows live on the C:\ of the alternate System. Pretty cool stuff. Just saved a ton of work from not having to reload all apps, and tie in all the other items.

Mucho obliged. I hope what I typed out is sensical enough to help out. Let me know if I need to clarify a bit better.

I'm in this exact situation, having moved an nvme drive from a dying 10th-gen i7 HP lappy to a newer 11th-gen i3 unit and it refuses to acknowledge the system drive unless I load the RST driver from the command line. With the RST driver loaded, I can inject the RST driver and the chipset driver into the image via DISM, but on reboot I'm still landing at the useless "automatic repair" with no system drive. I've tried installing the nvme into a bench system and injecting the drivers from there via DISM, still with a negatory result.

My only conclusion is that I am missing another driver. Since I can't switch the machine to AHCI, what VMD driver are you using when you go through this? The bog standard F6 driver included with the RST driver on HP's web site works, but not after it's injected into the image!

@colinwibble
Copy link

Did you come right LitlJayHeise ? I’m in the same boat with this right now .

@LitlJayHeise
Copy link

Did you come right LitlJayHeise ? I’m in the same boat with this right now .

Neither here nor SpiceWorks forums were able to get me over the finish line. I ultimately did a fresh install of windows on the destination laptop (using the F6 driver during setup) and transferred the user accounts/apps/data/etc over via PC Mover. Definitely not my first choice, but it worked.

@johnthepro
Copy link

johnthepro commented Sep 27, 2023

Just wanted to throw out there that this works fantastic (Confirmed just now). This is very similar to Sysprep commands we used to use to build an installation media to roll out to many PC's.
Scenario for me: I run a small Pc Repair shop and generally use Acronis (used to use Ghost) to Image\Clone a HDD or SSD 1 to 1 from an old Device to new. This works great up to the 90% - However, a large amount of my clients are picking up cheaper HP Laptop and Desktops that force the Intel VMD Driver- (e.g. one cannot disable VMD in favor for AHCI). As such, Acronis and a large amount of cloning software's cannot detect the physical controller if cloning while on the new Device.
If pulling the drive and cloning from an alternate System (E.g. taking old and new drives out of the respective Systems to an interim bench system)- You can clone fine, but once introducing to the newly cloned drive to the new machine, it wont fully boot (gives the expected errors.)
On functionally any other make Laptop or Desktop (Lenovo, Asus, etc) one can simply switch controller mode via BIOS from VMD to AHCI and that solves the mystery there.
In any case- Here is my workflow now for HP- Pre-download the VMD drivers from HP. From there, one can boot into Recovery Command prompt of the OLD system.
Run the DISM commands as above, thus injecting driver on old Drive. Do this first and save some hassle.
Pull old and new drives from respective Systems. Clone on Bench. Place the newly cloned drive, with injected drivers into the new Device and I found it booted right up (beautiful).
Alternately, I also found that I can pull both drives, attach to bench and clone 1 to 1. On that same bench system, run CMD elevated. Run the DISM commands as above, but simply change drive letters to reflect the hierarchy of what the bench sees in Windows explorer. Better put- You can run this DISM command on an interim System externally just fine- In my case, C:\ was primary of the bench. The newly cloned drive was E:\ and I already had a thumbdrive (f:) with the .sys and .dll's. I just ran DISM in this scenario as: DISM /Image:E:\ /Add-Driver /driver:F:\ /recurse
and it injected the driver into the System state of E:, even though I was running Windows live on the C:\ of the alternate System. Pretty cool stuff. Just saved a ton of work from not having to reload all apps, and tie in all the other items.
Mucho obliged. I hope what I typed out is sensical enough to help out. Let me know if I need to clarify a bit better.

I'm in this exact situation, having moved an nvme drive from a dying 10th-gen i7 HP lappy to a newer 11th-gen i3 unit and it refuses to acknowledge the system drive unless I load the RST driver from the command line. With the RST driver loaded, I can inject the RST driver and the chipset driver into the image via DISM, but on reboot I'm still landing at the useless "automatic repair" with no system drive. I've tried installing the nvme into a bench system and injecting the drivers from there via DISM, still with a negatory result.

My only conclusion is that I am missing another driver. Since I can't switch the machine to AHCI, what VMD driver are you using when you go through this? The bog standard F6 driver included with the RST driver on HP's web site works, but not after it's injected into the image!

I THINK I'VE GOT YOU BUDDY!!

I found myself having to restore a backup image to a Dell laptop (technically, this was a BMR recovery from dissimilar hardware - lenovo to dell, and a gap of about 4 years) that no longer had AHCI as an option. It was RST or nothing. After many hours of frustration, I finally have the device booting as it should be!

Thanks to this post, I got the last mile done, so I did a write up that details every step I took to go from not being able to boot, or read the drive while in recovery mode, to a full booting device.

HERE WE GO!
NOTE: This does require a separate, working, "technician's PC" so to speak for you to download drivers, prep the bootable USB, run DISM, etc.

1. Create a bootable USB using the Media Creation Tool for the appropriate version of Windows.
2. Download and extract the necessary storage drivers.
3. Copy the necessary storage drivers to the bootable USB from Step 1 (let's assume D:) into the folder D:\mydrivers
4. On your local PC, create the following folder:
4a. C:\Mount\BootWIM
5. Open an Elevated Command Prompt, and proceed with the following commands:
5a. DISM /Mount-Wim /WimFile:D:\Sources\boot.wim /Index:2 /MountDir:C:\Mount\BootWIM
5b. DISM /Image:C:\Mount\BootWIM /Add-Driver /Driver:D:\mydrivers /recurse
5c. DISM /Unmount-Wim /MountDir:C:\Mount\BootWIM /Commit
6. Now safely Eject the bootable USB, and boot the targeted device from the bootable USB.
7. Once in the Windows Setup, hit 'Next' and then click 'Repair Your Computer'.
8. On the following screen, choose "Troubleshoot"
9. Afterwards, choose "Command Prompt"
10. You can confirm that your disk is now readable by performing the following at the command prompt:
10a. Enter the following: "diskpart" (without quotes)
10b. Enter: "list volume" (without quotes) at the DISKPART> prompt.
10c. You should now see the C: volume listed, as well as your USB (likely at D:)
10d. Enter: "exit" (without quotes) to exist the DISKPART prompt and return to the normal command prompt.
11. Now that you've confirmed that you can access the disk, run the following command:
11a. DISM /Image:C:\ /Add-Driver /driver:D:\mydrivers /recurse
11b. NOTE: the /recurse switch is present because you might add multiple drivers, such as chipset or Wi-Fi, during this process too.
12. Once the DISM command completes, you can exit the command prompt, and proceed to boot the system.
13. Windows will detect the new drivers, prep the device, and then continue on to the boot process.

If anything above needs clarification, I'm happy to help.

@raph2i
Copy link

raph2i commented Oct 13, 2023

Had to do a bare metal recovery Server 2019 Essentials with a changed RAID controller (Intel RAID to Intel VROC).
This f*cking saved my customer, my life and universe
Thanks to everyone here :)

@julianmaria
Copy link

⣿⠀⠹⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣷⣤⠟⠉⠁⠉⠓⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣧
⣿⡆⠀⢻⣷⡀⠀⠀⠀⠀⠀⠀⢠⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⡿⣿⡄⠀⠀⠀⠀⠈⠻⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿
⢹⡇⠀⠀⢻⣷⡀⠀⠀⠀⠀⠀⠈⢻⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠞⢻⣏⠀⢸⡇⠀⠀⠀⠀⢀⣤⠈⢳⣄⠀⠀⠀⠘⠀⠀⠀⠀⢸
⠸⣧⠀⠀⠀⠻⣧⠀⠀⠀⠀⠀⠀⠀⢻⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡄⠀⡇⠀⠀⠀⢀⣾⠃⠀⠀⠻⣦⡀⠀⠀⠀⠀⠀⠀⠀
⠀⣿⠀⠀⠀⠀⠹⣧⠀⠀⠀⠀⠀⠀⠈⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠃⠀⣡⣴⣾⣿⣿⣿⣿⣿⣿⣶⣾⣿⡖⠀⢀⠀⠀⠀⠀
⠀⢸⡷⠶⠶⠶⣶⡾⢷⣶⠞⠋⠀⠀⠀⢹⣏⢧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⡿⠋⠉⠉⠉⠉⠉⠉⠙⠻⢿⣿⣦⡸⠄⠀⠀⠀
⠀⠀⣧⠀⠀⠀⠀⠀⠀⠻⣦⠀⠀⠀⠀⠀⣿⡘⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⠃⠀⢀⣤⣶⣶⣶⣶⣦⡀⠀⠀⠙⣿⣿⣄⠀⠀⠀
⠀⠀⢻⣇⠀⠀⠀⠀⠀⠀⠈⢷⣄⠀⠀⠀⠸⣇⢸⡀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⠏⠀⣰⠟⠻⣷⠠⣦⠈⠙⣿⣶⡄⠀⠈⣿⣿⡟⠀⠀
⠀⠀⠀⢿⡄⣸⡆⠀⠀⠀⠀⠀⠙⣀⣀⠀⠀⠀⠈⠃⢀⠐⠂⠀⠀⠀⠀⠀⡿⠿⠀⠀⣿⠀⠀⠹⡆⠈⢿⣦⣀⣛⣿⡄⠀⠘⣿⣷⠀⠀
⠀⠀⠀⠈⣻⣿⣷⣶⣶⣶⣶⣶⣶⣿⣍⠀⠀⠀⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣀⣠⣤⣿⠀⠀⠈⣩⣽⣿⣧⠀⠀⠿⣿⡀⠀
⠀⠀⣠⣾⣿⣿⣿⡿⠟⠛⠛⠛⠻⠿⣿⣷⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣯⣤⣤⣤⠴⠋⠀⠀⣿⠀⠀⠀⢹⣷⣄
⠀⣰⣿⣿⡿⠋⠀⠀⣠⣤⣤⣤⣤⣄⠀⠈⠙⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⣿⡟⠉⠉⠁⠀⠀⠀⢀⣿⠀⣠⡆⢀⣹⡿
⢠⣿⣿⡟⠀⠀⢀⣾⣿⣿⣿⣿⠉⠙⠻⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢧⣀⠀⠀⠀⠀⣀⣾⢃⣴⢋⡷⠛⠁⠀
⢸⣿⡿⠀⠀⠀⣾⠃⠀⢻⣏⠹⢦⣤⣀⣹⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠒⠒⠛⠋⠁⠈⣽⠟⠁⠀⠀⣠
⢸⣿⡇⠀⠀⠀⣿⡀⠀⢀⣹⠀⠀⠉⠉⣩⣿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⠶⠶⠶⠋⠁
⣸⣿⡇⠀⠀⠀⠹⣷⣴⣿⠋⠀⣀⣀⡼⠋⠀⠙⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⢿⣿⣷⡀⠀⠀⠀⠻⣿⣿⠶⠛⠛⠋⠀⠀⠀⠀⣹⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⢻⣿⠷⣄⠀⠀⠀⠙⢿⣦⡀⠀⠀⠀⠀⠀⣴⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⢿⣷⡌⠁⠀⠀⠀⠀⠙⠻⠶⠶⡶⠶⠟⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡏⠀⠙⢷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠
⡀⠀⠀⠹⢷⣄⠀⠀⠀⢠⣤⠤⣤⠤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣧⠀⠀⠀⠙⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿
⠛⠀⣀⠀⠀⠙⢷⣄⣀⣀⣠⣴⠿⠶⢦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣆⠀⠀⠀⣸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⠟
⠀⠀⠈⢷⡄⠀⠀⣹⠿⠋⠁⠀⠀⠀⣸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢿⣗⣴⠿⠛⠁⠀⠀⠀⠀⠀⠀⠀⣠⣾⡿⠁⠀
⠀⠀⠀⠈⢿⣦⣾⡇⠀⠀⠀⣀⣤⡾⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣾⣿⣿⣶⣶⣦
⠀⠀⠀⠀⠘⣿⣿⡻⠶⠶⠛⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣶⣿⠿⠛⠛⠉⠀⠈⢻
⠀⠀⠀⠀⠀⠘⣿⣿⣷⣦⣤⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣤⣶⣿⣿⠛⣉⠀⠀⠀⠀⣀⠀⠀⠀

WOW!!!

@twilight-moon
Copy link

Thanks for this. In my case Windows 10 said that the manufacturers Intel RAID driver was the wrong one. The one Windows picked didn't work with the Intel Optane Memory and Storage Management utility. I deleted it from Windows and tried to force install but that just led to Windows not being able to boot. Running this command in the recovery environment installed the manufacturers driver and Windows is able to boot and the Intel Utility is working fine.

@NDW518
Copy link

NDW518 commented Jan 19, 2024

This was SUPER helpful, thank you very much to you, Tom, and everyone else in this thread!! I’ll describe my situation here to further help anybody in the future:

  • Upgrading a client from a 4 year old Dell Desktop (9th Gen i5) to a new Dell Desktop (13th Gen i5). Significantly different hardware between devices.
  • The old Desktop had a HDD, the new Desktop came with an M.2 SSD. I went out and purchased an External WD Blue SATA SSD instead, as this is what my business prefers for future troubleshooting.
  • I used Macrium Reflect to clone the old computer’s HDD to the new WD Blue SATA SSD. However, I couldn’t put this SSD into the new Dell, as the drivers cloned to the SSD are for the old device.
  • I installed Windows 10 onto the new Dell (it came with Windows 11), I installed all current updates from Windows and Dell Command | Update, and then exported the drivers to a Flash Drive using the following Elevated PowerShell Command:
    Export-WindowsDriver -Online -Destination [DESIRED_DRIVER_DESTINATION]
  • I turned on the Old Dell Desktop (booted with the cloned WD Blue SATA SSD) and ran shutdown /r /o /f /t 00 in an elevated Command Prompt to restart the computer into the recovery environment, then accessed this Command Prompt and ran the DISM Driver Injection command provided by Tom
  • After this successfully ran, I shut down the old Dell computer, removed the WD Blue SATA SSD, and installed it into the new Dell computer. Unfortunately, booting to this drive still provided me with the INACCESSIBLE_BOOT_DEVICE error. After trying various forms of additional troubleshooting, LitlJayHeise’s comment made me realize that I had to boot into the BIOS of the new Dell desktop and select AHCI rather than VMD. This allowed for the detection and setup of the new WD Blue SATA SSD, and the new Dell machine booted into Windows 10 just like it did on the old Dell machine! I then proceeded to upgrade back to Windows 11 from here.

The only caveat I seemed to run into is that there was a TPM issue with Office sign in, as I think it was trying to still access the old processor. All I had to do was delete the cached credentials in Credentials Manager and unlink/relink the client’s Work/School Microsoft account and it was working fine.

I sincerely appreciate the knowledge shared in this thread. Thank you again to everyone!!

@isaacgonzalez77
Copy link

Just wanted to throw out there that this works fantastic (Confirmed just now). This is very similar to Sysprep commands we used to use to build an installation media to roll out to many PC's.
Scenario for me: I run a small Pc Repair shop and generally use Acronis (used to use Ghost) to Image\Clone a HDD or SSD 1 to 1 from an old Device to new. This works great up to the 90% - However, a large amount of my clients are picking up cheaper HP Laptop and Desktops that force the Intel VMD Driver- (e.g. one cannot disable VMD in favor for AHCI). As such, Acronis and a large amount of cloning software's cannot detect the physical controller if cloning while on the new Device.
If pulling the drive and cloning from an alternate System (E.g. taking old and new drives out of the respective Systems to an interim bench system)- You can clone fine, but once introducing to the newly cloned drive to the new machine, it wont fully boot (gives the expected errors.)
On functionally any other make Laptop or Desktop (Lenovo, Asus, etc) one can simply switch controller mode via BIOS from VMD to AHCI and that solves the mystery there.
In any case- Here is my workflow now for HP- Pre-download the VMD drivers from HP. From there, one can boot into Recovery Command prompt of the OLD system.
Run the DISM commands as above, thus injecting driver on old Drive. Do this first and save some hassle.
Pull old and new drives from respective Systems. Clone on Bench. Place the newly cloned drive, with injected drivers into the new Device and I found it booted right up (beautiful).
Alternately, I also found that I can pull both drives, attach to bench and clone 1 to 1. On that same bench system, run CMD elevated. Run the DISM commands as above, but simply change drive letters to reflect the hierarchy of what the bench sees in Windows explorer. Better put- You can run this DISM command on an interim System externally just fine- In my case, C:\ was primary of the bench. The newly cloned drive was E:\ and I already had a thumbdrive (f:) with the .sys and .dll's. I just ran DISM in this scenario as: DISM /Image:E:\ /Add-Driver /driver:F:\ /recurse
and it injected the driver into the System state of E:, even though I was running Windows live on the C:\ of the alternate System. Pretty cool stuff. Just saved a ton of work from not having to reload all apps, and tie in all the other items.
Mucho obliged. I hope what I typed out is sensical enough to help out. Let me know if I need to clarify a bit better.

I'm in this exact situation, having moved an nvme drive from a dying 10th-gen i7 HP lappy to a newer 11th-gen i3 unit and it refuses to acknowledge the system drive unless I load the RST driver from the command line. With the RST driver loaded, I can inject the RST driver and the chipset driver into the image via DISM, but on reboot I'm still landing at the useless "automatic repair" with no system drive. I've tried installing the nvme into a bench system and injecting the drivers from there via DISM, still with a negatory result.

My only conclusion is that I am missing another driver. Since I can't switch the machine to AHCI, what VMD driver are you using when you go through this? The bog standard F6 driver included with the RST driver on HP's web site works, but not after it's injected into the image!

Same issue as @LitlJayHeise no matter what I could do to inject the Intel RST driver on Dell's site it simply wouldn't boot. Luckily I did have ACHI as an option in bios and it booted fine. I believe the lowdown is once machine is installed as ACHI (Non Raid), you can't load the Intel VMD Raid drivers. I even tried to install the drivers once I was booted into windows but it said "incompatible platform", which means it wanted VMD mode...ugh, what a pain, especially if ACHI isn't an option. So the question is how to properly load the Intel RST VMD drivers using DISM...That is the million dollar question. I did not want to have my client pay me to reload the OS and copy over all his data and settings and what not... Just seems silly that injecting drivers aren't enough here...More is needed, probably due to the complexity of the Intel RST drivers themselves needing more than just DISM injection to load. Word on the interwebs is that you can only load it on a clean OS install...hmmmm. Oh yes, I used Windows 10 as well...

@ChristophSchaffhauser
Copy link

Ohh wow...
This was super helpful.

I have a Supermicro Server with Xeon 4th gen Silver. I installed Windows Server 2022 Standard edition on it.
The Problem I had was that VMD was deactivated when I installed the Server OS.

Weeks later when I activated VMD for VROC in BIOS I got the bluescreen of death when booting the OS.
With this neat trick I was able to inject the VROC driver to the Server 2022 OS with the Install USB-Stick.

After injection the OS bootet without bsod.

@Aldrinlights
Copy link

@johnthepro You saved my ass with your wonderful step by step instructions on here. I created an account just to thank you. I was working on setting up a dual boot situation on my work laptop on the NVME C drive and I created a partition to install a personal version of windows 11 D drive to play video games on. I could not get my drive to be visible to install windows on the partition. Your instructions worked perfectly for this application and I cant thank you enough!

@johnthepro
Copy link

johnthepro commented Mar 2, 2024 via email

@lucasrausch1402
Copy link

Had to migrate a harddrive to a newer gen device and it wasn't able to boot after the migration. saved me and my customer a lot of stress, thank you for this post!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment