- Running 32bit apps in a 64bit environment.
A secure "jail" for software to run in and not see or touch the rest of the filesystem.
Wine -- I did some experimentation with a chroot in wine
It's something like this:
mount --bind /dev /mnt/dev mount --bind /tmp /mnt/tmp mount -t proc proc /mnt/proc mount -t sysfs none /mnt/sys chroot /mnt /bin/bash
Other notes under Sometimes chroot only works with UID 0.
I, however, wanted to get back into programming in Mythryl.
As I understand, the usual way to run 32bit applications on a 64bit Ubuntu is to install ia32-libs. However, as of mid-2013 it is very very broken.
I adapted these instructions:
"Some day" people dream of making things easier:
Other notes ∞
- Removed from the website, but archived locally.
Chroot sometimes fails ∞
su - adduser -o -u 0 chroot1 adduser chroot2 mkdir /home/chroot1/tmp-mount mkdir /home/chroot2/tmp-mount mount -o bind / /home/chroot1/tmp-mount mount -o bind / /home/chroot2/tmp-mount
- steps to reproduce
First one with UID 0
su - chroot1 -c 'chroot ./tmp-mount/'
Second one with UID non-0
su - chroot2 -c 'chroot ./tmp-mount/'
-bash: chroot: command not found
ok, try with this:
su - chroot2 -c '/usr/sbin/chroot ./tmp-mount/'
/usr/sbin/chroot: cannot change root directory to ./tmp-mount/: Operation not permitted
su - umount /home/chroot1/tmp-mount umount /home/chroot2/tmp-mount userdel -r chroot1 userdel -r chroot2
- TODO - So how do I do what I want, when the user has UID non-0?
TODO - How do I change a user's UID temporarily?
Executing multiple commands inside a chroot ∞
su - -c chroot root /root/tmp-mount "$SHELL" -c ' \ echo ok ;\ # comments are ok, without the trailing semicolon-slash echo yay ;\ '
Or on one line:
su - -c chroot user /root/tmp-mount "$SHELL" -c 'echo "ok"'
I see no way to remain in the chroot after executing these commands.
Not updated in a while, abandoned: