about summary refs log tree commit diff
path: root/www/text.causal.agency/027-openbsd-linode.7
blob: 9f40de429114516f8cc7b15fc1b86ad4bdf08789 (plain) (blame)
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
.Dd September 26, 2021
.Dt OPENBSD-LINODE 7
.Os "Causal Agency"
.
.Sh NAME
.Nm Installing OpenBSD on Linode
.Nd a guide
.
.Sh DESCRIPTION
I've been thinking for a while
about moving my servers to Linode,
and also about moving them to
.Ox .
I actually originally got into
.Fx
(and from there,
.Ox )
only because DigitalOcean
started offering it as a
.Dq droplet
image.
I've been running those servers fine for years,
but now I prefer to run
.Ox ,
and some recent DigitalOcean outages
had me thinking about it more,
so I'm giving it a shot.
.
.Pp
As an aside,
running
.Ox
on DigitalOcean
is not really a good option.
It seems more awkward to install your own OS there,
and if you do,
I've heard that IPv6 won't work
because they don't know how to run SLAAC.
Also,
now that I've used
the Linode control panel and LISH a bit,
DigitalOcean kind of feels like a toy
in comparison.
.
.Pp
Here's what I did to install
.Ox
on Linode:
.Bl -enum
.It
Create a Linode with the
.Dq Choose a Distribution
box blank.
.
.It
Under the Storage tab,
create a disk called
.Dq miniroot
of type raw
with size 8 MB.
This will hold the install image.
.
.It
Create another disk called
.Dq root
of type raw
using the remaining available storage.
.
.It
Boot the Linode in rescue mode
from the option in the three-dots menu
next to
.Dq Power On .
Attach
.Dq miniroot
to
.Pa /dev/sda .
.
.It
Log into the LISH console
and obtain the install image:
.Bd -literal
curl -O https://cdn.openbsd.org/pub/OpenBSD/6.9/amd64/miniroot69.img
dd if=miniroot69.img of=/dev/sda
.Ed
.Pp
Power off the Linode.
.
.It
Under the Configurations tab,
create a configuration called
.Dq install
in full virtualization mode.
Paravirtualization works fine once installed,
but for some reason the installer
can't see the root disk
without full virtualization.
Under boot settings,
select direct disk.
Attach
.Dq root
to
.Pa /dev/sda ,
.Dq miniroot
to
.Pa /dev/sdb
and set the root device to
.Pa /dev/sdb .
.
.It
Create a similar configuration called
.Dq boot
but using paravirtualiztion
and without
.Dq miniroot
attached.
Set the root device to
.Pa /dev/sda .
.
.It
Boot the
.Dq install
configuration,
launch the LISH console
and switch to Glish.
It's possible
to have the installer use serial console,
but it requires entering commands
at the boot prompt
before the timeout,
and I never managed it.
If you do manage it,
run:
.Bd -literal
stty com0 9600
set tty com0
boot
.Ed
.
.It
Proceed through the
.Ox
installer.
When asked to
change the default console to com0,
answer yes
so that regular LISH will work.
Power off the Linode.
.
.It
Boot the
.Dq boot
configuration
and log in to LISH.
Since the installer configured networking
in full virtualization,
rename the file to the paravirtualized interface:
.Bd -literal
mv /etc/hostname.em0 /etc/hostname.vio0
.Ed
.Pp
In order to get the right public IPv6 address,
disable privacy extensions
by changing the inet6 line of
.Pa hostname.vio0
to:
.Bd -literal
inet6 autoconf -temporary -soii
.Ed
.
.It
Bring networking up
and run
.Xr syspatch 8
since
.Pa rc.firsttime
couldn't do it:
.Bd -literal
sh /etc/netstart
syspatch
.Ed
.
.It
Reboot.
.El
.
.Pp
I guess I'll be slowly moving things over
to the new servers
for the next little while.
With any luck the next post here
will not say
.Fx
in its header!
.
.Sh SEE ALSO
I learned the basic idea
of how to do this from
.Lk https://www.subgeniuskitty.com/notes/openbsd_on_linode .
.
.Sh AUTHORS
.An june Aq Mt june@causal.agency