aboutsummaryrefslogtreecommitdiff
path: root/docs/wiki/install.txt
blob: 2f86b760e466cdcfd2a1ec0b05fdc517a3c31f4e (plain)
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
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
Installation Instructions
=========================

This post will guide you step-by-step in order to install
Carbs Linux. It is not complete yet.


Downloading and Getting Ready to Chroot
---------------------------------------

Installing Carbs Linux is the same as installing most 
rootfs distributions, such as Gentoo, or Void Linux.


### Requirements

You simply need a Live Linux ISO. Gentoo would be the best
as programs you will require will be already there. Get the
ISO, boot it and set up your network.

**Required Programs:**

* tar
* wget
* xz

Rest of the instructions assume that you have set all of these
up, and will continue on.


### Download


First, we need to download the rootfs tarball. In your terminal
type

    $ wget https://carbslinux.org/releases/carbs-rootfs-20191210.tar.xz


### Check the integrity of the tarball

While optional, it is highly recommended to check the integrity
of the tarball.

    $ wget https://carbslinux.org/releases/carbs-rootfs-20191210.tar.xz.sha256sum
    $ sha256sum -c carbs-rootfs-20191210.tar.xz.sha256sum


### Check the signatures

While optional, it is highly recommended to check the signature 
of the tarball

    $ wget https://carbslinux.org/releases/carbs-rootfs-20191210.tar.xz.sig
    
    Import the public key of release@carbslinux.org
    
    $ gpg --recv-keys FF484BDFEFCEF8FF
    
    $ gpg --verify carbs-rootfs-20191210.tar.xz.sig

### Download Kiss Linux Chroot Helper

    $ wget https://dl.getkiss.org/kiss-chroot
    
    Make the script executable
    
    $ chmod +x kiss-chroot

### Extract the rootfs tarball

You need to extract the tarball to your mounted partition

    $ tar xvpf carbs-rootfs-20191210.tar.xz -C /mnt

Chroot
------
Chroot into Carbs Linux

    $ ./kiss-chroot /mnt

### Enable repository signing (Highly Recommended)

This step is optional, but very highly recommended 
(I cannot stress out the amount I am recommending this). 
This ensures you are receiving updates from Carbs Linux 
and not some other source.

**Install GnuPG**

It is also a great time to learn how to use your new 
package manager, KISS! You simply build and install
the package

    $ kiss build gnupg1
    $ kiss install gnupg1

**Import my key**


    Import my public key (cem@ckyln.com)
    
    $ gpg --recv-key 4356EE08A364CE09
    
    Create a .gnupg directory if it doesn't exist
    
    $ mkdir -p /root/.gnupg
    
    Trust my public key
    
    $ echo trusted-key 0x4356ee08a364ce09 >> /root/.gnupg/gpg.conf

**Enable signature verification**


Git has a built in signature verification feature.
You can go to the repository directory and enable it

    $ cd /var/db/kiss/repo
    $ git config merge.verifySignatures true

### Installing Important Tools

Since Carbs gives you one of the most minimal base,
you might need to apply some add-ons to your system.

**Update packages**

It might be a good idea to update your packages before
installing new packages. This ensure compatibility.

    $ kiss update

**Filesystems**


Currently, e2fsprogs and dosfstools are supported,
as they are the most-used filesystems.

    Support for ext2, ext3, and ex4
    
    $ kiss build e2fsprogs
    $ kiss install e2fsprogs
    
    Support for dosfstools
    
    $ kiss build dosfstools
    $ kiss install dosfstools

**Device management**

    $ kiss build eudev
    $ kiss install eudev

**Wireless**

**wpa_supplicant**

    $ kiss build wpa_supplicant
    $ kiss install wpa_supplicant

**eiwd (WIP)**

    $ kiss build eiwd
    $ kiss install eiwd

**dhcpcd**

    $ kiss build dhcpcd
    $ kiss install dhcpcd

**Shells**

Carbs Linux comes preinstalled with busybox ash, but other shells
can be found on the repository

    Install bash
    
    $ kiss build bash
    $ kiss install bash
    
    Install zsh
    
    $ kiss build zsh
    $ kiss install zsh

    Install Plan9 rc-shell

    $ kiss build 9base
    $ kiss install 9base

### Install the Kernel


Next step is installing the kernel, which might sound as a challenge
you should download and extract the kernel tarball first.

    $ wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.5.tar.xz
    
    Let's move the sources to /usr/src
    
    $ mv linux-5.5.tar.xz /usr/src
    $ tar xf linux-5.5.tar.xz
    $ cd linux-5.5

**Configure the Kernel**

You can check <https://wiki.gentoo.org/wiki/Kernel/Configuration>
to learn more about kernel configuration. Overall, [Gentoo Wiki](https://wiki.gentoo.org)
is a good place to learn about kernel configuration related to
your hardware.

**Build and install the kernel**

The rest of it is simple, build the kernel with
`make` and install it with `make install`

### Bootloader

The default bootloader is GRUB (GRand Unified Bootloader).

Build and install GRUB

    $ kiss b grub
    $ kiss i grub
    
    Install efibootmgr as well if your
    system requires it
    
    $ kiss b efibootmgr
    $ kiss i efibootmgr


**Setup GRUB**

    For BIOS:
    $ grub-install --target=i386-pc /dev/sdX
    
    For UEFI:
    $ grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=CarbsLinux
    
    $ grub-mkconfig -o /boot/grub/grub.cfg


### Install init

Currently, default init for Carbs Linux is `sinit`, but
busybox-init is also supported. You can also change this yourself.

To install init, you have to

    $ kiss b sinit
    $ kiss i sinit

This will also fetch busybox-init as its dependency.


### Enabling other repositories

There are other repositories out there that might be of your
interest. The Official Repositories come with community and testing
repositories that are not enabled by default. You could also want to
add the Kiss Linux community repository, or someone's personal kiss
repository.

**Obtaining repositories**

Obtaining a repository is as simple as a git clone. You can do it
with Cem's personal repository as an example, but any other repository
will be the same.

    # Clone the repository to your desired location
    # Optionally add "--depth 1" to save precious disk space
    
    $ git clone --depth 1 git://git.ckyln.com/kiss-repository /var/db/kiss/cem-repository

That's it, you have obtained a new repository!

<strong>Adding a repository to your KISS_PATH</strong>

Now that we have obtained Cem's repository, we can add it to our KISS\_PATH!

We need to edit `/etc/profile.d/kiss_path.sh` for this, but you
can also change your KISS\_PATH from your shellrc.

Add the full path to the repository, in this case
`/var/db/kiss/cem-repository/cem` to the variable
and add a `:` before/after it.

It must be looking like this.

    export KISS_PATH=/var/db/kiss/repo/core:/var/db/kiss/repo/extra:/var/db/kiss/repo/xorg:/var/db/kiss/cem-repository/cem

Update your shell variables by doing `. /etc/profile.d/kiss_path.sh` so you can
immediately access the repository packages


More
----

You should now be able to boot into you Carbs Linux installation. 
To learn more, you can visit the [wiki](//carbslinux.org/wiki)