Re: bsdjail questions

From: Serge E. Hallyn (serue@private)
Date: Thu Jan 13 2005 - 15:51:56 PST


> my feeble mind can not really divine from the above if/why using a
> per-jail private subdirectory on an existing filesystem would be bad...?
> 
> between sending the mail and receiving your reply, i actually tried
> setting up a jail in a directory on my root fs, and discovered,
> from pivot_root manual page:
>    EBUSY
>            new_root or put_old are on the current root file system, or a file
>            system is already mounted on put_old.
> 
> but i guess it would work on a non-root fs.

Oh, actually all you need to do is

	mount --bind . .

in the directory you want to make your new root.  So for instance,
I did

	cd /tmp/bsdjail_testdir
	clone_namespace
	mount --bind . .
	/sbin/pivot_root . mnt/loop
	mnt/loop/usr/sbin/chroot .
	umount -l mnt/loop

-serge



This archive was generated by hypermail 2.1.3 : Thu Jan 13 2005 - 15:52:31 PST