Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 31 Dec 2014 11:40:14 -0800
From: Isaac Dunham <>
Subject: Re: Failed to execute /init (error -2) for system-wide musl

On Wed, Dec 31, 2014 at 07:04:55PM +0100, wrote:
> On NodeOS we are having some problems creating an i686 cross-compiler
> using musl (
> The point is that by generating a fully statically linked Node.js
> executable it boot correctly, but by using a dynamically one we get a
> "Failed to execute /init (error -2)" error. We have crafted the
> cross-compiler following the instructions at
> with no lack. The fact is that
> executables compiled with the cross-toolchain works on our desktops
> but they don't on QEmu, and we've added all the dynamic libraries that
> readelf request (only, & As a
> curious side note, when installing the musl-linked gcc libraries, the
> /lib/ link dissapear from the cross-toochain folder,
> but also adding it by hand all the dynamic linked executables refuse
> to load on QEmu, also a simple "Hello World" that only depends on
> :-/
> We are getting out of ideas, any clue about what could be happening?

I'm not clear what your root filesystem for qemu looks like 
(the contents of /lib are the interesting part).
An ls -l of that directory would be useful.

It *should* look like this:
/lib/ # either file or  -> /lib/
/lib/ # only if is symlink

Note the version numbers.
All of these should be chmod 0755.
The libraries are ordinarily symlinks to the real ones:
$ ls -l /usr/lib/*
lrwxrwxrwx    1 root     root            19 Dec 30 15:27 /usr/lib/ ->
lrwxrwxrwx    1 root     root            19 Dec 30 15:24 /usr/lib/ ->
-rwxr-xr-x    1 root     root        845592 Dec 12 01:38 /usr/lib/

If they are symlinks, check that the symlink target is also present.
> Greetings, and Happy New Year :-)
> Jesús Leganés Combarro "piranna"

And Happy New Year to you, also!

Isaac Dunham

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.