From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6771 Path: news.gmane.org!not-for-mail From: "piranna@gmail.com" Newsgroups: gmane.linux.lib.musl.general Subject: Re: Failed to execute /init (error -2) for system-wide musl libc Date: Wed, 31 Dec 2014 21:17:06 +0100 Message-ID: References: <20141231194014.GE1809@newbook> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1420057067 24295 80.91.229.3 (31 Dec 2014 20:17:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Dec 2014 20:17:47 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6784-gllmg-musl=m.gmane.org@lists.openwall.com Wed Dec 31 21:17:43 2014 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Y6Pi7-0005op-Dg for gllmg-musl@m.gmane.org; Wed, 31 Dec 2014 21:17:39 +0100 Original-Received: (qmail 3903 invoked by uid 550); 31 Dec 2014 20:17:38 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 3895 invoked from network); 31 Dec 2014 20:17:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=s+Hdklax7Ip4IugDbCBimPC/LvbiuYiecpXFvERiw+A=; b=PaFKUedoAYOqJLKXJHshOgtryySUoBT2uXhmqPOou7+9N8poWkaCgmUVm/LAjiM+hZ WZIhNIqk8mm4uCe1POqjlnb24uJfQLnOYm/acFPmIS54KPpHa1FrxEwVPw7dGwiuykj+ 3R2CowNvgdRZvzA0pGfSYp7Ql6jGtKJXaeYaceOiQBl4XIv9w5n5Jhx9RU4lhTf0ZCtV UGCFccTDL2icMONWEewSIMzPUe59WmiYauD2w4NR99bHXmtHpOiR+4bwYv9tf5nAozxu SJy61L9yDGbj7JTc9/tkMqk0CEtcqcJgwGfQEf3/5nB01ZvOoEmYajyEBLraMMfv191f C/mg== X-Received: by 10.194.60.19 with SMTP id d19mr129449181wjr.48.1420057046368; Wed, 31 Dec 2014 12:17:26 -0800 (PST) In-Reply-To: <20141231194014.GE1809@newbook> Xref: news.gmane.org gmane.linux.lib.musl.general:6771 Archived-At: > 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 https://github.com/NodeOS/NodeOS/pull/89/files#diff-2 > An ls -l of that directory would be useful. > > It *should* look like this: > /lib > /lib/ld-musl-i386.so.1 # either file or -> /lib/libc.so > /lib/libc.so # only if ld-musl-i386.so.1 is symlink > /lib/libstdc++.so.6 > /lib/libgcc_s.so.1 > > 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 libc.so (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/platfor= m/i8042/serio1/input/input3 [ 2.863453] Switched to clocksource tsc 1 +1 2 > 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/libstdc++.so* > lrwxrwxrwx 1 root root 19 Dec 30 15:27 /usr/lib/libstdc= ++.so -> libstdc++.so.6.0.20 > lrwxrwxrwx 1 root root 19 Dec 30 15:24 /usr/lib/libstdc= ++.so.6 -> libstdc++.so.6.0.20 > -rwxr-xr-x 1 root root 845592 Dec 12 01:38 /usr/lib/libstdc= ++.so.6.0.20 > > > If they are symlinks, check that the symlink target is also present. > >> Greetings, and Happy New Year :-) >> >> Jes=C3=BAs Legan=C3=A9s Combarro "piranna" > > And Happy New Year to you, also! Thank you! ^^ --=20 "Si quieres viajar alrededor del mundo y ser invitado a hablar en un monton de sitios diferentes, simplemente escribe un sistema operativo Unix." =E2=80=93 Linus Tordvals, creador del sistema operativo Linux