|
NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|
|||
How to enable kernel options?
Hello,
Can anyone tell me how to check if the following options are enable: Quote:
|
|
||||
These kinds of options are set (or unset) at the time the kernel is compiled. Each kernel will have a specific configuration file that is used to set the desired options, and then the kernel will be built with reference to the desired configuration file. The configuration files are found in the source code tree, in the directory usr/src/sys/arch/amd64/conf/, for example. For i386 you would replace "amd64" with "i386".
For example, the generic kernel distributed with the system is configured by the file called GENERIC. With that background, to answer your first question, you would look into the configuration file used to compile the binary kernel in question. If you're using a kernel supplied with the system this can be found on the web, e.g., http://ftp.netbsd.org/pub/NetBSD/Net...4/conf/GENERIC For the second question: If you want to change option values, or enable/disable options, then you need to create a new configuration file with all the options you want in it. This would often be done by taking an existing config file, like GENERIC, and editing it a bit. Then you would compile a new kernel using the new configuration file. To learn more about all this you can study the NetBSD Guide, Section 32 Compiling the kernel . Hope that helps. Last edited by IdOp; 12th November 2019 at 03:05 PM. Reason: pre-pend usr/ to directory; wording |
|
||||
Quote:
Quote:
TBH, there's no need to either fetch the GENERIC config remotely or extract syssrc.tgz just to get the file, as config(1) can extract the configuration embedded in a loaded kernel ELF at any time with the -x option, and print it to stdout; For a quick config lookup, I keep this in my ~/.shrc: Code:
chkconf() { echo "Which option would you like to check?" read VAR if config -x /netbsd | grep -q $VAR; then echo found else echo not found fi }
__________________
“Mi casa tendrá dos piernas y mis sueños no tendrán fronteras„ |
|
|||
Thank you for the information.
|
|
||||
You're welcome. I wanted to add one other thing. The default configuration files are also found in the system source archive file syssrc.tgz . It's a pretty big file, so it may be easier just to look at the config file on the web as I suggested. But if you're compiling kernels, you already have it on your disk.
|
|
|||
I got it. Thanks.
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
enable php in apache2 | MatthiasKoch | OpenBSD Packages and Ports | 2 | 30th September 2016 11:54 AM |
OpenBSD 5.0 - How to enable dfs ? | mayuka | OpenBSD General | 5 | 13th November 2011 07:09 AM |
Enable SNMP? | dzudja100 | FreeBSD Ports and Packages | 1 | 20th May 2010 05:52 PM |
boot bug with USB enable | nORKy | FreeBSD Installation and Upgrading | 5 | 12th June 2008 04:56 PM |