# Error starting jail on 8.1# jail: execvp: /bin/sh: Exec format error



## ghostcorps (Sep 13, 2010)

Hi Guys

 I have built a couple jails on my test server, these work flawlessly, but since moving them across to the hosted-production server I am getting the following error when I try to start them:


```
FreeBSD-8.1# /etc/rc.d/jail start
Configuring jails:.
Starting jails:
 cannot start jail "webserver":
jail: execvp: /bin/sh: Exec format error
 cannot start jail "database":
jail: execvp: /bin/sh: Exec format error
```

I have checked and re-checked my config files and everything looks to have been migrated correctly. I have kept the production-host minimal, since its only function is to host the jails and a 'down for maintenance' page if need be. Am I perhaps missing a service?


```
advoy# pkg_info
apache-2.0.63_15    Version 2.0.x of Apache web server with prefork MPM.
apr-ipv6-devrandom-gdbm-db42-0.9.18.0.9.17 Apache Portability Library
autoconf-2.62       Automatically configure source code on many Un*x platforms
autoconf-wrapper-20071109 Wrapper script for GNU autoconf
automake-1.10.1     GNU Standards-compliant Makefile generator (1.10)
automake-1.9.6_3    GNU Standards-compliant Makefile generator (1.9)
automake-wrapper-20071109 Wrapper script for GNU automake
bigreqsproto-1.1.0  BigReqs extension headers
db42-4.2.52_5       The Berkeley DB package, revision 4.2
expat-2.0.1_1       XML 1.0 parser written in C
gdbm-1.8.3_3        The GNU database manager
gettext-0.18_1      GNU gettext package
gmake-3.81_4        GNU version of 'make' utility
help2man-1.38.2_1   Automatically generating simple manual pages from program o
inputproto-2.0      Input extension headers
jbigkit-1.6         Lossless compression for bi-level images such as scanned pa
jpeg-8_3            IJG's jpeg compression utilities
kbproto-1.0.4       KB extension headers
libX11-1.3.3,1      X11 library
libXau-1.0.5        Authentication Protocol library for X11
libXdmcp-1.0.3      X Display Manager Control Protocol library
libcheck-0.9.8      A unit test framework for C
libgcrypt-1.4.5_1   General purpose crypto library based on code used in GnuPG
libgpg-error-1.7_1  Common error values for all GnuPG components
libiconv-1.13.1_1   A character set conversion library
libpthread-stubs-0.3_3 This library provides weak aliases for pthread functions
libtool-2.2.6b      Generic shared library support script
libxcb-1.6          The X protocol C-language Binding (XCB) library
libxml2-2.7.7       XML parser library for GNOME
libxslt-1.1.26_1    The XSLT C library for GNOME
links-2.2_5,1       Lynx-like text WWW browser
m4-1.4.14_1,1       GNU m4
p5-gettext-1.05_3   Message handling functions
pcre-8.02           Perl Compatible Regular Expressions library
perl-5.10.1_1       Practical Extraction and Report Language
pkg-config-0.23_1   A utility to retrieve information about installed libraries
png-1.4.3           Library for manipulating PNG images
python26-2.6.5      An interpreted object-oriented programming language
screen-4.0.3_7      A multi-screen window manager
tiff-3.9.4          Tools and library routines for working with TIFF images
xcb-proto-1.6       The X protocol C-language Binding (XCB) protocol
xcmiscproto-1.2.0   XCMisc extension headers
xextproto-7.1.1     XExt extension headers
xf86bigfontproto-1.2.0 XFree86-Bigfont extension headers
xorg-macros-1.6.0   X.Org development aclocal macros
xproto-7.0.16       X11 protocol headers
xtrans-1.2.5        Abstract network code for X
```

Thanks in advance.


----------



## ghostcorps (Sep 13, 2010)

Can someone please confirm that this is caused by the Jails being built for FreeBSD 8.1 amd64 while the host is FreeBSD 8.1 i386?


----------



## Savagedlight (Sep 13, 2010)

amd64 binaries won't run on i386.


----------



## ghostcorps (Sep 13, 2010)

Thanks.

I thought so, I only just realised that our webhost installed the i386 version not amd64.

Just to be clear, this is the case even if they (64bit binaries) are run from a jail?


----------



## Savagedlight (Sep 13, 2010)

The jails run the same kernel as the host.
An i386 kernel is not able to run amd64 binaries.

So no, it won't work.


----------



## ghostcorps (Sep 13, 2010)

Got it 

 thanks again.


----------

