Home / Articles

Disabling OpenBSD kernel device


This article describes how to disable OpenBSD kernel device which may prevent the computer from booting properly.

Change kernel device configuration at boot

Power on the computer, and wait for the boot prompt which looks like this:


Enter the boot time configuration by:

boot -c

The device can be disabled using the disable command. For example, to disable the amdgpu device, enter:

disable amdgpu

Continue the boot process by entering:


Apply modifications for next boot

To apply the modifications automatically for the next boot, even after a new kernel is installed (for example, after applying a patch), and to avoid kernel relinking failure, create the /etc/rc.shutdown file with the following content:

printf 'disable amdgpu\nquit\n' | config -ef /bsd
sha256 /bsd >/var/db/kernel.SHA256

The first line uses config to modify the kernel device configuration. The second line calculates the new hash of the kernel.

On every system shutdown, the modifications are applied and the hash is calculated automatically.