From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9273D138206 for ; Mon, 1 Aug 2016 16:33:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5E09E21C060; Mon, 1 Aug 2016 16:32:57 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id ECD7AE0B85 for ; Mon, 1 Aug 2016 16:32:55 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id q128so26949358wma.1 for ; Mon, 01 Aug 2016 09:32:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:reply-to:subject:date:message-id:user-agent:in-reply-to :references:mime-version; bh=d0EYOzz4dHVd4y2sor8Y9X6vsbGK5q4mt/Qp75Tz9nc=; b=Z+ozbpcthM9qPDPdUc4YduQ87vaSAwnEFqB1ka9MjQ1KjdVOFYg61ieY4+d/e0k3dU 6MlfnqXsRvk5Ov3nb5chrl9ZokWBr5dDK1LuUHXjDcRodpKHWySx5ZhI9PPZd4w+mjXn FZiOvWY13GlpuSxY4QETjsbAMaTJAecJi8jWprqaTsICfM7EAp8wyfnKHYyVvnbjRFl4 9BVlWMQqbJ//IqvHEV/pvrND7Vpip7P95SgqqVObsIDYtBjRblCXC/cVjdqggc8hxsYv GFpZeT4q7h3A0FRMC7EuZiDp9vi/pwIOoXsF8VNTrYnlphfOHR1qXFzi00SR5VlpB+LW f7sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:reply-to:subject:date:message-id :user-agent:in-reply-to:references:mime-version; bh=d0EYOzz4dHVd4y2sor8Y9X6vsbGK5q4mt/Qp75Tz9nc=; b=laZ4nPItA0cZe8w0WvPe+mmI1lHlCcqS8Rk2bY6niUWifm+PPJdnDAtSD2eZz1JHCS 8c5bfgz7nzeWmlWalka9/dVOCJmHFtfBEcAUaYm5rPFCKrdjFHJWWeaJLCAPkCn9Wl8k dt5QYfb+AyKgdEc30qFGsyIQoTbuCyxTsYEkNmbDrKncgkS2bBXcVKrMNvOBSkWFmlfE shepB6RkKMWXAFS1DZBSwajHNp+rVYXrivs5XV/INf79zI4QaLNyMeAaaMipbwNJsg+Q /5wROscWr3zeXWjtJvy68pceyDFmazo7pAEyDDDQ9p8gmBLzHHq9Q+tEKPWpQZDpf4Ir 6z2A== X-Gm-Message-State: AEkoousJi9/Hh82r2GRygkTtT857olzXj7bkAwWMmehL6Xk5MDVmpqf3iVQtHXQKmAQY6Q== X-Received: by 10.28.50.199 with SMTP id y190mr14252487wmy.61.1470069174367; Mon, 01 Aug 2016 09:32:54 -0700 (PDT) Received: from dell_xps.localnet (230.3.169.217.in-addr.arpa. [217.169.3.230]) by smtp.gmail.com with ESMTPSA id va3sm31336127wjb.18.2016.08.01.09.32.53 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Aug 2016 09:32:53 -0700 (PDT) From: Mick To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: [was cross-compile attempt] 32bit chroot Date: Mon, 01 Aug 2016 17:32:58 +0100 Message-ID: <25794541.FjCKaz5n3c@dell_xps> User-Agent: KMail/4.14.10 (Linux/4.4.6-gentoo; KDE/4.14.20; x86_64; ; ) In-Reply-To: <20160801161941.GA411@waltdnes.org> References: <1544697.klPk7OG4O7@dell_xps> <8913347.WbJZnuc41j@dell_xps> <20160801161941.GA411@waltdnes.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5657966.fSLdebrBvQ"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-Archives-Salt: 21a61602-63a5-4966-ab76-c76394297071 X-Archives-Hash: 8febfe457b70e4f60bfd38c05f90892f --nextPart5657966.fSLdebrBvQ Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Monday 01 Aug 2016 12:19:41 waltdnes@waltdnes.org wrote: > On Mon, Aug 01, 2016 at 04:46:24PM +0100, Mick wrote >=20 > > On Monday 01 Aug 2016 11:23:03 waltdnes@waltdnes.org wrote: > > > I recommend going with one of 3 "cheats"... > > >=20 > > > 1) A 32-bit chroot in a 64-bit machine > > >=20 > > > 2) A QEMU (or VirtualBox) 32-bit guest on a 64-bit host > > >=20 > > > 3) If you have a spare 64-bit machine, install 32-bit Gentoo on i= t > > >=20 > > > I use option 2) both as my distccd server and to manually build= Pale > > >=20 > > > Moon. The target in both cases is an ancient 32-bit-only Atom ne= tbook. > >=20 > > I'm trying your cheat (1) above, but I must be doing something wron= g: > >=20 > > gentoo-32bit # linux32 chroot /mnt/iso/gentoo-32bit /bin/bash > > chroot: failed to run command ???/bin/bash???: No such file or dire= ctory > >=20 > > gentoo-32bit # ls -la /bin/bash > > -rwxr-xr-x 1 root root 705400 Jan 9 2016 /bin/bash > >=20 > > gentoo-32bit # ls -la ./bin/bash > > -rwxr-xr-x 1 root root 677244 Jan 16 2016 ./bin/bash > >=20 > > gentoo-32bit # linux32 chroot /mnt/iso/gentoo-32bit ./bin/bash > > chroot: failed to run command ???./bin/bash???: No such file or dir= ectory >=20 > I believe that "/bin/bash" is the pathname after you switch to the > chroot environment. So you would need a 32-bit bash located at > /mnt/iso/gentoo-32bit/bin/bash *BEFORE CHROOTING*. See > https://lwn.net/Articles/252794/ >=20 > > What chroot() actually does is fairly simple, it modifies pathname > > lookups for a process and its children so that any reference to a p= ath > > starting '/' will effectively have the new root, which is passed as= > > the single argument, prepended onto the path. The current working > > directory is left unchanged and relative paths can still refer to > > files outside of the new root. Thanks Walter, it's present along with the whole of the 32bit OS fs: gentoo-32bit # ls -la /mnt/iso/gentoo-32bit/bin/bash =2Drwxr-xr-x 1 root root 677244 Jan 16 2016 /mnt/iso/gentoo-32bit/bin/ba= sh gentoo-32bit # file /mnt/iso/gentoo-32bit/bin/bash /mnt/iso/gentoo-32bit/bin/bash: ELF 32-bit LSB executable, Intel 80386,= =20 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, f= or=20 GNU/Linux 2.6.32, stripped Am I missing something in the amd64 kernel to be able to execute 32bit = code? =2D-=20 Regards, Mick --nextPart5657966.fSLdebrBvQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJXn3m6AAoJELAdA+zwE4Ye7MYH/01zuA0akBvqrtQQim5fkAUH JB4nQr7qHTfO89+KwuX3EO9/7+YUxTGxXFjGgLt4xJ+F2yfQu0lADvPfbwaK3zCK 2M8uGpRaQ5JktmMvdSQXHNrubriYHPPWl2V6iNFbb67fEK+GyN5WRf7MJgDUWGAa kNVs99qZBhvwUez6ecb99Qo2QunRT/sNR+ZInTwLM91k4gzV0M9pHP9dND8gL5Qv MmENDZa1c6IihRFkzgVC3sG2unYgx08sfSwIDNabJXET3NjL++XNoHucI06eE4p/ TnuCdq3G0wG+Up64bX5prI3/cfyxJS9hGzV+9mi3SDe7VP8HAI1B4XcTe0Rz37s= =J1yT -----END PGP SIGNATURE----- --nextPart5657966.fSLdebrBvQ--