Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using a network file system (AFS) and I would like to also mount it into my schroot. Adding a line to /etc/schroot/mount-defaults, with bind or rbind in the options didn't help: schroot always mounts the directory with bind, and it remains empty in the chroot.

My current solution is a script that remounts the /afs directory with rbind after the schroot has been set up.

Is there a way to make schroot use rbind directly?

share|improve this question
have you ever found/received an answer (maybe elsewhere) to your question? If so, would you kindly share it with us? I, too, want to mount an NFS resource into a schroot environment. – user183676 Aug 13 '13 at 9:08
I never got an answer with schroot. My solution at the time was like I wrote in the question, to mount that specific resource after schroot has started. – haggai_e Aug 13 '13 at 11:02
# means run with root or sudo

1. Create a mountpoint
# mkdir /mount/point

2. Mount /proc /sys /dev to chroot
# mount -o bind /proc /mount/point/proc
# mount -o bind /dev /mount/point/dev
# mount -o bind /dev/pts /mount/point/dev/pts
# mount -o bind /sys /mount/point/sys

3. Copy resolv.conf to networking
# cp /etc/resolv.conf /mount/point/etc/resolv.conf

4.Open bash in chroot
# chroot /mount/point /bin/bash

5. Do what you have to do and then exit chroot

Also see:

share|improve this answer
That's basically what he wants to do, but the point is that schroot automates these steps, and he's trying to also get mounting of the network filesystem automated. – poolie Mar 23 '11 at 1:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.