|Chroot_container_name is an mandatory parameter. Only a single chroot_container_name is valid. The chroot_container_name can only contain alphanumeric, dash, and underscore characters, all numeric chroot_container_names are invalid. chroot_container_names have to be unique across the qchroot scope. Just remember that you will be typing in this chroot_container_name on all the subcommands you use, so try to keep the name short but meaningful.|
Lists information about all the chroot containers inside qchroots scope. They are shown in ascending alphanumerically order, based on the spelling of the container_name.
Only chroot_containers with service_names can be started or stopped. When start or stop subcommand is issued WITH -A parameter, all the chroot_containers under qchroot control are processed. When start or stop, subcommand is issued WITH a single container_name, or with a string of space separated container_names, "IE; name1 name2 name3" only those names are processed. A single line informational message is issued as each container_name is processed saying
Bypassed; No service configured yet
Start chroot completed.
Error; Chroot is already started.
Chroot is stopped.
Error; Chroot is already stopped.
The function subcommands are as follows:
start -A Start all containers.
start name Start this container.
start name name name Start this list of containers.
stop -A Stop all containers.
stop name Stop this container.
stop name name name Start this list of containers.
Attaches your host console to the selected chrooted_container_name. The command line prompt shows the container name and the path. Entering exit will terminate the console. This is intended for administration use only. Normally used to install ports or packages and do other system customization. An example would be to install apache22 by issuing this command "pkg install apache22" and then edit its httpd.conf file.
chroot_container_name Chroot_container_name is a mandatory parameter. Only a single name is valid. Use the subcommand "list" to display list of all chroot_container_names. Chroot_container must be in "stopped" status.
Totally removes the chroot_container_name filesystem directories /usr/qchroot/chroot_container_name, and its entry in the administration control file /usr/local/etc/qchroot.local/container_name. The chroot_container_names to be deleted are required to be in stopped mode before this "delete" command executes.
-A This option will delete all the chroot_containers under qchroots control. chroot_container_name A single chroot_container_name or multiple chroot_container_names separated by a space are allowed.
Used to add the service application names of service applications that are installed in the specific chroot_container_named container.
chroot_container_name This is the chroot_container_name you want to add or change the service application name to automatically start at boot time and stop at shutdown. service_name A single service_name or multiple service_names separated by a space are allowed. What ever service application you installed into the chroot_container using "qchroot console" command will inform you to place a zzzz_enable="YES" parameter in the hosts /etc/rc.conf file to auto start it at boot time. You dont do that for service applications you installed in the chrooted filesystems. The zzzz is the service_name you enter here.
Note: You cant start a chroot container unless it has a service_name which means it has a service application installed in it. The installed service application will have a script in the chroot container at /usr/local/etc/rc.d/service_name.
This displays the version of the qchroot script.
* Qchroot must be run by a superuser login account such as "root"
or a normal user login account belonging to the "wheel" group.
For user accounts in the wheel group, after logging in they have
to issue the "su" command and reply with the root password to
gain the superuser access required by qchroot. The "sudo" port
can be used instead of "su" to perform the same function
if so desired.
* The orderly stopping of chroot_containers that have databases or
other applications that may have delayed buffered writes to
files is accomplished by the use of the "qchroot stop" command
or issuing the "shutdown now" command. The halt and reboot
commands or pressing the computers reset or power on buttons
results in the running chroot_containers to be instantly
terminated which some service applications can not tolerate.
Always use the shutdown command.
* By design the "sharedfs" filesystem includes the "usr/ports" and
"usr/src" directories which are not automatically populated by
"qchroot install". You can temporarily make the hosts "/usr/ports"
or "/usr/src" directory trees available to the chroot containers
by using the "mv" command like this:
mv /usr/ports /usr/qchroot/sharedfs/usr and returned doing
mv /usr/qchroot/sharedfs/usr/ports /usr
* Its a mandatory requirement of the qchroot system that the
host and the sharedfs flesystem are both running the same
version of the operating system binaries. First you have to
get your host system running at the newer RELEASE version.
You can do the fresh install from scratch method, or update
your hosts current RELEASE version by using the Freebsd-update
utility or svn update your system source and make
buildworld/installworld. After the host is running the new RELEASE
version, you run the "install" subcommand again and re-install
with the newer RELEASE version matching what is on the host,
without disturbing the existing chroot containers.
If going to a newer major RELEASE, IE: 9.2 to 10.0 then remember,
all existing chroot containers that have ports or packages in
them will need them updated to versions compatible with the new
major RELEASE version. On the other hand, if going from a
subversion to a newer subversion within the same major RELEASE,
IE: 9.2 to 9.3, then there is no need to update your
* If you want absolute control over starting your chroot containers
(IE. no boot time auto-start), then dont put the
qchroot_enable="YES" statement in the hosts rc.conf file.
/usr/local/bin/qchroot The main work horse script
/usr/local/etc/rc.d/qchroot.bootime Boot time starter script
/usr/local/etc/qchroot.local/* Admin control files
/usr/qchroot Location of qchroot filesystems
Joe Barbish <email@example.com>