Question Windows 10 boot broken, hal.dll missing

Jan 3, 2023
7
2
15
Hi tom's hardware forum,

I'm having trouble booting my Windows 10 after clearing my old M.2 ssd. I already googled a bit but couldn't find anything that helped or fitted my situation.

To explain the situation, I first started out with an m.2 ssd of 500gb to run my windows 10 on. Since free space was getting low I decided to upgrade to a 2TB m.2 ssd. Luckily i have 2 m.2 slots on my motherboard so i cloned my 500gb to a 2TB m.2 ssd with the help of Marcium Reflect, then swapped the drives and booted of the 2TB m.2 ssd.
Everything was running fine untill i stupidly decided to wipe the old 500gb drive and remove all partitions on it to create 1 big partition, so i could use that as a fast storage.

But then all issues started, first of all my windows wouldn't shut down, each click on the shutdown button would bring me right back to the login screen, so I force shutdown the pc with the power button.
Then my windows 10 was unable to boot at all, a blue screen with the following text appeared: "Your pc / device needs to be repaired..... File: \BCD Errorcode: 0xc0000098"
pressing F1 on the screen would bring me to the repair environment but that didn't work at all, it would just reboot the pc back into the same error screen.

When trying to change my boot order in the uefi bios, i noticed that the first option was a Windows Boot Manager located on my 2TB m.2 ssd and as second option it was my 2TB sdd. Trying to boot off the Windows Boot Manager brought me to the blue screen with text: "Your pc / device needs to be repaired...." and booting of the 2TB ssd directly would show me a black screen with white text saying: "Windows could not start because the following file is missing or corrupt: <Windows root>\system32\hel.dll. Please re-install a copy of the above file"

I managed to re-install windows on the 500gb ssd drive that was wiped and use that windows install to pull some files of the 2TB ssd that I didn't have a backup of.
Now my main question is, can I still repair or regain access to the windows install that is on the 2TB drive using the windows that is installed on the 500GB ssd? I would still like to get back into that windows install instead of having to re-install all my software and games.
I have tried searching google and the closest I found was here: https://www.lifewire.com/fix-hal-dll-errors-in-newer-versions-of-windows-2619245 (option 4: Update the volume boot code) but i'm not sure how to instruct it to fix the boot code on the 2TB drive.
Also a strange thing is that in the bios I still have to boot of the Windows Boot Manager that is located on the 2TB ssd, to get into the working Windows that is installed on the 500gb ssd drive, booting of the 500gb drive directly gives me the hal.dll missing or corrupt error.

Could you guys please assist me or give some guidance on how to get back into that windows install on the 2TB drive? If there is no solution I will be forced to wipe the 2TB ssd and re-install windows and all my software and games but I'd like to avoid that if possible.

If you need more info or more specs about my system, please let me know and i'll share it.

Thanks in advance.

Kind regards,
Stino
 
Try to get into Advanced Startup on the corrupted drive. You want to load into command prompt. If you are able to get into CMD from the corrupted 2TB drive, try doing an "sfc /scannow" to see if that repairs some issues. You can also run "DISM.EXE /ONLINE /CLEANUP-IMAGE /RESTOREHEALTH" to repair that image.
Hey thanks for your suggestions but so far no real luck. I didn't manage to get into the advanced startup of the 2TB drive, everytime i get into the advanced startup i'm going into the one of the 500gb drive because i can only see the username of the temporary windows i set up.
I have tried identifying the 2TB's volume letter using diskpart and running scf /scannow with offwindir=E:\windows /offbootdir=E:\ (where E is the volume letter of the windows install on the 2TB drive, sfc didn't give any errors and told me it couldn't find any integrity problems. I also tried running dism with dism /image:E:\ /cleanup-image /restorehealth , it did some things and loaded for a short while but after reboot and trying to bootof the 2TB drive directly I still got the missing hal.dll error. 🙁
 
