PC suddenly stuck at black screen with flashing white line when booting

May 11, 2018
1
0
10
I've seen a few other questions with a case which is similar, but none of them have helped me. On Wednesday (9th May), my computer automatically updated Windows before it turned off. I didn't interrupt it or anything, I left it to do it's thing and then shut itself down, which it did. I also didn't install or download anything else.
The next day, I turned on my PC and it went to a black screen with a black flashing line (looks kinda like cmd) and it sits on this screen until you turn the PC back off. The BIOS is fine and it goes past that part, but gets stuck between that and starting up Windows.
I have checked for any loose connections in my PC and there aren't any, and I've also managed to figure out that it is nothing to do with the hardware on my PC because I am able to use my old HDD (which has Windows on as well) and it boots+runs perfectly fine. I can also access the files on the main HDD, so I'm guessing HDD can't be corrupted.
I don't want to format my main HDD because of all the stuff I have on there. I didn't have a Windows Installer on a CD or USB, but i managed to get one on a USB thanks to a friend. I tried to use that to repair my HDD but it couldn't find any installation of Windows on there (even though it is clearly there), and it can't find any restore points (which are there because it was set to create them automatically).
I have no idea what to try next, formatting isn't an option. Any help is appreciated, I'll just have to use my old HDD until i can manage to fix it.