Page 1 of 1

New jail setup -> ELF interpreter /libexec/ld-elf.so.1 not f

Posted: 16 Mar 2013 15:27
by himbrr
Hi guys,

I have upgraded my x86 system to a x64 system.
Ok not really upgraded... a fesh installation of a full x64 version on my system partition.
The data disk haven't been cleared.

I have loaded the configuration from the old system, so all shares are mounted again, etc.
Working good so far, but there's an creepy issue with the jails.

I followed the wiki instructions for setting up the jails.
Downloaded the base.txz and lib32.txz (last one wasn't needed for x86). Created all files, prepared the first "proto" jail and rebooted.
And then.... I tried to start the jail.
It should be autostarted after reboot, all folders have been mounted successfully, but the jail didn't start.
I tried to start the jail manually, but only get an error:

Code: Select all

nas4free:~# /etc/rc.d/jail start
Configuring jails:.
Starting jails:ELF interpreter /libexec/ld-elf.so.1 not found
 cannot start jail "proto":
.
I tried to check, if any jails are running:

Code: Select all

nas4free:~# jls
ELF interpreter /libexec/ld-elf.so.1 not found
Abort
Same error... did i make a mistake?

Kind regards,
himbrr

Re: New jail setup -> ELF interpreter /libexec/ld-elf.so.1 n

Posted: 16 Mar 2013 17:00
by alexey123
May be you use 32-bit binaries with 64-bit kernel?

Re: New jail setup -> ELF interpreter /libexec/ld-elf.so.1 n

Posted: 16 Mar 2013 17:51
by himbrr
Hum? How do you mean this?

I have downloaded the latest x64 nas4free build and made a clean install (excluding the data hdds).

Code: Select all

Version	9.1.0.1 - Sandstorm (revision 636)
Build date	Tue Feb 5 01:10:15 CET 2013 
Platform OS	 FreeBSD 9.1-RELEASE (reldate 901000) 
Platform	 x64-full on Intel(R) Celeron(R) CPU G530 @ 2.40GHz 
System	ASUSTeK COMPUTER INC. P8H77-I

Also installed mysql & phpmyadmin yet. But the jails wont work...

Re: New jail setup -> ELF interpreter /libexec/ld-elf.so.1 n

Posted: 16 Mar 2013 18:56
by alexey123
Check with Nas4free host

Code: Select all

ldd -a `which jail`
Check, if really present /libexec/ld-elf.so.1 into host and into jail.
If your jail not have library, just copy it from host

Code: Select all

cp /libexec/ld-elf.so.1 /path/to/jail/proto/libexec/

Re: New jail setup -> ELF interpreter /libexec/ld-elf.so.1 n

Posted: 16 Mar 2013 19:06
by himbrr

Code: Select all

nas4free:/# ldd -a `which jail`
ldd: /usr/bin/ldd32: No such file or directory
The ld-elf.so.1 already exists in the jail. But in the host I have no ld-elf32.so.1. Maybe copy the jail one's to the host?

Code: Select all

nas4free:/jail# ls proto/libexec/
ld-elf.so.1     ld-elf32.so.1   resolvconf

Re: New jail setup -> ELF interpreter /libexec/ld-elf.so.1 n

Posted: 16 Mar 2013 19:52
by fsbruva
1. Are you sure you downloaded the amd64 base?
2. Are you doing any unionfs mounts on the Nas4Free host?

Re: New jail setup -> ELF interpreter /libexec/ld-elf.so.1 n

Posted: 16 Mar 2013 20:01
by himbrr
fsbruva wrote:1. Are you sure you downloaded the amd64 base?
I have downloaded the base via the link in the wiki:
fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/`uname -m`/`uname -m`/`uname -r | cut -d- -f1-2`/base.txz
And my host says:
nas4free:~# uname -a
FreeBSD nas4free.local 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r246186M: Fri Feb 1 00:21:40 CET 2013 root@dev.nas4free.org:/usr/obj/nas4free/usr/src/sys/NAS4FREE-amd64 amd64
->amd64, so this should have been chosen the right one.
fsbruva wrote:2. Are you doing any unionfs mounts on the Nas4Free host?
I don't know what this is... but i have mounted the /jail from my ZFS data disks.


Copied the ld-elf32.so.1 from jail to the host's /libexec/.
Now I'm getting another error...

Code: Select all

nas4free:~# /etc/rc.d/jail start
Configuring jails:.
Starting jails: cannot start jail "proto":
.
nas4free:~# jls
Shared object "libjail.so.1" not found, required by "jls"
Are any major files missing in the latest n4f build?

Re: New jail setup -> ELF interpreter /libexec/ld-elf.so.1 n

Posted: 16 Mar 2013 20:58
by himbrr
Just checked the path of libjail.so.1 on the host...
This is in /lib/ ... don't know why this won't be found...

Re: New jail setup -> ELF interpreter /libexec/ld-elf.so.1 n

Posted: 16 Mar 2013 22:53
by himbrr
EDIT: Working now... extracted the lib32.txz also to the host.

Summary: Extract the lib32.txz also on the host to /
Otherwise you can only run x64 programs. Don't know why they aren't included in the x64 build.