User:AdibSaad/66

From Gentoo Wiki
Jump to:navigation Jump to:search

66 and 66tools are a set of system tools built around S6 and S6-rc to make working with them easier.

While originally built for Obarun, an arch-based distro, an overlay was created so it can be used in Gentoo as well.

To get started, add and enable 66tools-overlay

root #eselect repository add 66tools-overlay git https://git.obarun.org/gentoo-66/66tools-overlay
root #eselect repository enable 66tools-overlay
root #emerge --sync 66tools-overlay

List and select one of the profiles from the overlay

root #eselect profile list
root #eselect profile set --force <number>

Since all packages are marked experimental, keywords need to be accepted for each package in the overlay. To make things easier, an accept file is stored in the overlay containing all the packages. All you need to do is create a symlink to it.

root #ln -s /var/db/repos/66tools-overlay/profiles/package.accept_keywords/s6-66tools.accept /etc/portage/package.accept_keywords/s6-66tools.accept

Now, you can rebuild world.

root #emerge -DNuav @world
root #emerge -a --depclean

Since the overlay requires that other init systems, such as systemd and openrc, not be installed, you may run into conflicts. If you do, simply unmerge the other init systems, then emerge world again, which should install s6, s6-rc, and 66.

Once this step is complete, your system isn't bootable yet, so be sure not to shutdown your computer.

To make the system bootable, you'll need to create the boot tree and enable

root #66-tree -n boot
root #66-enable -t boot -F boot@system

Now, you'll be able to boot your system.

You'll probably also want to start other services, such as networking and system tools.

To do so, first, install the *-66serv packages that correspond with the system tools you wish to start at boot.

root #emerge -av dhcpcd-66serv sshd-66serv crond-66serv metalog-66serv

Now, create another tree to house those services. In this case, we're calling it system.

root #66-tree -nE system

Finally, add those services to the system tree using 66-enable

root #66-enable -t system dhcpcd sshd crond metalog

You can now reboot!

Once you log in as root, you can run the 66-intree command to get an overview of all the trees in the system

root #66-intree -zg
Name         : boot
Initialized  : yes
Enabled      : no
Starts after : None
Current      : no
Allowed      : root
Symlinks     : svc->source db->source
Contents     : /
               ├─(6253,Enabled,classic) tty-earlier@tty12
               ├─(up,Enabled,oneshot) system-hostname
               ├─(up,Enabled,oneshot) mount-run
               ├─(up,Enabled,oneshot) populate-run
               ├─(up,Enabled,oneshot) mount-tmp
               ├─(up,Enabled,oneshot) populate-tmp
               ├─(up,Enabled,oneshot) mount-proc
               ├─(up,Enabled,oneshot) mount-sys
               ├─(up,Enabled,oneshot) populate-sys
               ├─(up,Enabled,oneshot) mount-dev
               ├─(up,Enabled,oneshot) mount-pts
               ├─(up,Enabled,oneshot) mount-shm
               ├─(up,Enabled,oneshot) populate-dev
               ├─(up,Enabled,oneshot) mount-cgroups
               ├─(up,Enabled,bundle) 00
               ├─(up,Enabled,bundle) all-Mount
               ├─(up,Enabled,oneshot) system-hwclock
               ├─(up,Enabled,oneshot) modules-kernel
               ├─(up,Enabled,oneshot) system-random
               ├─(up,Enabled,oneshot) modules-system
               ├─(up,Enabled,oneshot) system-sysctl
               ├─(2943,Enabled,longrun) udevd-log
               ├─(3109,Enabled,longrun) udevd
               ├─(up,Enabled,oneshot) udevadm
               ├─(up,Enabled,oneshot) system-fontnkey
               ├─(up,Enabled,oneshot) devices-lvm
               ├─(up,Enabled,oneshot) devices-crypttab
               ├─(up,Enabled,bundle) system-Devices
               ├─(up,Enabled,oneshot) system-fsck
               ├─(up,Enabled,oneshot) mount-fstab
               ├─(up,Enabled,bundle) all-System
               ├─(up,Enabled,oneshot) mount-rw
               ├─(up,Enabled,oneshot) mount-swap
               ├─(up,Enabled,oneshot) mount-netfs
               ├─(up,Enabled,oneshot) local-loop
               ├─(up,Enabled,oneshot) local-sethostname
               ├─(up,Enabled,oneshot) local-time
               ├─(up,Enabled,oneshot) local-authfiles
               ├─(up,Enabled,oneshot) local-tmpfiles
               ├─(up,Enabled,oneshot) local-dmesg
               ├─(up,Enabled,bundle) all-Local
               ├─(up,Enabled,oneshot) all-Runtime
               ├─(up,Enabled,bundle) All
               ├─(5882,Enabled,longrun) tty-rc@tty1
               ├─(3844,Enabled,longrun) tty-rc@tty2
               └─(up,Enabled,module) boot@system

Name         : services
Initialized  : yes
Enabled      : yes
Starts after : None
Current      : no
Allowed      : root
Symlinks     : svc->source db->source
Contents     : /
               ├─(3538,Enabled,classic) crond-log
               ├─(3531,Enabled,classic) metalog-log
               ├─(3534,Enabled,classic) metalog
               ├─(3543,Enabled,classic) sshd-log
               ├─(3535,Enabled,classic) dockerd-log
               ├─(3537,Enabled,classic) dockerd
               ├─(3541,Enabled,classic) crond
               ├─(3542,Enabled,classic) sshd
               ├─(3589,Enabled,longrun) fail2ban-log
               ├─(3583,Enabled,longrun) postfix-log
               ├─(3584,Enabled,longrun) nmbd-log
               ├─(3599,Enabled,longrun) nmbd
               ├─(3579,Enabled,longrun) winbindd-log
               ├─(3603,Enabled,longrun) winbindd
               ├─(3588,Enabled,longrun) lxcfs-log
               ├─(3633,Enabled,longrun) lxcfs
               ├─(3587,Enabled,longrun) lxd-log
               ├─(3637,Enabled,longrun) lxd
               ├─(3592,Enabled,longrun) dnscrypt-proxy-log
               ├─(3627,Enabled,longrun) fail2ban
               ├─(3593,Enabled,longrun) alsa-daemon-log
               ├─(3622,Enabled,longrun) alsa-daemon
               ├─(3623,Enabled,longrun) dnscrypt-proxy
               ├─(3586,Enabled,longrun) smbd-log
               ├─(3615,Enabled,longrun) smbd
               └─(3611,Enabled,longrun) postfix