Go to the main 66 software documentation page to get a full documentation of 66.
The minimum essential knowledge to begin using 66.
As both s6 and 66 documentation may be overwhelming at first and users may think they should consume the entirety of the documentation before they begin using the software, or the system incorporating it and in this case Obarun, this guide is an introduction to how simple and easy it is to use these tools right away.
When comparing s6/66 to runit for example, an exercise in minimalism and simplicity, the abilities of s6 and 66 appear enormous, but not everyone and right away needs all those abilities. They are there for those who realize the need and understand the functionality of those abilities. It is like obtaining a complete set of professional aircraft mechanic's tools, but for your use of servicing a washing machine only a few basic tools would suffice. It is good to know and study what is available to you at your own time and pace, but you could get back to work (doing laundry, writing, browsing, playing games) after you install it in a very short time. After all you would need a system to boot and be functional so you can go and study the documentation further.
s6 is a small suite of programs for UNIX, designed to allow process supervision
(a.k.a service supervision), in the line of daemontools
and runit, as well as various operations on processes and daemons. It is meant to be a toolbox for low-level process and service administration, providing different sets of independent tools that can be used within or without the framework, and that can be assembled together to achieve powerful functionality with a very small amount of code.
66 is a collection of system tools built around s6 created to make the implementation and manipulation of service files on your machine easier. It is meant to be a toolbox for the declaration, implementation and administration of services where separate programs can be joined to achieve powerful functionality with small amounts of code. This translates in fewer hardware resources utilized, thus more available to your work and other software, and improved speed and efficiency.
66 software consume very little resources while tools execute. Once they set the s6 system up, make changes, enable and disable daemons/services, they stop. If you are not making changes to your system 66 is as if it is not there. 66 configures s6 easily so you don't have to do it the hard way.
Trees are a sets of services, programs, daemons, that should run together as one, all the time, when you need them, depending on the type. For example, if you choose dhcpcd daemon to configure and maintain a connection to your network and wpa_supplicant to configure your wifi connection, you can make a tree of those two services and call it "net". Since network is up and running you may want a time server to align your system's time, so add ntpd (openntp, ntpclient,..etc.) into the same tree. You may want net to be up all the time, or only when you really need it. A simple command turns the tree on or off. It can be on every time you boot, or it can be off when you boot and you may want to turn it on later. You can have as many services as you want on a tree. There are trees of services meant to be run as root, and some that are meant and needed as a user.
A quick run down of what booting requires: Set a hostname, mount different sub-filesystems such as /run
, /tmp
, /proc
, /sys
, /dev
, reads the time from hw-clock, screens what kernel modules should be activated/deactivated, initiates the random number engine, kernel control, enables udev (hw device identification), raid systems, different file system types (encrypted, zfs, btrfs, etc.), mounts various partitions mentioned in /etc/fstab
, runs file system checks, network settings and interface identification, enables dmesg kernel messaging/logging system, sets local time, configures an emergency tty (default tty12) and then passes s6 to optional trees and services created by 66 after the system has completely booted.
Services and daemons can be started within trees, not just independently as in other systems. This allows you to group what you need for specific uses (networking, printing, servers, etc.) so you can activate and deactivate a whole tree of services quickly and efficiently. This frees up resources at all times for your specific use.
On /etc/66
there is a configuration file called init.conf. In this few lines of easily understandable set of variables the initial tree is named. By default it is called boot and it is responsible for managing all essential processes needed to completely boot a system. Boot is a tree that now has a module configured and enabled called boot@system
by convention on Obarun but you can replace system with any name/word you like. To configure your boot following the Configuring the boot@ module
section. You can specify on init.conf
the name of the default tree to boot (default name is boot). The boot tree among its file system mounting and checking, device configuration, etc, at the end specifies at least one console, tty@tty12
by default and while you configure your module you can specify how many more you want. tty@tty12
will always be available even if the rest of the booting procedure fails, so you can log in as user (only) and fix what is broken.
Don't let this part scare you, when you install obarun the default boot tree and suggested module will work, you must learn a few tricks in configuring it "as you need to", but you don't have to. The template (service file or front) can be seen in /usr/share/66/service/boot/boot@
this is Obarun's default and after which every boot@ module is pre-configured before you edit its contents by 66 configure.
As many new users make the same mistake, try to avoid doing the same.
66 prepares a complex structure of directories and files based on which s6 can operate most efficiently. If something fails, and you are diagnosing trees and services, do not be tempted to manually select a file or a directory to delete or alter. You should NEVER do that. You can disable a service from a tree, you can remove a tree (root or user) and you can attempt to recreate the problematic tree and enable the service.
66 tree status and 66 status with adjusted -v and -p values will provide you accurate information of what is happening to a tree or service. If you are unsure of the output please ask (irc,forum,66 mailing list) but DO NOT start manually removing files and directories, it will only make matters worse and diagnosing even harder.
To alter manually how a service is run, starts, stops, or its environment, use /etc/66/service
to make custom frontend file. The distribution's recommended service files are stored at /usr/share/66/
service and you can copy and modify or create your own at /etc/66/service
. Alternatively for user services the ~/.66/service
is where you can customize user services.