Arch32

From ArchWiki
Revision as of 15:50, 27 May 2012 by Spd73 (Talk | contribs) (Alternative Setup (Testing))

Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements.Tango-edit-clear.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Arch32#)
Note: 32-bit chroot for a 64-bit Arch is described in Install bundled 32-bit system in Arch64 in great detail.

First we decide where to place the 32bit system. This variable will be used throughout this page for flexibilty. The given value is just what the author used. If you prefer some other location, this is the time to change it.

ARCH32_ROOT="/opt/arch32"

Now we have to create the directories so that pacman can function and affect changes inside our chroot.

mkdir -p $ARCH32_ROOT/var/{cache/pacman/pkg,lib/pacman}

Below is a helper script which I place in /usr/local/bin/pacman32. It will allow us to run pacman from our 64bit install and it will affect our chroot only. Make sure that if you are not using the default location, to change it here.

#!/bin/bash
ARCH32_ROOT="/opt/arch32"
PACMAN_EXEC="pacman" 

sed -e 's/x86_64/i686/g' /etc/pacman.d/mirrorlist > $ARCH32_ROOT/mirrorlist
sed -e 's@/etc/pacman.d/mirrorlist@/opt/arch32/mirrorlist@g' /etc/pacman.conf > $ARCH32_ROOT/pacman.conf

$PACMAN_EXEC --root $ARCH32_ROOT --cachedir $ARCH32_ROOT/var/cache/pacman/pkg --config $ARCH32_ROOT/pacman.conf "$@"

Now we can sync up our 32bit pacman with the repositories.

/usr/local/bin/pacman32 -Sy

And then we install the bare-minimum that we need to install other 32bit programs and libraries.

/usr/local/bin/pacman32 -S filesystem licenses bash sed coreutils gzip

We now setup some of the meaningful configuration files.

cd $ARCH32_ROOT/etc

ln -f /etc/passwd* 
ln -f /etc/shadow* 
ln -f /etc/group*
ln -f /etc/rc.conf 
ln -f /etc/resolv.conf 
ln -f /etc/localtime 
ln -f /etc/locale.gen 
ln -f /etc/profile.d/locale.sh profile.d
ln -f /etc/vimrc
cp /etc/mtab .

/usr/local/bin/arch32

#!/bin/bash
schroot -p -- "$@"