Index of /pandora/schroot

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[DIR]man/2012-06-22 17:54 -  
[   ]schroot-1.5.4-1-pand2.tar.gz2012-06-22 17:36 870K 
[   ]schroot-1.5.4-1-pand1.tar.gz2012-06-16 06:05 872K 
[   ]debootstrap-1.0.40-pand1.tar.gz2012-06-15 02:35 58K 
[TXT]README.html2012-06-22 17:52 5.6Kschroot for the Pandora

schroot for the Pandora

schroot for the Pandora

This is a nearly full port of the schroot-Debian package. The following features are disabled:

But those are probably not really useful on the Pandora anyway.

As I don't think a PND is the best option for a system utility, the package has to be installed in /opt.

'schroot' has many features. It can use image files, setup overlay filesystems on entering, keep important files (resolv.conf, /etc/passwd, etc.) in sync, mount a fixed directory structure or execute a custom script upon entering a chroot and manage many different chroots.

If you want to get more information read the man-pages (they are also included in the packages although there is no 'man' command on the Pandora) or visit or for more details.

I also configured the package so that it mounts and unmounts everything under /media (e.g. your SD-Cards) in the chroot automatically. Unfortunately the subtree mount options on the Pandora are broken and so filesystems that were already mounted when you entered a chroot will not be automatically unmounted. If you want to eject an SD-Card that was mounted when you entered the chroot you will have to manually unmount it in the chroot first.


Initial release.
Should now work without the script installed (although automatic SD-card (un)mounting will not work within the chroots).
If no /media directory is present in the chroot, it will be created. (Fixes issue with missing /media directory in fresh squeeze chroots.)
Copying of the nssdatabase files will now skip files that are not present on the host. (Fixes issue with /etc/networks not being installed on the Pandora by default.)


Create the directory where you want to install schroot and possibly debootstrap. Let's say you want to install it in /media/SDCard/opt. Create the directory and a symlink from /opt:

$ mkdir /media/SDCard/opt $ sudo ln -s /media/SDCard/opt /

If your OS is already on an SD-Card, you can create /opt as a regular directory, of course.

IMPORTANT:The location where schroot is to be installed must be a proper filesystem with working permissions as the executable needs the setuid bit set. So best use ext4/3/2. FAT will not work. I don't know about NTFS, but I doubt it.

Unpack the tar-archive in /opt. This has to be done with root priviledges as the schroot executable has the setuid flag set:

$ cd /opt $ sudo tar xfvz /tmp/schroot-1.5.4-1-pand2.tar.gz

Now install the startup script that makes the automatic (un)mounting possible (don't overlook the '.' at the end of the second command):

$ sudo cp /opt/schroot/etc/init.d/ /etc/init.d $ sudo update-rc.d start 2 S .

If you also want to install debootstrap:

$ cd /opt $ tar xfvz /tmp/debootstrap-1.0.40-pand1.tar.gz

Now reboot your Pandora and that's it.

Optional comfort feature:

To setup your PATH variable and to get a nice indication in which chroot you are, you can add the following two lines at the end of your ~/.profile file with your favourite text editor:

export PATH=$PATH:/opt/schroot/bin export PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '


Here is a very brief introduction to get a basic working Debian squeeze chroot in "/media/SDCard/chroot/squeeze". You will need at least 250MB of free disk space. More is recommended if you actually want to install something useful.

$ sudo -i # mkdir -p /media/SDCard/chroot/squeeze # cat > /opt/schroot/etc/schroot/chroot.d/squeeze << EOF [squeeze] description=Debian squeeze Installation aliases=default type=directory directory=/media/SDCard/chroot/squeeze users=<YOURUSERNAME> root-groups=root profile=pandora personality=linux preserve-environment=true EOF # /opt/debootstrap/sbin/debootstrap --arch=armel squeeze /media/SDCard/chroot/squeeze

Now wait. And wait. And wait some more. It took me about 33 minutes with an ext4 partition on a Class 6 card. After the process is finished you will have a working but very spartanic chroot in /media/SDCard/chroot/squeeze.

The next step should be to get sudo installed:

$ sudo /opt/schroot/bin/schroot -c squeeze apt-get update $ sudo /opt/schroot/bin/schroot -c squeeze aptitude install sudo

Now you can enter a chroot as your regular user just by typing "schroot -c squeeze" (if you have set up your PATH correctly). You can even omit the "-c squeeze" if you followed the example and have an "aliases=default" line in your chroot description.

You can also start programs directly in a chroot:

$ schroot apt-cache search mplayer $ schroot sudo aptitude install mplayer $ schroot mplayer /media/SDCard/video.avi

It is also possible to associate filetypes with programs in a chroot.