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 21:17:06 +0100
From: "" <>
Subject: Re: Failed to execute /init (error -2) for system-wide musl libc

> I'm not clear what your root filesystem for qemu looks like
> (the contents of /lib are the interesting part).

It's being generated by a cpio.txt file (it's being bundle into Linux
kernel to be used as initramfs). You can check it at

> An ls -l of that directory would be useful.
> It *should* look like this:
> /lib
> /lib/ # either file or  -> /lib/
> /lib/ # only if is symlink
> /lib/
> /lib/
> Note the version numbers.

> All of these should be chmod 0755.

Does this to be mandatory? As you can see, I'm using a 0555 permission
on (because it's an executable) and 0444 for the other libs,
and 0111 for the directories. This is on purposse, both for security
and to keep users eyes out of ugly things and internal implementation
details (they should only worry about Node.js APIs).

Anyway, this gave me and idea and reviewing the cpio.txt file I've
found this line:

#dir /lib 0111 0 0

I uncommented it and the Hello World init has written to the console,
so I've just recompile using Node.js as /init, and...

> [    2.255765] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3
[    2.863453] Switched to clocksource tsc
1 +1
> Date()
'Wed Dec 31 2014 20:08:31 GMT+0000 (GMT)'

/me head banging in the wall X-D I'll do some more tests, but seems
that was the issue X-D If so, probably it's a bug on the Linux kernel
initramfs builder (gen_init_cpio), because the .cpio.gz file is being
correctly generated and include the libraries without raising an
error... :-/

> 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!

Thank you! ^^

"Si quieres viajar alrededor del mundo y ser invitado a hablar en un
monton de sitios diferentes, simplemente escribe un sistema operativo
– Linus Tordvals, creador del sistema operativo Linux

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.