c4b055c8e4d6222a9a5440cf0f892da16549c402
unix/openbsd.md
... | ... | @@ -1,5 +1,45 @@ |
1 | 1 | # openbsd |
2 | 2 | |
3 | +## setting up new system |
|
4 | +### pre install |
|
5 | +* [softraid encryption][] with keydisk |
|
6 | +* select `(S)hell` from install menu |
|
7 | +``` |
|
8 | +cd /dev && sh MAKEDEV sd0 |
|
9 | +dd if=/dev/urandom of=/dev/rsd0c bs=1m |
|
10 | +fdisk -iy sd0 #mbr |
|
11 | +disklabel -E sd0 |
|
12 | + Label editor (enter '?' for help at any prompt) |
|
13 | + sd0> a a |
|
14 | + offset: [64] |
|
15 | + size: [976773104] * |
|
16 | + FS type: [4.2BSD] RAID |
|
17 | + sd0*> w |
|
18 | + sd0> q |
|
19 | + No label changes. |
|
20 | +sh MAKEDEV sd2 #keydisk |
|
21 | +fdisk -iy sd2 #mbr |
|
22 | +disklabel -E sd2 |
|
23 | + Label editor (enter '?' for help at any prompt) |
|
24 | + sd2> a a |
|
25 | + offset: [64] |
|
26 | + size: [7831488] 1024 |
|
27 | + FS type: [4.2BSD] RAID |
|
28 | + sd2*> w |
|
29 | + sd2> q |
|
30 | + No label changes. |
|
31 | +bioctl -c C -k sd2a -l sd0a softraid0 |
|
32 | +sh MAKEDEV sd3 #softraid |
|
33 | +dd if=/dev/zero of=/dev/rsd3c bs=1m count=1 |
|
34 | +exit |
|
35 | +``` |
|
36 | +* continue with [installation][], selecting softraid disk (`sd3`) for install |
|
37 | + |
|
38 | +### post install |
|
39 | +``` |
|
40 | +echo "permit nopass <username> > /etc/doas.conf |
|
41 | +pkg_add -u |
|
42 | +``` |
|
3 | 43 | ## firewall |
4 | 44 | ``` |
5 | 45 | vi /etc/pf.conf |
... | ... | @@ -18,3 +58,21 @@ sysctl hw.disknames |
18 | 58 | ``` |
19 | 59 | disklabel <device> |
20 | 60 | ``` |
61 | +* creating msdos partition |
|
62 | +``` |
|
63 | +disklabel -E <disk> |
|
64 | + Label editor (enter '?' for help at any prompt) |
|
65 | + sd2> a b |
|
66 | + offset: [1088] |
|
67 | + size: [7830464] * |
|
68 | + FS type: [4.2BSD] msdos |
|
69 | + sd2*> w |
|
70 | + sd2> q |
|
71 | + No label changes. |
|
72 | +newfs_msdos /dev/rsd2b |
|
73 | +``` |
|
74 | + |
|
75 | +## misc |
|
76 | +* hostname - /etc/myname |
|
77 | + |
|
78 | +[softraid encryption]: https://www.openbsd.org/faq/faq14.html#softraidFDE |