I made a really bad decision on one of my servers.
I deleted /bin/sh
. I restarted the server and the server won't run because it needs /bin/sh
to start the rc scripts. I can't access single user mode either because sh is needed.
Is there any easy way to reinstall the bourn shell?
I tried copying sh from a live cd, it failed on the ld-elf.so.1 library. So I copied that to /libexec from the livecd to my / partition. It then needs the libedit.so library and I copied that to /libexec but it isn't working this time.
I tried a symlink to /usr/local/bin/bash
but that still presents me with "can't find sh" type error. I'm assuming that is because /usr
isn't mounted yet because it is done from an rc script.
Any help is greatly appreciated.