I am using the release version of OpenBSD 5.6 and have to apply a patch called 004_kernexec.patch.sig (URL: http://ftp.openbsd.org/pub/OpenBSD/patches/5.6/common/004_kernexec.patch.sig )

An excerpt of the said patch is as follows:

OpenBSD 5.6 errata 4, Oct 20, 2014:
Executable headers with an unaligned address will trigger a kernel panic.
Apply patch using:

    signify -Vep /etc/signify/openbsd-56-base.pub -x 004_kernexec.patch.sig \
        -m - | (cd /usr/src && patch -p0)

Then build and install a new kernel.

I'm now at the section titled 5.3.4 - Building the kernel (URL: http://www.openbsd.org/faq/faq5.html#Why).

According to it, I need to issue the following command first:

cd /usr/src/sys/arch/`machine`/conf

followed by

config GENERIC

Is it compulsory to use the name GENERIC? Can I call it something else such as bsd?

I remember that towards the end of the installation process of the OS, there was this line that stated bsd.mp would replace bsd.rd as my machine was a multi-processor system.

  • First search result
    – SailorCire
    Dec 10, 2014 at 18:27
  • 1
    First, download the source from your favourite mirror. (If only the kernel, you need the file called sys.tar.gz). You can read the instructions for this in the FAQ section 5.3.3 openbsd.org/faq/faq5.html#BldGetSrc. You said you're currently using release, so you want to read the -stable section not the section about -current. Once you have the source, take a look at the FAQ section 10.15 about how to apply patches openbsd.org/faq/faq10.html#Patches. Dec 10, 2014 at 23:49
  • 2
    If you get stuck, email misc@. I don't know why this question was put on hold; as an OpenBSD user it is reasonable that newbies might need help with this and it's perfectly well documented in the OpenBSD faq. Dec 10, 2014 at 23:51
  • @user267506: Thanks for the tip on the file sys.tar.gz. That really helps to narrow down what file I need to patch against. Dec 11, 2014 at 1:47
  • @user267506 Email to what address? Dec 11, 2014 at 17:56

3 Answers 3


The OpenBSD FAQ is your friend in this case. They have extensive documentation on how to build your own kernel. In particular you want section 5.3.4 but before you do that make sure and read all of section 5.3 to get a feel for the bigger picture. I'd also recommend taking a look at Absolute OpenBSD by Michael Lucas. He's got a pretty good walk through on how to build your own kernel.

Good luck.

  • I've read the OpenBSD FAQ before posting for help here. Just to be clear: I'm not looking to build a custom kernel. I'm looking to how to use 004_kernexec.patch.sig to patch my system. And the instructions provided by the patch states that I've to build and install a new kernel after patching. Dec 11, 2014 at 1:50
  • 1
    @user.stackexchange.253690: Sorry. You are right. I've repointed the links to the instructions for GENERIC and modified my answer to reflect the same.
    – unclejamil
    Dec 11, 2014 at 2:03
  • Could you've a look at my edited post and answer my question as to whether the name GENERIC is compulsory? Thanks. Dec 11, 2014 at 2:08
  • 1
    You can copy the GENERIC configuration into another one and give it a new name but that's something usually associated with preparing and building a custom kernel with different configuration entries (e.g. options and such). I don't think it really matters though so if you want to use a different name you can do so. Best to give it a name that distinguishes it from the original but I wouldn't call it 'bsd'. I believe convention is to use all uppercase when naming these things so you might use something like PATCHED004 to indicate you were working with that particular patch.
    – unclejamil
    Dec 11, 2014 at 2:37

If you don't create a configuration file of your own, then it has to be GENERIC. GENERIC is the name of the configuration file to use when setting up the kernel compilation. You can create your own kernel configuration by copying GENERIC to something else and then editing it. The you would put that name in for GENERIC. However, the OpenBSD project doesn't provide support for custom kernel configurations since there are an infinite number of ways you can break things doing so.


OpenBSD's documentation is TERRIBLE. If I change to /usr/src/sys/arch/amd64/conf there is a flat file called GENERIC.MP.

The docs verbatim say,

cd /sys/arch/$(machine)/compile/GENERIC.MP

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .