-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmkg-cheatsheet.html
263 lines (263 loc) · 8.75 KB
/
mkg-cheatsheet.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
<h1 id="mkg-cheatsheet">MKG Cheatsheet</h1>
<table>
<colgroup>
<col style="width: 45%" />
<col style="width: 54%" />
</colgroup>
<thead>
<tr class="header">
<th style="text-align: left;"><strong>Running MKG in containers</strong></th>
<th style="text-align: left;"></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><code># mkg dockerize</code></td>
<td style="text-align: left;">Running a container for Plasma.</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;"></td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>$ git checkout gnome</code></td>
<td style="text-align: left;"></td>
</tr>
<tr class="even">
<td style="text-align: left;"><code># mkg dockerize gentoo.iso</code></td>
<td style="text-align: left;">Running a container for Gnome.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;"></td>
</tr>
<tr class="even">
<td style="text-align: left;"><code># docker exec -it ID bash</code></td>
<td style="text-align: left;">Check job log</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>cont# tail -f nohup.out</code></td>
<td style="text-align: left;"></td>
</tr>
<tr class="even">
<td style="text-align: left;">or:</td>
<td style="text-align: left;"></td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>grep -E '\[\w{3}\]' /var/log/syslog</code></td>
<td style="text-align: left;">Host log search. Also echoes container logs.</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;">Use <code>syslog.x</code> for older logs.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;"></td>
</tr>
<tr class="even">
<td style="text-align: left;"><code># docker cp ID:/mkg/gentoo.iso .</code></td>
<td style="text-align: left;">Fetch back MKG installer from container.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;"></td>
</tr>
</tbody>
</table>
<table>
<colgroup>
<col style="width: 36%" />
<col style="width: 63%" />
</colgroup>
<thead>
<tr class="header">
<th style="text-align: left;"><strong>Running MKG with custom options</strong></th>
<th style="text-align: left;"></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><code># mkg use_mkg_workflow=false [...]</code></td>
<td style="text-align: left;">Do not use preprocessed live install CD from</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;">Github Actions workflow. You may use:</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;"><code>ncpus=X,</code> <code>bios, cflags, clonezilla_install</code></td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;"><code>debug_mode, elist, emirrors, kernel_config</code></td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;"><code>minimal, minimal_size, ncpus, nonroot_user</code></td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;"><code>passwd, processor, rootpasswd, stage3</code></td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;"><code>vm_language.</code></td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;"></td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;">Main options:</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;"><code>minimal</code>: just build a minimal desktop.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;"><code>cflags=[...,...,...]</code>: CFLAGS options in list form.</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;"><code>vm_language=..</code>: set platform language if non US-English (<code>fr</code>, <code>de</code>, etc.)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;"></td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;"></td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code># mkg use_clonezilla_workflow=false [...]</code></td>
<td style="text-align: left;">Do not use preprocessed cclonezilla live CD from Github Actions workflow.</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;">Rebuild this CD again incorporating VirtualBox</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;">from current Ubuntu repositories.</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;"></td>
</tr>
</tbody>
</table>
<table>
<colgroup>
<col style="width: 41%" />
<col style="width: 58%" />
</colgroup>
<thead>
<tr class="header">
<th style="text-align: left;"><strong>Reusing artifacts previously downloaded</strong></th>
<th style="text-align: left;"></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><code>$ mkg custom_clonezilla=file [...]</code></td>
<td style="text-align: left;">Use this file as CloneZilla live CD.</td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>$ mkg download_clonezilla=false [...]</code></td>
<td style="text-align: left;">Use cached CloneZilla live CD from prior downloads.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>$ mkg download_arch=false [...]</code></td>
<td style="text-align: left;">Use cached stage3 archive from prior downloads.</td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>$ mkg download=false [...]</code></td>
<td style="text-align: left;">Use cached Gentoo minimal install CD from prior downloads.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"></td>
<td style="text-align: left;"></td>
</tr>
</tbody>
</table>
<table>
<colgroup>
<col style="width: 40%" />
<col style="width: 59%" />
</colgroup>
<thead>
<tr class="header">
<th style="text-align: left;"><strong>Input/Output and Backup options</strong></th>
<th style="text-align: left;"></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><code>$ mkg [...] burn</code></td>
<td style="text-align: left;">Burn Gentoo installer to DVD when processed.</td>
</tr>
<tr class="even">
<td style="text-align: left;"><code># mkg [...] hot_install ext_device=sdX</code></td>
<td style="text-align: left;">Install Gentoo onto partition <strong>/dev/sdX</strong> after completion of VM processes.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code># mkg from_device ext_device=sdX \ gentoo.iso</code></td>
<td style="text-align: left;">Backup partition <strong>/dev/sdX</strong> into a CloneZilla installer <strong>gentoo.iso</strong></td>
</tr>
<tr class="even">
<td style="text-align: left;"><code># mkg [...] from_iso gentoo.iso burn</code></td>
<td style="text-align: left;">Burn <strong>gentoo.iso</strong> to disk.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code># mkg [...] from_iso gentoo.iso \ device_installer ext_device=sdX</code></td>
<td style="text-align: left;">Create USB stick or any block device installer from <strong>gentoo.iso</strong></td>
</tr>
<tr class="even">
<td style="text-align: left;"><code># mkg [...] from_vm vm=... \ gentoo.iso</code></td>
<td style="text-align: left;">Create CloneZilla installer image from VM (after VM completed processes and stopped.)</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code># mkg [...] from_vm vm=... \ hot_install ext_device=sdX</code></td>
<td style="text-align: left;">Directly install Gentoo to partition <strong>/dev/sdX</strong> from VM (after VM completed processes and stopped.)</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;"></td>
</tr>
</tbody>
</table>
<table>
<colgroup>
<col style="width: 30%" />
<col style="width: 69%" />
</colgroup>
<thead>
<tr class="header">
<th style="text-align: left;"><strong>Graphic display and Interaction</strong></th>
<th style="text-align: left;"></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;"><code>$ mkg [...] gui=false</code></td>
<td style="text-align: left;">Do not display VirtualBox guest in GUI.</td>
</tr>
<tr class="even">
<td style="text-align: left;"><code>$ mkg [...] interactive=false</code></td>
<td style="text-align: left;">Do not interact with user. To be used in scripts and containers, with caution.</td>
</tr>
<tr class="odd">
<td style="text-align: left;"><code>$ mkg [...] email=...@... \ email_passwd=...</code></td>
<td style="text-align: left;">Send a meesage to email address with given user password upon completion. Not to be used in public networks.</td>
</tr>
<tr class="even">
<td style="text-align: left;"></td>
<td style="text-align: left;"></td>
</tr>
</tbody>
</table>