#!/bin/sh # Install a 32 bit chroot containing Sun's Java and a web browser # so you can use e.g. Juniper's Network Connect on a 64 bit Ubuntu system # See also: # https://help.ubuntu.com/community/DebootstrapChroot # http://www.cyberciti.biz/faq/howto-ubuntu-linux-install-configure-jdk-jre/ # http://mad-scientist.us/juniper.html # http://wiki.xdroop.com/space/Linux/Juniper/SSL+VPN+on+64-bit+Linux # # Dan Kegel, 2012 set -e set -x sudo apt-get install schroot debootstrap if ! test -f /etc/schroot/chroot.d/web32 then cat <<_EOF_ >> web32 [web32] description=Ubuntu 11.10 32 bit directory=/var/chroot/web32 users=$LOGNAME root-users=$LOGNAME type=directory personality=linux32 _EOF_ sudo cp web32 /etc/schroot/chroot.d/web32 fi sudo mkdir -p /var/chroot/web32 sudo debootstrap --variant=buildd --arch i386 oneiric /var/chroot/web32 http://archive.ubuntu.com/ubuntu/ echo Next command should show 'web32' schroot -l # This command has trouble during unmount, should we sleep before returning? schroot -c web32 -u root -- apt-get install ubuntu-minimal echo Next command should show Ubuntu 11.10 32 bit is installed schroot -c web32 -- lsb_release -a echo Installing firefox and java schroot -c web32 -u root -- apt-get install firefox # To prevent error "UnicodeEncodeError: 'ascii' codec can't encode character", # must install locale data and set LANG when runnning add-apt-repository schroot -c web32 -u root apt-get install language-pack-en # These are the only three commands needed on 32 bit Ubuntu 11.10 systems echo | schroot -c web32 -u root env LANG=en_US.utf8 add-apt-repository ppa:ferramroberto/java schroot -c web32 -u root apt-get update schroot -c web32 -u root apt-get install sun-java6-jdk sun-java6-plugin echo 'The 32 bit firefox should report it has java when you click on "Verify Java Version" at this web site' schroot -c web32 -p firefox http://java.com/en/download/installed.jsp