Gentoo Archives: gentoo-amd64

From: Peter Humphrey <prh@××××××××××.uk>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] chroot howto?
Date: Wed, 13 Jul 2005 09:05:06
Message-Id: 42D4D8F4.2050007@gotadsl.co.uk
1 I've decided to have a play with chroot on this ~amd64 xfce4 box, so I
2 followed the instructions at
3 http://www.gentoo.org/proj/en/base/amd64/technotes/index.xml?part=1&chap=4
4 to set up the jail in a separate partition mounted on /mnt/gentoo32. My
5 idea is to use it for e.g. firefox-bin and its plugins, and maybe wine.
6
7 I have a few questions. First, the technotes are far from clear in
8 explaining how the 32-bit chroot jail works, and unhelpful to a chroot
9 acolyte like me in detailing how to build it, so I had to use my
10 initiative - always a grave risk ;-)
11
12 I unpacked an x86 stage 3, and set up hosts, networks and users as
13 instructed, but when I tried "linux32 chroot /mnt/gentoo32 /bin/bash" I
14 got a permission-refused error on /bin/bash. (I tried both with and
15 without --login; it made no difference.) So I unpacked a portage
16 snapshot, rebooted from the installation CD and tried again. I could
17 then chroot. I reasoned that /bin/bash could not be executed because
18 there was no 32-bit kernel, so I emerged and compiled gentoo-sources in
19 /mnt/gentoo32. After that I could chroot from the installed system.
20
21 But how much more of a Gentoo system do I need to build in the chroot
22 jail? Emerge --sync? Emerge system? I have /mnt/tmp bound to
23 /mnt/gentoo32/mnt/tmp, and /mnt/home, /mnt/boot, /mnt/usr/share and
24 /mnt/usr/portage/distfiles bound similarly. Do I need to env-update
25 whenever I chroot? What difference is there between chroot with and
26 without --login, apart from sourcing /etc/profile etc?
27
28 And when I've built it, how do I go about using it? No amount of
29 googling helps me to understand, and the Gentoo docs are more-or-less
30 silent on the subject.
31
32 --
33 Rgds
34 Peter Humphrey
35 Linux Counter 5290, Aug 93.
36
37 --
38 gentoo-amd64@g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] chroot howto? Barry.SCHWARTZ@×××××××××××××.org