OSDN Git Service

27c0f7fb741611e272f4c7fc6cd2462f0682cf07
[avyssos/void-66-services.git] / conf / void-66-base-system.md
1 ## 1. base-system-66 and 66-void packages
2
3 - `66-void` is a package that can replace `runit-void` and provide the user a voidlinux system that cleanly boots with 66, without any hacks.
4
5 - `base-system-66` is a packages that can replace `base-system` and work with `66-void`
6
7 #### 1.1 Why?
8
9 If a user follows the directions in [66-void-conf.md](https://github.com/mobinmob/void-66-services/blob/master/conf/void-66-conf.md), they will end with a voidlinux system booted with 66. The system will work and be able to switch between runit and 66 by changing either the kernel commandline, or the init symlink.
10 That is really nice and flexible, but it comes with a cost. In order to keep both systems working correctly, there are two services, a runit `core-service` named switch-initutils and a 66 frontend service file with the same name.
11 There change the init utilities (halt, reboot, shutdown, poweroff) to match the running init system/service manager. That is a nice and (mostly) working hack.
12 `66-void` tries to provide a better, cleaner way to use 66, with its own "base" package that fully replaces runit-void.
13
14 `void-base-66` is a way to complete the transormation to a fully 66-based system. The only functional difference from the upstream official template is that `66-void` has replaces `runit-void` in the depends array.
15
16 ## 2. How to use 66-void
17
18 Assuming a user has a **working system with 66**, they only need to install the package:
19
20 ```
21 # xbps-install -S 66-void
22 ```
23 That is it :)
24
25 After that, the kernel commandline **should not have** `init=/usr/bin/66` anymore.
26
27 #### 2.1 Switch back to runit
28
29 Switching to runit after installing/using 66-void, is not hard:
30
31 1.First remove the 66-void package:
32
33 ```
34 # xbps-remove 66-void
35 ```
36
37 2.Then, install the runit-void package:
38
39 ```
40 # xbps-install runit-void
41 ```
42
43 3.Reboot:
44
45 ```
46 # /etc/66/reboot
47 ```
48 #### 2.2 Switch to using 66 from using runit
49
50 If after the previous procedure someone wants to switch again, the procedure is similar:
51
52 1.Copy /usr/bin/halt to /tmp
53
54 ```
55 # cp /usr/bin/halt /tmp
56 ```
57
58 2.Install 66-void:
59
60 ```
61 # xbps-install -S 66-void
62 ```
63
64 3.After that, you can halt your system:
65
66 ```
67 # sync && /tmp/halt
68 ```
69
70 ## 3. How to use base-system-66
71
72 To complete the transformation to fully 66-based system, just install the package.
73
74 ```
75 # xbps-install -S base-system-66
76 ```
77
78 ## 4. `66-void` package contents
79
80 The package contains all the non-init utilities that exists in the void-runit project. These are:
81
82 - vlogger
83 - zzz
84 - seedrng
85 - pause
86 - modules-load
87
88 There are accompanied by their manpages, where these are available in the upstream repository.
89
90 There are also the 66 init utilities, namely:
91
92 - halt
93 - reboot
94 - poweroff
95 - shutdown
96
97 as well as `/usr/bin/init`, as a link to `/usr/bin/66`.
98
99 Also included are some configuration files:
100
101 - /etc/rc.local
102 - /etc/rc.conf
103 - /etc/os-release
104 - /etc/hostname
105
106 *66 does not recognise /etc/rc.conf directly, but it can be consumed by the 66boot-rcdotconf utility which reuses the values to configure the boot@system module service*
107 *66 also does not use rc.local by default, but it can be used by declaring it as the `script_file` in the local-rc service.*
108 */etc/os-release and /etc/hostname are part of the os.*
109
110 The basic directories and symlinks for runit are also a parta of this package, in order to enable the use of the runit 66 service that reuses runit service scripts on top of 66.
111
112 ## Future work :
113
114 - Currently 66-void does not include support for apparmor. I believe the best place for that is the upstream `boot-66ser` repository and I plan to sent an MR asap :)