The architecture is amd64, so some 32-bit applications could not work well, even with ia32 libs. One solution is to build 32-bit chroot environment. Not only for 32-bit, of course.
Follow the official tutorial.
Install needed packages for building
sudo apt-get install debootst
make a directory to place the new system.
Build the basic system
debootstrap --arch i386 sid /chroot http://ftp.debian.org/debian/
sid is the version, and /chroot is the directory created just now, and the mirror URL follows. Change the i386 into any architecture you like, e.g., amd64.
Mount /dev and /proc
#/etc/fstab /dev /chroot/dev none bind 0 0 /proc /chroot/proc proc defaults 0 0 /sys /chroot/sys none bind 0 0
run ‘mount -a’ to mount. And other directories like $HOME can be mounted as you like.
Now, we can use
sudo chroot /chroot
to change the environment into /chroot
schroot is a more powerful tool to chroot.
sudo apt-get install schroot sudo vi /etc/schroot/schroot.conf
uncomment the first part. change the users, groups, root-groups to your own.
now sudo is not needed any more.
There is a parameter, ‘-p’, which introduces the environment vars of the external system, while I prefer to configure the env vars myself.
- X window cannot be opened.
The system should know which display to show the window. It prompts
unable to open display ""
sometimes it doesn’t work, please try
I don’t know the reason, but it actually works on mine.
uncheck ‘Deny TCP connections to Xserver’ on the ‘Security’ tab.
to $HOME/.profile to make sure localhost is permitted to use X.
- copy hosts/resolve.conf to the chroot automatically
all files’ name should be put in /etc/schroot/copyfiles-defaults, extra files, like .vimrc, .bashrc, can be added on demand. Add
to schroot.conf. So that schroot will deal with the file copying, mounting, proc killing when logout, and so on.
All the scripts are located in /etc/schroot.ap