5 > Sixty-six is a collection of system tools built around s6 and s6-rc 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.
7 -- [project page](https://web.obarun.org/software/66/v0.6.0.0/)
9 66 manages services in *trees*: collections of services, analogous to runlevels or targets in other init systems/service managers.
13 The `boot-66serv` and `void-66-services` packages are needed to boot and use 66 as init and service manager on Void Linux.
15 `boot-66serv` contains the `boot@` module service, which, along with other frontend files and scripts, are used for the first stage of booting a system. It is roughly analogous to the `runit-void` package for runit: it initialises the system (setting hostname, timezone, open LUKS devices, etc.) and starts `agetty` on TTYs 1-4 by default. The package was created as a portable stage1 for 66 and is used in the [Obarun](http://obarun.org/) distribution.
17 The package also contains some scripts written in order to make the services work for Void Linux.
19 `void-66-services` contains service frontend files for Void Linux.
21 Currently these packages are in a [PR](https://github.com/void-linux/void-packages/pull/25743). In order to install them one can build them from the PR or install them from the unofficial void-66 repo. Packages are available for i686, x86_64, aarch64, x86_64-musl and aarch64-musl.
23 ### 2.1 Installing packages from the `void-unofficial-repo-66`.
27 _(commands prefixed by `#` must be run with elevated privileges, as root)_
29 # xbps-install --repository=https://avyssos.eu/repos/voidlinux/66/ -f void-unofficial-repo-66
32 You will be prompted to accept the new key:
34 https://codeberg.org/mobinmob/void-66/raw/branch/master' repository has been RSA signed by "mobinmob"
35 Fingerprint: c7:39:79:a3:2a:cf:f1:65:a6:df:3a:1a:6e:93:36:28
36 Do you want to import this public key? [Y/n]
39 After accepting it, install the new packages:
41 # xbps-install -S boot-66serv void-66-services s6-rc
46 There are two ways to create the recommended basic trees for 66: an automatic and a manual one. The automatic configuration is **strongly** recommended.
48 ### 3.1. Automatic configuration
50 Run the `66boot-initial-setup` script:
52 _(commands prefixed by `#` must be run with elevated privileges, as root)_
54 # 66boot-initial-setup
57 The script creates the necessary trees, enables in them some services and created the target for the basic configuration file symlink.
59 After running the `66boot-initial-setup` , you can run two other scripts:
61 - `66boot-storage-autoconf` which discovers *LVM*, *dmraid*, *LUKS*, *zfs* and *btrfs* volumes
62 for the current hw and configures the boot proccess automatically and
64 - `66boot-rcdotconf` that configures *boot@system* using the configuration of the standard voidlinux /etc/rc.conf.
66 After each of them or all of them you should finalise the configuration by running:
68 _(commands prefixed by `#` must be run with elevated privileges, as root)_
71 # 66-enable -t boot -F boot@system
75 ### 3.2 Manual configuration
77 ***Please do not try doing a manual configuration right after doing automatic configuration!***
79 #### 3.2.1 The `boot` tree
81 Create a mandatory **n**ew tree `boot` and enable the `boot@system` service in it:
85 # 66-enable -F -t boot boot@system
88 Create a permanent `boot@system` configuration file:
91 # cp /etc/66/conf/boot@system/version/.boot@system /etc/66/conf/boot@system/version/boot@system
94 #### 3.2.2 The `default` tree
96 More services can be enabled in a different tree, that starts after the boot tree. **default** is a nice name for it, as it is used for the ... default collection of services in void.
98 Create the **n**ew tree, **E**nable it and make it **c**urrent:
101 # 66-tree -nEc default
104 Enable services in the new tree -the `switch-initutils` service is recommended:
107 # 66-enable switch-initutils
110 #### 3.2.3 Using runit services
112 66 can work with the existing runit services. That is useful as there are not yet frontend service files for all the packages that have a runit service directory.
114 To use runit services, a separate runit tree can be created, the runit service enabled and started in it and make the tree start after default:
118 # 66-enable -t runit runit
119 # 66-tree -S default runit
122 The runit services are started the normal way, by symlinking the service directories under `/var/service/`.
124 ### 3.3 Finalising configuration
126 Both methods lead to the same basic trees created and services enabled. But before changing the init system, some more configuration must happen.
128 Edit `/etc/66rc.conf` with a text editor, save it and re-enable the `boot@system` service file in the `boot` tree:
130 _(commands prefixed by `#` must be run with elevated privileges, as root)_
133 # 66-enable -t boot -F boot@system
136 Please consult the `boot@` man page and the comments of the configuration file. Wrong configuration can result in an unbootable or problematic system!
138 ### 3.4 Switching to 66 from runit
140 To boot the system with 66 instead of runit after the configuration, you just add `init=/usr/bin/66` to the kernel command line. To switch back, remove it.
142 If a user decides that a permanent and clean switch to 66 is the way to go, they should consult [void-66-base-system.md](https://github.com/mobinmob/void-66-services/blob/master/conf/void-66-base-system.md).