you can find full documentation for each tools at 66.
Create a (n)ew tree for booting (default boot) and enable the standard boot bundle of services (boot-66serv) as a single special service:
enable a boot module (e.g. boot@justaname ) in tree boot (again boot@-66serv is a special bundle/set of services specifically for booting an arch based system, such as obarun):
# 66 enable boot@justaname
Now to see the overall status of trees and services:
# 66 tree status
66 create a tree by default named global
. If the tree is not specified, the service goes to the tree global
To enable cron daemon (crond) in tree global
# 66 enable crond
But you also want cron started right away (-S)
# 66 enable -S crond
next time you boot after boot is finished the tree global
will start all of its services.
To start the services of the tree global
on this session if it is down:
# 66 tree start global
to see the status of services of only the tree global
(colorize output -z
and see the services in a graphical way -g
):
# 66 -z tree status -g global
to see the status of crond and the last 13 lines of its log:
# 66 -z status -p 13 crond
Make a (n)ew network tree called net
and (E)nable it:
# 66 tree create net
# 66 tree enable net
# 66 -t net enable dhcpcd wpa_supplicant ntpd
# 66 tree start net
to see the status of dhcpcd and the last 12 lines of its log:
# 66 -z status -p 12 dhcpcd
Now leave network up but stop wifi:
# 66 stop wpa_supplicant
now start it again
# 66 start wpa_supplicant
or disable wifi all together as you no longer going to need it and immediately (-S)top it:
# 66 disable -S wpa_supplicant
Now, you want to be isolated again, and don't need any network:
# 66 tree stop net
All of the above are run on a root level, but you want to run services as a user specifically needed for your desktop. The procedure is similar, but s6 must be notified to supervise such services in advance. It is best to look at [[dbus_and_dm| the specific wiki page for doing this]].
With most of 66 commands and 66-tools, -v4
will give maximum verbosity, which helps with diagnosing a problem, or when viewing a service log's -p15
will give you the last 15 lines of the log. -z
will colorize the output of most commands which helps visually to separate fields and their value/settings. Please study the configuration for each 66 tool so you can use them more effectively.
Let's say you have an installation and the default boot tree is boot and the default configured [[modules|module]] is called [[boot|boot@system]].
# 66 -z tree status -g
will confirm if this is true.
You may want to create a backup before making any changes. To do so, create a backup of the tree boot.
# 66 tree admin -o clone=boot_back boot
You now want to leave this module alone, for backup in case your experimental boot module doesn't work out, and create, configure, and enable the new one. Let's call it boot@justmyname. You must first disable boot@system, it is not getting lost, it is just being removed from the boot tree:
# 66 disable boot@system
Let's now create the new module after the default template boot@-# 66serv stored in /usr/lib/# 66/service/boot@ .
# 66 enable boot@justmyname
It is now enabled and ready for next boot, but its configuration is the default from the template. You now want to configure it differently.
# 66 configure -e nano boot@justmyname
Nano is used in the example, you can substitute the editor of choice.
Hostname, use of file system types, swap, fstab, timezone, hardware clock, and many other fields are there.
Most are as simple as yes/no to enable or disable. You save your changes to the module configuration named boot@justmyname. Now you need to pass your modifications into the boot tree, because it is still having the previous (default) configuration in mind.
# 66 reconfigure boot@justmyname
You will see a list being produced, everything that was enabled and you disabled will not come up on the list, anything disabled you enabled is showing up now. It is your new custom booting module. You can make several ones to give your machine different specific functionality.
Let's say you made a mistake and the next boot shows a problem, you want to go back to boot@system just so you can boot properly and fix your module. You propably can do this from tty12 but you'd rather reboot to a graphic terminal instead of working in console.
While you reboot you edit your boot loader entry ("e" on grub or "tab" on syslinux will let you edit the boot commands) and go to the line that starts with "linux" and at the end enter:
linux /boot/vmlinuz-linux...... TREE=boot_back
.. and your system will boot that tree instead of boot@justmyname ... as simple as that. You can imagine you can have 4 configurations and boot whichever you want each time with this trick. Your boot loader configuration has not changed, so you use 66 reconfigure
to reconfigure what you did wrong, or add software missing that are required by your configuration and reboot. The boot tree still is configured to start on boot@justmyname. But if you changed the configuration you must use the option -F to pass the changes to 66 reconfigure
.
# 66 reconfigure boot@justmyname
Now you can reboot and try it again.