* [gentoo-commits] gentoo commit in xml/htdocs/proj/en/base/amd64/howtos: chroot.xml
@ 2008-12-26 19:36 Joshua Saddler (nightmorph)
0 siblings, 0 replies; 3+ messages in thread
From: Joshua Saddler (nightmorph) @ 2008-12-26 19:36 UTC (permalink / raw
To: gentoo-commits
nightmorph 08/12/26 19:36:17
Modified: chroot.xml
Log:
fixed amd64 doc to use util-linux rather than setarch, bug 207395
Revision Changes Path
1.13 xml/htdocs/proj/en/base/amd64/howtos/chroot.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/base/amd64/howtos/chroot.xml?rev=1.13&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/base/amd64/howtos/chroot.xml?rev=1.13&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/proj/en/base/amd64/howtos/chroot.xml?r1=1.12&r2=1.13
Index: chroot.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/amd64/howtos/chroot.xml,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- chroot.xml 1 Jun 2007 01:54:23 -0000 1.12
+++ chroot.xml 26 Dec 2008 19:36:17 -0000 1.13
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/amd64/howtos/chroot.xml,v 1.12 2007/06/01 01:54:23 angelos Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/amd64/howtos/chroot.xml,v 1.13 2008/12/26 19:36:17 nightmorph Exp $ -->
<!-- The content of this document is licensed under the CC-BY-SA license -->
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
@@ -17,8 +17,8 @@
<license/>
-<version>1.0</version>
-<date>2006-09-16</date>
+<version>1.1</version>
+<date>2008-12-26</date>
<chapter>
<title>Introduction</title>
@@ -118,8 +118,8 @@
Now we're ready to switch inside the chroot.
</p>
<pre caption="Changing inside the chroot">
-<i>(Only perform this step if you don't have setarch already installed)</i>
-# emerge setarch
+<i>(Only perform this step if you don't have util-linux already installed)</i>
+# emerge util-linux
# linux32 chroot /mnt/gentoo32 /bin/bash
<i>(Make sure we have a i686 setup)</i>
# uname -m
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gentoo-commits] gentoo commit in xml/htdocs/proj/en/base/amd64/howtos: chroot.xml
@ 2012-10-28 15:20 Sven Vermeulen (swift)
0 siblings, 0 replies; 3+ messages in thread
From: Sven Vermeulen (swift) @ 2012-10-28 15:20 UTC (permalink / raw
To: gentoo-commits
swift 12/10/28 15:20:58
Modified: chroot.xml
Log:
Removing link attribute from guides
Revision Changes Path
1.14 xml/htdocs/proj/en/base/amd64/howtos/chroot.xml
file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/base/amd64/howtos/chroot.xml?rev=1.14&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/base/amd64/howtos/chroot.xml?rev=1.14&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/base/amd64/howtos/chroot.xml?r1=1.13&r2=1.14
Index: chroot.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/amd64/howtos/chroot.xml,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- chroot.xml 26 Dec 2008 19:36:17 -0000 1.13
+++ chroot.xml 28 Oct 2012 15:20:58 -0000 1.14
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/amd64/howtos/chroot.xml,v 1.13 2008/12/26 19:36:17 nightmorph Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/amd64/howtos/chroot.xml,v 1.14 2012/10/28 15:20:58 swift Exp $ -->
<!-- The content of this document is licensed under the CC-BY-SA license -->
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
-<guide link="/proj/en/base/amd64/howtos/chroot.xml" lang="en" >
+<guide lang="en" >
<title>How to set up a 32bit chroot</title>
<author title="Author">
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gentoo-commits] gentoo commit in xml/htdocs/proj/en/base/amd64/howtos: chroot.xml
@ 2012-11-16 18:39 Agostino Sarubbo (ago)
0 siblings, 0 replies; 3+ messages in thread
From: Agostino Sarubbo (ago) @ 2012-11-16 18:39 UTC (permalink / raw
To: gentoo-commits
ago 12/11/16 18:39:44
Modified: chroot.xml
Log:
add emerge --sync and better syntax with xml tag
Revision Changes Path
1.15 xml/htdocs/proj/en/base/amd64/howtos/chroot.xml
file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/base/amd64/howtos/chroot.xml?rev=1.15&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/base/amd64/howtos/chroot.xml?rev=1.15&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/base/amd64/howtos/chroot.xml?r1=1.14&r2=1.15
Index: chroot.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/amd64/howtos/chroot.xml,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- chroot.xml 28 Oct 2012 15:20:58 -0000 1.14
+++ chroot.xml 16 Nov 2012 18:39:44 -0000 1.15
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/amd64/howtos/chroot.xml,v 1.14 2012/10/28 15:20:58 swift Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/amd64/howtos/chroot.xml,v 1.15 2012/11/16 18:39:44 ago Exp $ -->
<!-- The content of this document is licensed under the CC-BY-SA license -->
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
@@ -17,20 +17,23 @@
<license/>
-<version>1.1</version>
-<date>2008-12-26</date>
+<version>2</version>
+<date>2012-11-16</date>
<chapter>
<title>Introduction</title>
<section>
<title>Introduction to 64bit system</title>
<body>
+
<p>
The Gentoo Linux 32bit chroot guide will help you setting up a true 32bit chroot for your Gentoo/AMD64 system.
</p>
+
<p>
As you know 64bit systems don't run 32bit applications natively yet (at least not with portage) so you need to use emulation libraries to make them working or create a true 32bit system inside a chroot to install and run native 32bit applications. For the most common uses you do not need do build a 32bit chroot system. However, if you want to run applications that don't have a binary available to run with 32bit libraries, you should use a 32bit chroot. This guide will teach you how to set up a 32bit chroot and how to install and run applications inside the chroot.
</p>
+
</body>
</section>
</chapter>
@@ -40,34 +43,43 @@
<section>
<title>Installation of your 32bit chroot</title>
<body>
+
<p>
To install a 32bit chroot you need to follow many footsteps that you use to install Gentoo Linux on a x86 computer. For now you need the latest stage3 available on our <uri link="http://www.gentoo.org/main/en/mirrors.xml">mirrors</uri>.
</p>
+
<pre caption="downloading stage3 from a gentoo mirror">
$ cd /home/user/downloads
$ wget -c ftp://distfiles.gentoo.org/releases/x86/2006.1/stages/stage3-i686-2006.1.tar.bz2
</pre>
+
<note>Note that we download a stage for x86, <c>not</c> for AMD64.</note>
+
<p>
After downloading the stage3 you need to create a new directory to build your new chroot.
</p>
+
<pre caption="creating directory for 32bit chroot">
$ su root <i>insert your root password</i>
# cd /mnt
# mkdir gentoo32
</pre>
+
<p>
Then move the stage you have already downloaded, unpack it and set it up it like this example.
</p>
+
<pre caption="installing from stage3">
# cd /mnt/gentoo32
# tar -xvjpf /home/user/downloads/stage3-i686-2006.1.tar.bz2
# cp -L /etc/resolv.conf /mnt/gentoo32/etc/
# cp -L /etc/passwd /mnt/gentoo32/etc/
</pre>
+
<p>
Now you have the chroot ready for setup. Read the next chapter to learn how to set it up.
</p>
+
</body>
</section>
</chapter>
@@ -77,21 +89,26 @@
<section>
<title>Doing a setup for your new 32bit chroot</title>
<body>
+
<p>
If everything went well until here now you will be able to set up your new 32bit chroot and finish the installation of this chroot.
</p>
+
<p>
The next step is to setup your new <c>/mnt/gentoo32/etc/make.conf</c>.
</p>
+
<pre caption="Configuring your new make.conf">
CFLAGS="-O2 -march=athlon-xp -msse2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
</pre>
+
<p>
Now mount the various bogus file systems:
</p>
+
<pre caption="Mount virtual file systems">
# mount -o bind /dev /mnt/gentoo32/dev
# mount -o bind /dev/pts /mnt/gentoo32/dev/pts
@@ -100,23 +117,30 @@
# mount -o bind /proc/bus/usb /mnt/gentoo32/proc/bus/usb
# mount -o bind /sys /mnt/gentoo32/sys
</pre>
+
<p>
Now you have a true 32bit chroot installed in your 64bits system which is almost ready for use. Next, you need to create a link from your portage available in your 64bit system to your chroot. This way, you only need to update it in one installation instead of duplicating a lot of data.
</p>
+
<pre caption="Link portage to /usr/portage inside the 32bit chroot">
# mkdir -p /mnt/gentoo32/usr/portage/
# mount -o bind /usr/portage /mnt/gentoo32/usr/portage/
</pre>
+
<note>Everytime you update your portage by doing a emerge sync, you update your 32bit chroot's portage as well.</note>
+
<p>
If you want to run 32bit applications which use X, you also need to mount /tmp.
</p>
+
<pre caption="Mount /tmp for applications with a GUI">
# mount -o bind /tmp /mnt/gentoo32/tmp
</pre>
+
<p>
Now we're ready to switch inside the chroot.
</p>
+
<pre caption="Changing inside the chroot">
<i>(Only perform this step if you don't have util-linux already installed)</i>
# emerge util-linux
@@ -125,18 +149,24 @@
# uname -m
i686
</pre>
+
<warn>The <c>linux32</c> util is needed to change the CHOST value. If you forget it, you're likely to be unable to compile anything inside the chroot environment.</warn>
+
<p>
Now you have a new 32bit chroot system ready to be updated. Follow the next steps to update it.
</p>
+
<pre caption="Updating your new 32bit chroot">
# source /etc/profile
# env-update
-# emerge -au world
+# emerge --sync
+# emerge -auDN world
</pre>
+
<p>
After this you basically have finished the setup of your 32bit chroot. To make things more suitable, we are going to set up a new file in your 64bit system to enable the 32bit chroot when booting.
</p>
+
<pre caption="creating a new file in /etc/init.d">
# nano -w /etc/init.d/gentoo32
#!/sbin/runscript
@@ -181,15 +211,19 @@
eend $? "An error occured while attempting to unmount 32bit chroot directories"
}
</pre>
+
<p>
Now you only need to run <c>rc-update add gentoo32 default</c> to run it at boot time.
</p>
+
<p>
Whenever you want to switch to your chroot environment, you only need to run the following command: <c>linux32 chroot /mnt/gentoo32 /bin/bash</c>.
</p>
+
<p>
Now you have your 32bit chroot ready to install new applications.
</p>
+
</body>
</section>
</chapter>
@@ -199,26 +233,33 @@
<section>
<title>Installing new applications in your chroot</title>
<body>
+
<p>
Now that you have a fully functional 32bit chroot you can install every application in 32bit mode. Let's see how you can install new packages on your 32bit chroot.
</p>
+
<pre caption="Install foo inside the chroot">
# linux32 chroot /mnt/gentoo32 /bin/bash
# source /etc/profile
# env-update
# emerge foo
</pre>
+
<note>Always remember to do <c>source /etc/profile</c> and <c>env-update</c> after switching inside the chroot.</note>
+
<p>
You now have installed a new package in your 32bit chroot. If you want to run your new package you need to run it inside of your chroot. If you want to run
X applications the best solution to run it is doing the <c>xhost</c> trick. Everytime you need to run a X application run the this command in your 64bit environment:
</p>
+
<pre caption="Xhost trick">
# xhost local:localhost
</pre>
+
<p>
After this get inside your chroot again and you should be able to run every X application you build inside your 32bit chroot.
</p>
+
</body>
</section>
</chapter>
@@ -228,9 +269,11 @@
<section>
<title>Conclusion of this guide</title>
<body>
+
<p>
With this chroot you can install many packages available only for x86 arch. Some packages like <c>OpenOffice</c> can be installed by using the binary available for Gentoo/AMD64. Some of the codecs available for <c>MPlayer</c> need this 32bit chroot so you can install <c>win32codecs</c> with this chroot.
</p>
+
</body>
</section>
</chapter>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-16 18:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-16 18:39 [gentoo-commits] gentoo commit in xml/htdocs/proj/en/base/amd64/howtos: chroot.xml Agostino Sarubbo (ago)
-- strict thread matches above, loose matches on Subject: below --
2012-10-28 15:20 Sven Vermeulen (swift)
2008-12-26 19:36 Joshua Saddler (nightmorph)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox