The chroot command and system call starts a process with a view of the filesystem that's restricted to a subtree of the directory tree. You can install a 32-bit system on a 64-bit system that way, or a different release of your distribution, or a testing environment with different sets of packages installed. The idea is to install an alternate distribution in a subtree and run from that. It is worded in terms of installing a 32-bit Ubuntu inside a 64-bit Ubuntu, but should apply with minor modifications to other situations, such as installing Debian unstable inside Debian stable or vice versa. This section is a guide to installing a Debian-like distribution “inside” another Linux distribution. Schroot described below takes care of this. Note that uname -m will still show 圆4_64 if you're running a 64-bit kernel, regardless of what 32-bit user mode components you have installed. Pass the -m32 option to gcc to compile for ix86. You may find binutils-multiarch useful as well, and ia32-libs-dev on Debian. For development, install gcc-multilib, and again possibly other packages that depend on it such as g++-multilib. Your 32-bit executables should simply run if you have all the required libraries. Install the ia32-libs package to have a basic set of 32-bit libraries, and possibly other packages that depend on this one. In older releases, Debian and Ubuntu ship with a number of 32-bit libraries on amd64. See warl0ck's answer for a simple, up-to-date answer. See Ubuntu or Debian wiki more information. Current Debian and Ubuntu have multiarch support: You can mix x86_32 (i386) and x86_64 (amd64) packages on the same system in a straightforward way.
0 Comments
Leave a Reply. |