Difference between revisions of "Installing 32-bit Fedora on 64-bit Debian"
From Linux-VServer
(→Build vserver) |
(catspec) |
||
(20 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
+ | Guide to install a 32-bit Fedora guest into a 64-bit Debian host. | ||
__TOC__ | __TOC__ | ||
− | =Set up yum repository= | + | ==Set up yum repository== |
host# mkdir /etc/rpm | host# mkdir /etc/rpm | ||
host# mkdir /var/lib/rpm | host# mkdir /var/lib/rpm | ||
− | host# apt-get install yum | + | host# apt-get install yum linux32 |
+ | host# cp -a /usr/lib/util-vserver/distributions/fc6/{yum,yum.repos.d} /etc/vservers/.distributions/fc6 | ||
vserver build does not use /etc/yum*, though you will see an ignorable error message about it if it doesn't exist. | vserver build does not use /etc/yum*, though you will see an ignorable error message about it if it doesn't exist. | ||
− | Edit the files / | + | Edit the files /etc/vservers/.distributions/fc6/yum.repos.d/fedora-{core,updates,extras}.repo |
− | * Uncomment | + | * Uncomment the first baseurl= line of each file (by removing the leading # character) |
− | + | ||
− | + | ||
− | If you use a proxy, append to / | + | ===Proxy=== |
− | proxy=http://proxy. | + | If you use a proxy, append to /etc/vservers/.distributions/fc6/yum/yum.conf (in the [main] section) a line of the form: |
+ | proxy=http://proxy.yourcompany.com:3128 | ||
− | =Build vserver= | + | ==Build vserver== |
host# export ARCH=i386 | host# export ARCH=i386 | ||
− | host# export http_proxy=http://proxy. | + | host# export http_proxy=http://proxy.yourcompany.com:3128 |
− | host# vserver fedora-zod-32-gustname build -m yum --hostname=fedora-zod-32-guestname --interface dummy0=eth0:10.0.0.123/8 --rootdir /var/lib/vservers -- -d fc6 -- --arch i386 | + | host# linux32 vserver fedora-zod-32-gustname build -m yum --context 42 --hostname=fedora-zod-32-guestname --interface dummy0=eth0:10.0.0.123/8 --rootdir /var/lib/vservers -- -d fc6 -- --arch i386 |
host# unset ARCH | host# unset ARCH | ||
− | =Verify= | + | you may also create '''/etc/rpm/platform''' file: |
+ | |||
+ | guest# vi /etc/rpm/platform | ||
+ | i386-redhat-linux-gnu | ||
+ | |||
+ | this way yum and rpm will use i386 packages | ||
+ | |||
+ | NOTE: You may get an error "AttributeError: 'module' object has no attribute 'Context'" when executing this (Debian Lenny 5.0.3) because the gpgme package is too old. You can simply edit the misc.py file and early out that function that fails and the process will continue just fine. See http://openvz.org/pipermail/users/2009-January/002554.html for details. | ||
+ | |||
+ | ==Verify== | ||
To observe the 32-bitness of the guest's applications, do: | To observe the 32-bitness of the guest's applications, do: | ||
− | host# vyum fedora-zod-32-guestname -- install file | + | host# linux32 vyum fedora-zod-32-guestname -- install file |
host# vserver fedora-zod-32-guestname start | host# vserver fedora-zod-32-guestname start | ||
host# vserver fedora-zod-32-guestname enter | host# vserver fedora-zod-32-guestname enter | ||
fedora-zod-32-guestname# file /bin/ls | fedora-zod-32-guestname# file /bin/ls | ||
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped | /bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped | ||
+ | or | ||
+ | host# file /var/lib/vservers/fedora-zod-32-guestname/bin/ls | ||
+ | /var/lib/vservers/fedora-zod-32-guestname/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped | ||
+ | ==See also== | ||
+ | * [[Building Guest Systems]] | ||
+ | * [[Installing Ubuntu on Debian]] | ||
+ | |||
+ | [[Category:OS guest under linux-vserver]] |
Latest revision as of 21:52, 21 October 2011
Guide to install a 32-bit Fedora guest into a 64-bit Debian host.
Contents |
[edit] Set up yum repository
host# mkdir /etc/rpm host# mkdir /var/lib/rpm host# apt-get install yum linux32 host# cp -a /usr/lib/util-vserver/distributions/fc6/{yum,yum.repos.d} /etc/vservers/.distributions/fc6
vserver build does not use /etc/yum*, though you will see an ignorable error message about it if it doesn't exist.
Edit the files /etc/vservers/.distributions/fc6/yum.repos.d/fedora-{core,updates,extras}.repo
- Uncomment the first baseurl= line of each file (by removing the leading # character)
[edit] Proxy
If you use a proxy, append to /etc/vservers/.distributions/fc6/yum/yum.conf (in the [main] section) a line of the form:
proxy=http://proxy.yourcompany.com:3128
[edit] Build vserver
host# export ARCH=i386 host# export http_proxy=http://proxy.yourcompany.com:3128 host# linux32 vserver fedora-zod-32-gustname build -m yum --context 42 --hostname=fedora-zod-32-guestname --interface dummy0=eth0:10.0.0.123/8 --rootdir /var/lib/vservers -- -d fc6 -- --arch i386 host# unset ARCH
you may also create /etc/rpm/platform file:
guest# vi /etc/rpm/platform i386-redhat-linux-gnu
this way yum and rpm will use i386 packages
NOTE: You may get an error "AttributeError: 'module' object has no attribute 'Context'" when executing this (Debian Lenny 5.0.3) because the gpgme package is too old. You can simply edit the misc.py file and early out that function that fails and the process will continue just fine. See http://openvz.org/pipermail/users/2009-January/002554.html for details.
[edit] Verify
To observe the 32-bitness of the guest's applications, do:
host# linux32 vyum fedora-zod-32-guestname -- install file host# vserver fedora-zod-32-guestname start host# vserver fedora-zod-32-guestname enter fedora-zod-32-guestname# file /bin/ls /bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
or
host# file /var/lib/vservers/fedora-zod-32-guestname/bin/ls /var/lib/vservers/fedora-zod-32-guestname/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped