1 |
On Monday 01 Aug 2016 12:19:41 waltdnes@××××××××.org wrote: |
2 |
> On Mon, Aug 01, 2016 at 04:46:24PM +0100, Mick wrote |
3 |
> |
4 |
> > On Monday 01 Aug 2016 11:23:03 waltdnes@××××××××.org wrote: |
5 |
> > > I recommend going with one of 3 "cheats"... |
6 |
> > > |
7 |
> > > 1) A 32-bit chroot in a 64-bit machine |
8 |
> > > |
9 |
> > > 2) A QEMU (or VirtualBox) 32-bit guest on a 64-bit host |
10 |
> > > |
11 |
> > > 3) If you have a spare 64-bit machine, install 32-bit Gentoo on it |
12 |
> > > |
13 |
> > > I use option 2) both as my distccd server and to manually build Pale |
14 |
> > > |
15 |
> > > Moon. The target in both cases is an ancient 32-bit-only Atom netbook. |
16 |
> > |
17 |
> > I'm trying your cheat (1) above, but I must be doing something wrong: |
18 |
> > |
19 |
> > gentoo-32bit # linux32 chroot /mnt/iso/gentoo-32bit /bin/bash |
20 |
> > chroot: failed to run command ???/bin/bash???: No such file or directory |
21 |
> > |
22 |
> > gentoo-32bit # ls -la /bin/bash |
23 |
> > -rwxr-xr-x 1 root root 705400 Jan 9 2016 /bin/bash |
24 |
> > |
25 |
> > gentoo-32bit # ls -la ./bin/bash |
26 |
> > -rwxr-xr-x 1 root root 677244 Jan 16 2016 ./bin/bash |
27 |
> > |
28 |
> > gentoo-32bit # linux32 chroot /mnt/iso/gentoo-32bit ./bin/bash |
29 |
> > chroot: failed to run command ???./bin/bash???: No such file or directory |
30 |
> |
31 |
> I believe that "/bin/bash" is the pathname after you switch to the |
32 |
> chroot environment. So you would need a 32-bit bash located at |
33 |
> /mnt/iso/gentoo-32bit/bin/bash *BEFORE CHROOTING*. See |
34 |
> https://lwn.net/Articles/252794/ |
35 |
> |
36 |
> > What chroot() actually does is fairly simple, it modifies pathname |
37 |
> > lookups for a process and its children so that any reference to a path |
38 |
> > starting '/' will effectively have the new root, which is passed as |
39 |
> > the single argument, prepended onto the path. The current working |
40 |
> > directory is left unchanged and relative paths can still refer to |
41 |
> > files outside of the new root. |
42 |
|
43 |
Thanks Walter, it's present along with the whole of the 32bit OS fs: |
44 |
|
45 |
gentoo-32bit # ls -la /mnt/iso/gentoo-32bit/bin/bash |
46 |
-rwxr-xr-x 1 root root 677244 Jan 16 2016 /mnt/iso/gentoo-32bit/bin/bash |
47 |
|
48 |
gentoo-32bit # file /mnt/iso/gentoo-32bit/bin/bash |
49 |
/mnt/iso/gentoo-32bit/bin/bash: ELF 32-bit LSB executable, Intel 80386, |
50 |
version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for |
51 |
GNU/Linux 2.6.32, stripped |
52 |
|
53 |
|
54 |
Am I missing something in the amd64 kernel to be able to execute 32bit code? |
55 |
-- |
56 |
Regards, |
57 |
Mick |