Gentoo Archives: gentoo-amd64

From: Billy Holmes <billy@××××××.net>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] linux32 or chroot
Date: Thu, 03 Nov 2005 16:37:45
Message-Id: 436A3D85.9090608@gonoph.net
In Reply to: [gentoo-amd64] linux32 or chroot by sean
1 sean wrote:
2 > So would a chroot environment perhaps help with the problem apps?
3 > I am sure I am not the first on this path, so how have some you done who
4 > have tried these games?
5
6 I've always found that the chroot just makes things work easier. Yes,
7 you have a large investment period (creating the chroot), but in the end
8 I've *always* found that it works better than trying to get the 32 bit
9 emul-* libraries to work under x86_64.
10
11 Some programs mistakenly try and link to the 64-bit libs first, even if
12 the 32-bit libs are available. I've had to create nasty LD_LIBRARY_PATH
13 statements, and mess around with the order in ld.so.conf to get things
14 to semi work.
15
16 Yes, this is also a shameless plug, but you will soon find that doing
17 this to get into your chroot as your normal user:
18
19 $ sudo linux32 chroot /home/32-bit su - user1 -c id
20
21 starts to get very tiring...
22
23 Because of that, I created a utility that combines the code of those
24 commands into one command. One problem though.. /home/32-bit is
25 hard-coded in my utility, I wasn't able to come up with a secure way to
26 read that parameter from a config file - and still keep the source small.
27
28 Here's the bugzilla for it:
29 http://bugs.gentoo.org/show_bug.cgi?id=111367
30
31 and here's a snippet from my web page about it:
32 http://www.gonoph.net/node/37
33
34 The ebuild is also in the archive. Another thing to note about 32-bit
35 chroots:
36
37 in my 32-bit chroot, I've created symlinks from the main /home/ for all
38 the users directories to point into the 32-bit chroot, I also bound /tmp
39 (mount -bind) into the 32-bit chroot, as well as the root home directory
40 /root. This gives me the advantage of switching in and out of the
41 chroot, while still giving the illusion that I'm in the same home
42 directory and same /tmp - and X clients that use unix pipes to
43 communicate to the X server still work as well.
44 --
45 gentoo-amd64@g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] linux32 or chroot Antoine Martin <antoine@××××××××××.uk>
Re: [gentoo-amd64] linux32 or chroot Nuitari <nuitari@××××××××××××××××.net>