# Elf format 0 error



## csptra (Apr 13, 2018)

Hello

I believe we were running FreeBSD 11.1-RELEASE. Every once in a while, we have to rebuild (still looking into why) because of the below error(this was taken when trying to SSH into the box, but if you reboot it, you can get a sh prompt but can't do anything):

Could not chdir to home directory : No such file or directory
ELF binary type "0" not known.
/bin/sh: Exec format error


While, I am searching the internet for an answer, I admit I'm not an well versed in FreeBSD inner workings.  Is this possible to fix without re-installing, or is it so messed up that re-install is the only answer? 


Thanks for the help


----------



## ShelLuser (Apr 13, 2018)

I'm not familiar with the error message from mind but I almost get the idea that the installation was build for another architecture. This is a wild guess on my part mind you, but it seems to be backed by this thread:

https://forums.freebsd.org/threads/java-exec-format-error.62857/

If this is the case then yeah, your only option would be to re-install. Do other binaries work? If you boot in single user mode does using /bin/sh or /rescue/sh make any difference?


----------

