Jail Creation Fails!

Are you seeing this error?

ELF interpreter /libexec/ld-elf.so.1 not found, error 2

This can happen if during jail creation iocage create -r <release>, a FreeBSD RELEASE is being downloaded, but the operation is interrupted. The places the downloaded release in an indeterminate state, which results in the error if jail creation is reattempted.

To fix this error:

  1. First ascertain what <release> you were trying to download.
  2. Refetch it iocage fetch.

That’s it! Jail creation for that release should work again. In the example below, I had aborted the running of a script during a RELEASE fetch operation. When I ran the script again, it would fail.

# ./rslsync-jail.sh
JAIL_INTERFACES not set, defaulting to: vnet0:bridge0
POOL_PATH defaulting to /mnt/tank
rslsync successfully created!
ELF interpreter /libexec/ld-elf.so.1 not found, error 2
ELF interpreter /libexec/ld-elf.so.1 not found, error 2
ELF interpreter /libexec/ld-elf.so.1 not found, error 2
Stopped rslsync due to VNET failure
Failed to create jail

I refetched the RELEASE after determining it as 12.2 (current at the time).

iocage fetch
[0] 11.2-RELEASE (EOL)
[1] 11.3-RELEASE (EOL)
[2] 11.4-RELEASE
[3] 12.0-RELEASE (EOL)
[4] 12.1-RELEASE
[5] 12.2-RELEASE
Type the number of the desired RELEASE
Press [Enter] to fetch the default selection: (Not a RELEASE)
Type EXIT to quit: 5
Fetching: 12.2-RELEASE
Extracting: base.txz…
Extracting: lib32.txz…
Extracting: src.txz…
Updating 12.2-RELEASE to the latest patch level…
Looking up update.FreeBSD.org mirrors… 3 mirrors found.
Fetching public key from update2.freebsd.org… done.
Fetching metadata signature for 12.2-RELEASE from update2.freebsd.org… done.
Fetching metadata index… done.
Fetching 1 metadata files… done.
Inspecting system… done.
Preparing to download files… done.
No updates needed to update system to 12.2-RELEASE-p0.
No updates are available to install.
Run '/tmp/tmpq3c1amw0 fetch' first.

Running the script was thereafter successful.

# ./rslsync-jail.sh
JAIL_INTERFACES not set, defaulting to: vnet0:bridge0
POOL_PATH defaulting to /mnt/tank
rslsync successfully created!
Testing Host DNS response to pkg.freebsd.org
Testing rslsync's SRV response to pkg.freebsd.org
Testing rslsync's DNSSEC response to pkg.freebsd.org

Keep Reading

PreviousNext

Comments

Leave a Reply