Hey thanks for your suggestions but so far no real luck. I didn't manage to get into the advanced startup of the 2TB drive, everytime i get into the advanced startup i'm going into the one of the 500gb drive because i can only see the username of the temporary windows i set up.
I have tried identifying the 2TB's volume letter using diskpart and running scf /scannow with offwindir=E:\windows /offbootdir=E:\ (where E is the volume letter of the windows install on the 2TB drive, sfc didn't give any errors and told me it couldn't find any integrity problems. I also tried running dism with dism /image:E:\ /cleanup-image /restorehealth , it did some things and loaded for a short while but after reboot and trying to bootof the 2TB drive directly I still got the missing hal.dll error. 🙁
It might honestly be problem with your 2TB NVME. Sometimes that error pops up when there are hardware related issues, especially during modern times. If you have a spare system you can test it? Longshot for sure. Best thing to do right now is move all missions critical (important files) to a secure drive. You stated you were able to access the drive on your 500gb Drive? move whatever important you can. I would leave games alone because they can be reinstalled unless they have local save data, save those too.
 
  • Like
Reactions: Stino-Ovb
It might honestly be problem with your 2TB NVME. Sometimes that error pops up when there are hardware related issues, especially during modern times. If you have a spare system you can test it? Longshot for sure. Best thing to do right now is move all missions critical (important files) to a secure drive. You stated you were able to access the drive on your 500gb Drive? move whatever important you can. I would leave games alone because they can be reinstalled unless they have local save data, save those too.
No i don't have a spare system with m.2 capability unfortunately.
I do hope that the 2TB ssd is fine on a hardware level, it's a brand new samsung 980 pro and I'm currently checking the drive's health using samsung magician. So far i did a short test and it's not showing any issues. Full test is running now.
But indeed it is starting to look more and more unsolvable as-is and a clean reinstall being inevitable. I think i just really messed something up by formatting and clearing the original 500gb drive using diskpart, i deleted the EFI system partition and the recovery partition on the 500gb drive which i thought it was no longer using, but since the 2TB was a clone of the 500gb something might have broken because of the wipe, not sure.

I'm currently also backing up any files i still need to an HDD that is connected to the system as well as taking a redundant backup to an external hdd (just to be safe).
But I do plan on re-using the 2TB ssd and install windows from scratch, my plan is to boot from my windows 10 install usb and use the windows 10 install menu to remove the partitions on the 2TB drive and let the windows installer re-create the required partitions/volumes and start from scratch. While doing the windows install I will disconnect the 500gb drive and only connect it again when windows is fully re-installed on the 2TB drive.
Is this a bad idea? I suppose it's at least worth a try as long as I have my important data backed up on some other storage. I would still like to use the 2TB drive as my os drive and the 500gb ssd as a fast storage in the future.
 
