aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/index.html
blob: 1a89d977710a0b62d5d563523c60b87d1743ce54 (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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="color-scheme" content="light dark">
    <title>OpenBASED - Setup OpenBSD as a daily driver using only the included, base programs</title>
    <link rel="icon" type="image/x-icon" href="./favicon.ico">
    <link rel="stylesheet" href="./style.css">
</head>
<body>
    <h1><a href="/"><span class="title"><i>Open</i><b>BASED</b></span></a></h1>
    <hr>
    <p>Setup OpenBSD as a daily driver using only the included, core programs. Based on OpenBSD 7.6.</p>

<hr />

<div class="TOC">

<ul>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#firstboottweaks">First Boot Tweaks</a>
<ul>
<li><a href="#userpermissions">User Permissions</a></li>
<li><a href="#firmware">Firmware</a></li>
<li><a href="#wifi">WiFi</a></li>
<li><a href="#performanceboost">Performance Boost</a></li>
</ul>
</li>
<li><a href="#loginmanager">Login Manager</a></li>
<li><a href="#thefirstreallogin">The First <em>Real</em> Login</a></li>
<li><a href="#additionalpackages">Additional Packages</a></li>
<li><a href="#configs">Configs</a></li>
<li><a href="#supportopenbsd">Support OpenBSD</a></li>
<li><a href="#contributetoopenbased">Contribute to OpenBASED</a></li>
</ul>
</div>

<h2 id="requirements">Requirements</h2>

<ul>
<li>USB device</li>
<li>Ethernet connection (with active internet)</li>
<li>A cup of coffee</li>
</ul>

<p>The real requirements are having patience and a passion for keeping things minimal. It&#8217;s important to remeber that this setup isn&#8217;t the most user-friendly. There will be no config files to edit or download in this guide. We will be using the <code>xenodm</code> login manager paired with the default stacked window manager <code>fvwm</code>. And that&#8217;s it.</p>

<p>You have been warned!</p>

<h2 id="installation">Installation</h2>

<p>Make sure you have the latest OpenBSD image formatted on a USB device (or burned to a CD if that&#8217;s your cup of tea!) and that your computer/laptop is set to boot from USB via the BIOS. Also make sure you are connected to the internet via ethernet cable (don&#8217;t worry, we&#8217;ll setup WiFi in a minute!)</p>

<p>Boot into the device and input the following when guided through the installer:</p>

<ol>
<li>Boot from USB</li>
<li>Choose <code>Install</code></li>
<li>Keyboard layout: <code>us</code></li>
<li>Hostname: <code>x220</code> (or whatever you choose)</li>
<li>Network: <code>em0</code></li>
<li>IPv4: <code>autoconf</code></li>
<li>IPv6: <code>none</code></li>
<li>Network interface: <code>done</code></li>
<li>Password for root</li>
<li>Start sshd by default? <code>yes</code></li>
<li>X Window System start with xenodm? <code>no</code></li>
<li>Setup user? <code>username</code> (follow setup user steps)</li>
<li>Allow root ssh login? <code>no</code></li>
<li>Timezone</li>
<li>Which disk? Use internal (<code>sd0</code> etc.)</li>
<li>Encrypt root disk? <code>no</code></li>
<li>Use <code>WHOLE</code> disk</li>
<li>Use <code>AUTO</code> layout</li>
<li>Which disk to initialize: <code>done</code></li>
<li>Location of sets: <code>http</code></li>
<li>HTTP Proxy URL? <code>none</code></li>
<li>HTTP Server? <code>1</code> (Toronto)</li>
<li>Confirm again</li>
<li>Server directory? <code>pub/OpenBSD/7.6/amd64</code></li>
<li>Set names? <code>done</code></li>
<li>Drink some coffee while it verifies (depends on network speed)</li>
<li>Location of sets? <code>done</code></li>
<li>Congrats!</li>
<li>Reboot and remove USB device</li>
</ol>

<h2 id="firstboottweaks">First Boot Tweaks</h2>

<h3 id="userpermissions">User Permissions</h3>

<p>Before we do anything, we should give our main user full access via <code>doas</code>. Login as <code>root</code> and run the following:</p>

<pre><code>su -
echo &quot;permit nopass :wheel&quot; &gt;&gt; /etc/doas.conf
exit
</code></pre>

<h3 id="firmware">Firmware</h3>

<p>The next steps will help you ensure you have the latest firmware.</p>

<p>Simply run the command: <code>fw_update</code></p>

<h3 id="wifi">WiFi</h3>

<p>To enable wifi on your device, run the following command (filling in the proper details where need be)</p>

<pre><code>ifconfig iwn0 up
ifconfig iwn0 scan
echo &quot;join WIFI-NAME wpakey PASSPHRASE&quot; &gt;&gt; /etc/hostname.iwn0
echo &quot;dhcp&quot; &gt;&gt; /etc/hostname.iwn0
echo &quot;inet6 autoconf&quot; &gt;&gt; /etc/hostname.iwn0
echo &quot;up powersave&quot; &gt;&gt; /etc/hostname.iwn0
dhclient iwn0
</code></pre>

<p>Take note of the <code>iwn0</code>, as this might differ on your machine. (You can check this by running <code>ifconfig</code>)</p>

<p>You might also need to run <code>doas sh /etc/netstart</code> after.</p>

<h3 id="performanceboost">Performance Boost</h3>

<p>This step is optional and targeted towards devices with batteries (laptops, IoT devices etc). Properly setup apmd:</p>

<pre><code>rcctl enable apmd
rcctl set apmd flags -A
rcctl start apmd
</code></pre>

<h2 id="loginmanager">Login Manager</h2>

<p>Remember when we chose <code>No</code> when the installer asked us &#8220;X Window System start with xenodm?&#8221;. Well, now we want to enable that before our next reboot:</p>

<pre><code>doas rcctl enable xenodm
</code></pre>

<p>Now reboot your device.</p>

<pre><code>doas reboot
</code></pre>

<h2 id="thefirstreallogin">The First <em>Real</em> Login</h2>

<p>Now you will be presented with the glorious <code>xenodm</code> login screen.</p>

<figure>
<img src="./xenodm-stock.png" alt="Default xenodm login screen">
<figcaption>The beautiful, default xenodm login screen. Image taken from <a href="https://www.tumfatig.net/2019/customizing-openbsd-xenodm/">tumfatig.net</a> (who has some wonderful OpenBSD guides you should check out!)</figcaption>
</figure>

<p>Login with your created user details and you should see something like this:</p>

<figure>
<img src="./fvwm.png" alt="Default fvwm view once logged in">
<figcaption>Taken from the main OpenBSD Wikipedia page. (Some applications will not be opened by default)</figcaption>
</figure>

<p>Absolutely glorious. You&#8217;ll also notice a 3x3 grid box in the bottom right corner:</p>

<img src="./pager.png" alt="fvwm workspace pager">

<p>This is called the &#8220;workspace pager&#8221; or &#8220;pager&#8221;. Each section represents an individual <em>desktop</em> (or workspace if your more familiar with MacOS terminology). You can click on any grid item to instantly move to that desktop.</p>

<p>You can also navigate around using the <kbd>Ctl</kbd> + <kbd>&uarr;</kbd><kbd>&rarr;</kbd><kbd>&darr;</kbd><kbd>&larr;</kbd> keys.</p>

<h2 id="additionalpackages">Additional Packages</h2>

<ul>
<li>aerc</li>
<li>Firefox</li>
<li>ffmpeg</li>
<li>picom</li>
</ul>

<h2 id="configs">Configs</h2>

<p>Okay, I <em>know</em> I said there wouldn&#8217;t be any configs included in this guide. Frankly, you should be having zero problems working with all those defaults now that you&#8217;ve run through this guide! BUT - I wanted to include some <em>very minor</em> configuration tweaks that might make things a little more intuitive for newcomers. Feel free to ignore these entirely!</p>

<h2 id="supportopenbsd">Support OpenBSD</h2>

<p>If you&#8217;ve found this guide helpful or even sparked an interest in OpenBSD, please consider <a href="https://www.openbsd.org/donations.html">donating directly to the OpenBSD Project</a>. A little goes a long way, and the OpenBSD Project is a volunteer-driven software group funded by donations!</p>

<h2 id="contributetoopenbased">Contribute to OpenBASED</h2>

<p>I&#8217;m far from an OpenBSD expert! Please <a href="https://git.sr.ht/~bt/openbased">help improve this project</a>!</p>
<hr>
<footer>
    <p>Project created by <a href="https://btxx.org">Bradley Taunt</a><br>
    <a href="https://git.sr.ht/~bt/openbased">Source code</a>  | Hosted on <a href="https://billing.linveo.com/order/forms/a/MTM4Ng==">Linveo</a></p>
</footer>
</body>
</html>