summaryrefslogtreecommitdiff
path: root/wiki/openbsd/installation.mdwn
blob: 649bdc63848fc676af79d998c5eb8a7f5bd2b70e (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
Below you can find instructions for installing OpenBSD on a personal computer. 

The example below covers installing **OpendBSD 7.5** on a X220 ThinkPad laptop. 

## Requirements

* USB device
* Ethernet connection (with active internet)
* A cup of coffee

## Before the Install

Make sure you have the latest OpenBSD image formatted on your USB device and that your computer/laptop is set to boot from USB via the BIOS. 

## Installation

1. Boot from USB
2. Choose `Install`
3. Keyboard layout: `us`
4. Hostname: `x220` (or whatever you choose)
5. Network: `em0`
6. IPv4: `autoconf` 
7. IPv6: `none`
8. Network interface: `done`
9. Password for root
10. Start sshd by default? `yes`
11. X Window System start with xenodm? `no`
12. Setup user? `username` (follow setup user steps)
13. Allow root ssh login? `no`
14. Timezone 
15. Which disk? Use internal (`sd0` etc.)
16. Encrypt root disk? `no`
17. Use `WHOLE` disk
18. Use `AUTO` layout
19. Which disk to initialize: `done`
20. Location of sets: `http`
21. HTTP Proxy URL? `none`
22. HTTP Server? `1` (Toronto)
23. Confirm again
24. Server directory? `pub/OpenBSD/7.5/amd64`
25. Set names? `done`
26. Drink some coffee while it verifies (depends on network speed)
27. Location of sets? `done`
28. Congrats!
29. Reboot and remove USB device

## First Boot Tweaks

### User Permissions

Before we do anything, we should give our main user full access via `doas`. Login as `root` and run the following:

    echo "permit nopass :wheel" >> /etc/doas.conf

Now you can logout or reboot the machine.

### Firmware

Once your machine reboots, login as your created user. The next steps will help you ensure you have the latest firmware.

Simply run the command: `fw_update`


### WiFi

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

    ifconfig iwn0 nwid ID wpakey PASSPHRASE

An example for reference:

    ifconfig iwn0 nwid wifi_name wpakey my_secure_password

Take note of the `iwn0`, as this might differ on your machine.

You might also need to run `doas sh /etc/netstart` after.


### Performance Boost

This step is optional and targeted towards devices with batteries (obviously). Properly setup apmd:

    rcctl enable apmd
    rcctl set apmd flags -A
    rcctl start apmd