Difference between revisions of "Arch32"

From ArchWiki
Jump to: navigation, search
Line 4: Line 4:
 
  mkdir -p $ARCH32_ROOT/var/{cache/pacman/pkg,lib/pacman}
 
  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.
 
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.
/usr/local/bin/pacman32:
 
 
  #!/bin/bash
 
  #!/bin/bash
 
  ARCH32_ROOT="/opt/arch32"
 
  ARCH32_ROOT="/opt/arch32"
Line 14: Line 13:
 
   
 
   
 
  $PACMAN_EXEC --root $ARCH32_ROOT --cachedir $ARCH32_ROOT/var/cache/pacman/pkg --config $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
 
/usr/local/bin/arch32
 
/usr/local/bin/arch32
 
  #!/bin/bash
 
  #!/bin/bash
 
  schroot -p -- "$@"
 
  schroot -p -- "$@"

Revision as of 10:07, 10 August 2009

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

/usr/local/bin/arch32

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