Skip to main content

Post-install setup on OpenBSD 7.4

After installing OpenBSD 7.4, here are customizations to make it more usable.

$ uname -a
OpenBSD obsd.dev.obsd 7.4 GENERIC.MP#2 amd

Install wireless driver

Run ifconfig and see interface names.

$ ifconfig | grep flags | grep -o .*:
lo0:
re0:
iwx0:
enc0:
pflog0:

In this case, the interface named iwx0. Find details about it in dmesg:

$ dmesg | grep iwx0 
iwx0: could not read firmware iwx-cc-a0-77 (error 2)

Download the driver from http://firmware.openbsd.org/firmware/, choose the version you using, in this case is 7.4: http://firmware.openbsd.org/firmware/7.4/iwx-firmware-20230629.tgz

copy the file to an USB formatted as vfat filesystem so all OSes can read from it.

Mount USB

Find the partition to mount: run as root

If the device is sd1, use sd1c as man disklabel explained:

disklabel supports 15 configurable partitions, a through p excluding c. The c partition describes the entire physical disk, is automatically created by the kernel, and cannot be modified or deleted by disklabel.

# disklabel -h /dev/sd1c
# /dev/sd1c:                                                            
type: SCSI                                                              
disk: SCSI disk                                                         
label: DataTraveler 3.0                                                 
duid: 0000000000000000
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 1884
total sectors: 30277632 # total bytes: 15138816.0K
boundstart: 0
boundend: 30277632 

16 partitions:
#                size           offset  fstype [fsize bsize   cpg]
  c:      15138816.0K                0  unused                    
  i:           480.0K               64   MSDOS                    
  j:        679424.0K             1024   MSDOS    

Here the partition we want to mount is j.

obsd# mount /dev/sd1j /mnt/                                            
obsd# ls /mnt
iwx-firmware-20230629.tgz

Run as root: fw_update /mnt/iwx-firmware-20230629.tgz to install the driver.

Turn on wifi

Run as root:

# ifconfig iwx0 nwid WIFI_NAME wpakey PASSWORD
# ifconfig iwx0 up
# dhclient iwx0

To auto-connect to the wifi on startup, add a file named: /etc/hostname.iwx0 with content:

nwid WIFI_NAME wpakey PASSWORD
inet autoconf

Note: change iwx0 in filename to your real interface name.

Install packages

# pkg_add firefox git tmux redshift

Update firmware

# fw_update

Change window manager

Default window manager is fwwm, right click choose cwm.

To set it permanently, write a file at $HOME/.xsession

# use UTF-8 everywhere
export LANG=en_US.UTF-8

# load Xresources file
xrdb -merge $HOME/.Xresources

xsetroot -solid slategrey &
xterm &
redshift &
exec cwm

Read man cwm for default key bindings.

Enable power management to suspend

rcctl start apmd

Then type zzz to suspend.

Append a line to /etc/rc.conf.local

apmd_flags=

To start apmd with system.

Conclusion

Hello OpenBSD once again in 2024!

Comments

Popular posts from this blog

Tài liệu và hướng dẫn học Python

Để tiết kiệm thời gian, tốt nhất là đi học PyMI Updated: 130617 Sau đây là các tài liệu khuyên dùng: Vì nhiều lý do, nên học python2.7 tại thời điểm hiện tại (giờ là tháng 6/2013 - muốn biết tại sao thì tự tìm hiểu) python 3.5+ (giờ là tháng 2/2017) Chuẩn bị: 1. biết bật tắt máy 2. biết cài python 3. tập gõ 10 ngón - gõ 2 ngón hay 1 ngón cũng không sao, nhưng 10 ngón là cách dễ nhất để gõ nhanh nhất. Tài liệu - Nên dùng tài liệu tại trang chủ của Python làm chính, tham khảo thêm các tài liệu khác tại http://www.familug.org/2016/12/free-ebook.html Căn bản, mới học 1.1 Python PyMI.vn https://pymi.vn/tutorial/ 1.2. Python offical tutorial kết hợp làm bài tập trên HackerRank  (đề bài bằng tiếng Anh, nhưng Google translate 1 lúc cũng ra vì có nhiều ví dụ mẫu đi kèm). Học viên của Pymi.vn có rất nhiều học viên đã tự học với Learn Python the hard way nhưng chưa thấy ai thành công cả. Hai link dưới nên đọc sau khi đã nắm được những phần cơ bản của ngôn ngữ pytho...

The PyMiers

New FAMILUG