No, that can actually work. As long as you remove the 500gb drive while the system is powered off, you should be able to boot from the Windows 10 USB and work on the 2TB Drive.
Will try that. I found a good tutorial on this forum (https://forums.tomshardware.com/faq/windows-10-clean-install-tutorial.3170366/) to install windows 10 from scratch so will be following that to make sure it's a clean install.

Thank you very much for your time and assistance! It's very much appreciated!
 
kd> !error 0xc0000098
Error code: (NTSTATUS) 0xc0000098 (3221225624) - The volume for a file has been externally altered such that the opened file is no longer valid.

I would guess that the system is having the reserved partitions on the small drive. this was later wiped and led to the boot problem.

best procedure would be to remove the small drive and get windows booted on the new drive before plugging in the small drive to remove its partitions. you would have to leave space on the large drive for the reserved partition or do a windows setup on that drive only. otherwise you have to do a manual process to fix it. ie make the reserved partition if there is not one, then boot on a windows install disk and run
a command prompt and run
bootrec.exe /fixmbr
bootrec.exe /fixboot
bootrec.exe /scanos
bootrec.exe /rebuildbcd

i would run all the commands since they are pretty quick.

Note: windows will block a shutdown if it thinks some data will be lost.
it would explain why it would not shutdown.

it would be interesting to see if you are running the intel storage driver or the microsoft generic version. I have seen the intel storage driver reassign drive letters when two drives both have a reserved partition.
it has a 50% chance of setting the correct drive to the correct drive letter. Sometimes it is stupid and assigns the drive letter c: to the reserved partition and your system will not boot and see the hal driver.
(because it is looking at the wrong partition)


bootrec /scanos
should fix that problem and find out where windows is actually located.
the microsoft generic drivers never assign the reserved partition the c: drive letter. (generaly no drive letter is assigned, you can assign one if you want to look at or modify the files. (just use a drive letter like f: so you do not mess up the other drive assignments)

intel rst driver is the one that used to cause this problem.
Intel® Rapid Storage Technology (Intel® RST) User Interface and Driver
(here is the updated version.)

the driver is at End of Life so no more updates.
 
kd> !error 0xc0000098
Error code: (NTSTATUS) 0xc0000098 (3221225624) - The volume for a file has been externally altered such that the opened file is no longer valid.

I would guess that the system is having the reserved partitions on the small drive. this was later wiped and led to the boot problem.

best procedure would be to remove the small drive and get windows booted on the new drive before plugging in the small drive to remove its partitions. you would have to leave space on the large drive for the reserved partition or do a windows setup on that drive only. otherwise you have to do a manual process to fix it. ie make the reserved partition if there is not one, then boot on a windows install disk and run
a command prompt and run
bootrec.exe /fixmbr
bootrec.exe /fixboot
bootrec.exe /scanos
bootrec.exe /rebuildbcd

i would run all the commands since they are pretty quick.

Note: windows will block a shutdown if it thinks some data will be lost.
it would explain why it would not shutdown.

it would be interesting to see if you are running the intel storage driver or the microsoft generic version. I have seen the intel storage driver reassign drive letters when two drives both have a reserved partition.
it has a 50% chance of setting the correct drive to the correct drive letter. Sometimes it is stupid and assigns the drive letter c: to the reserved partition and your system will not boot and see the hal driver.
(because it is looking at the wrong partition)


bootrec /scanos
should fix that problem and find out where windows is actually located.
the microsoft generic drivers never assign the reserved partition the c: drive letter. (generaly no drive letter is assigned, you can assign one if you want to look at or modify the files. (just use a drive letter like f: so you do not mess up the other drive assignments)

intel rst driver is the one that used to cause this problem.
Intel® Rapid Storage Technology (Intel® RST) User Interface and Driver
(here is the updated version.)

the driver is at End of Life so no more updates.

Hi Thanks for your reply.
Sorry it took me a while to respond but i just didn't have the time to try out your suggestion.
Like you told I disconnected every drive but the 2TB ssd and booted of my windows 10 install usb.
I was able to execute the bootrec commands and here are the results:
bootrec.exe /fixmbr => the operation completed successfully
bootrec.exe /fixboot => access denied
bootrec.exe /scanos => successfully scanned windows installations: 1 C:\Windows. The operation completed successfully.
bootrec.exe /rebuildbcd => successfully scanned windows installations: 1 C:\Windows. Add installation to boot list? ( I type: Yes) The system cannot find the specified path.

These commands didn't help much since some of them couldn't even complete and i'm still having the boot problem. The blue screen that says my pc needs to be repaired now indicates error code: 0xc000000e don't know if this makes much of a difference.

Last i checked in device manager was that it was using standard storage drivers for pcie and the windows standard storage driver. I'm also on an AMD system so i think it's unlikely that i would have intel storage drivers.

starting to think that re-installing windows is my only way out. I already have pulled of all the files i need to a different drive so i think i'm safe to re-install windows. It will just take a lot of my time to get everything installed and configured as before. And this time i will be making more backup images of my c drive for in the event such thing happens again.
 
starting to think that re-installing windows is my only way out.

Hey there,

Yes, this is the solution. Unfortunately, when you cloned/installed Windows, the Boot manager will be on the original SSD. Then you delete that, and hope the new install on the 2tb takes!

Ideally now, you need to just start fresh, one SSD as the boot, with nothing else connected. Once done, then attach other drives and format or recover where possible.

Start from scratch. Don't wreck your head with trying to figure out a solution.
 
  • Like
Reactions: omegadoom13
Hey there,

Yes, this is the solution. Unfortunately, when you cloned/installed Windows, the Boot manager will be on the original SSD. Then you delete that, and hope the new install on the 2tb takes!

Ideally now, you need to just start fresh, one SSD as the boot, with nothing else connected. Once done, then attach other drives and format or recover where possible.

Start from scratch. Don't wreck your head with trying to figure out a solution.
Hey thanks for the feedback.
Indeed i've been wrecking my head trying to get it solved while if i would have re-installed windows immediately, I would have already been running on a new windows install with all my apps and games installed.
All in all starting with a fresh windows install isn't a bad thing either and also has it's advantages.
 
  • Like
Reactions: Roland Of Gilead
Hey thanks for the feedback.
Indeed i've been wrecking my head trying to get it solved while if i would have re-installed windows immediately, I would have already been running on a new windows install with all my apps and games installed.
All in all starting with a fresh windows install isn't a bad thing either and also has it's advantages.


Not at all, you're very welcome!

You've hit the nail on the head. Yes, sometimes things just go that way, despite wanting it to be otherwise.

Believe me, I've done the same or worse, and fought the inevitable! You'll prob be happy out when it's done and all is well :)

Good luck! Let us know how you get on, or if you need any further help :)
 
Not at all, you're very welcome!

You've hit the nail on the head. Yes, sometimes things just go that way, despite wanting it to be otherwise.

Believe me, I've done the same or worse, and fought the inevitable! You'll prob be happy out when it's done and all is well :)

Good luck! Let us know how you get on, or if you need any further help :)

Hey, during the weekend i found some time to re-install my windows so i did a clean install on the 2TB drive without anything else connected, proceeded to setup the drivers and my applications.
I then found out that my asus bios had a hard drive erase tool so i connected the 500gb m.2 ssd again and before booting into windows i wiped the drive using the bios tool, this left me with all unallocated space which enabled me to create 1 big storage partion in windows disk mgmt.
So at this moment i'm all set up again, my data is recovered from the backup i made and most of my programs are installed again and I have the old 500gb ssd set up as a fast storage.
Some apps are still missing but i will install them as i go along and need them. :)

Any of you have any recommendations to backup my windows OS drive? If possible i would like to avoid this situation in the future and have some kind of backup that i can revert to whenever I destroy my windows again.
 
  • Like
Reactions: Roland Of Gilead
Hey, during the weekend i found some time to re-install my windows so i did a clean install on the 2TB drive without anything else connected, proceeded to setup the drivers and my applications.
I then found out that my asus bios had a hard drive erase tool so i connected the 500gb m.2 ssd again and before booting into windows i wiped the drive using the bios tool, this left me with all unallocated space which enabled me to create 1 big storage partion in windows disk mgmt.
So at this moment i'm all set up again, my data is recovered from the backup i made and most of my programs are installed again and I have the old 500gb ssd set up as a fast storage.
Some apps are still missing but i will install them as i go along and need them. :)

Any of you have any recommendations to backup my windows OS drive? If possible i would like to avoid this situation in the future and have some kind of backup that i can revert to whenever I destroy my windows again.

Ah, good. I'm glad things are running well for you :)

Yeah, you can try something like Macrium for back ups: How to Back Up Your Windows Installation With Macrium Reflect (makeuseof.com)