author: Jue
updated by: Acrux


How to test (or install) a release using a chroot environment

Step 1: prepare your target chroot

# CHROOT=/crux-ppc-2.6
# mkdir $CHROOT
# mkdir -p $CHROOT/var/lib/pkg
# touch $CHROOT/var/lib/pkg/db

Step 2: install core packages

On a host with a pkgadd binary (typically when doing this on a CRUX PPC host):

# mount -o loop crux-ppc-2.6.iso /mnt
# cd /mnt/crux
# for p in core/* ; do pkgadd -r $CHROOT $p; done

On a host without pkgadd binary:

# mount -o loop crux-ppc-2.6.iso /mnt
# cd /mnt/crux
# tar xvf /mnt/crux/core/pkgutils#5.34.2-2.pkg.tar.gz usr/bin/pkgadd -O > /tmp/pkgadd
# for p in core/* ; do /tmp/pkgadd -r $CHROOT $p; done

Step 3: copy DNS settings

# cp /etc/resolv.conf $CHROOT/etc

Step 4: activate your chroot

# mount -t proc proc $CHROOT/proc
# mount --bind /dev $CHROOT/dev
# mount --bind /sys $CHROOT/sys
# chroot $CHROOT /bin/bash

This step (#4) has to be repeated after every reboot

Step 5: verify your chroot

# crux
CRUX PPC (32 bit) version 2.6
# gcc -v
 ...
gcc version 4.4.2 (CRUX PPC) (GCC)
# ports -u
...
new: current release