Can't boot Mac OS after applying restoring from InstallESD.dmg So I got a very old Macbook Pro to deal with. It comes with the Mac OS X Lion but nobody seems to know its password because it's a rather dated company asset. I tried to wipe it and reinstall the OS via internet recovery, but it requires the original Apple ID by which this MacBook Pro was purchased which I don't have either. I said so because I tried my own Apple ID and it only told me something like service not available/cannot connect to the server while the internet was perfectly fine.
So I downloaded the installer of Mac OS and extracted the InstallESD.dmg, then used it to restore the OS partition after erasing the whole OS partition. However, it seems the installed OS can't boot, as the start disk is not chosen. But in the start disk list, I can only see either a network server of our company, or the Flash drive I used to restore the dmg file. Is there any way I can resolve the matter please?
Any Apple account that purchased the OS should work, but be sure you enter your password plus pin tacked on the end. The installer wasn’t prepared for MFA or TFA so this is a bit of an edge case.

https://support.apple.com/en-us/HT204915

Search to the bottom for the part

Then type your password followed by the six-digit verification code directly into the password field.

But you don’t really state what you want to do, we don’t know your exact model and if you can just connect this to another Mac in target disk mode and run the installer on a new Mac to install to the old one. Hopefully you can go back to recovery and get the normal install path to work from recovery still.
I’ve had good luck installing the OS I want to an external drive and holding option to boot as well if you don’t want to install direct over target disk mode.