Editing Kernel Competence

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
 
{{welcome}}
 
{{welcome}}
 +
{{Navbar System}}
 
{{Navbar Kernel Competence}}
 
{{Navbar Kernel Competence}}
  
Line 17: Line 18:
  
 
The kernel is started by the boot loader. The boot loader delivers environment variables to the kernel. Together they form the ''kernel environment.'' The kernel and its environment form also a MIB tree, like the [[sysctl]] tree.  With the [https://www.freebsd.org/cgi/man.cgi?query=kenv&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html kenv(8)] utility you can view the kernel environment.
 
The kernel is started by the boot loader. The boot loader delivers environment variables to the kernel. Together they form the ''kernel environment.'' The kernel and its environment form also a MIB tree, like the [[sysctl]] tree.  With the [https://www.freebsd.org/cgi/man.cgi?query=kenv&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html kenv(8)] utility you can view the kernel environment.
 
==[[kldstat]]==
 
 
The [[kldstat]] utility displays the status of any files dynamically linked into the kernel.
 
  
 
==Modules==
 
==Modules==
Line 32: Line 29:
 
Loading and unloading kernel modules is done with [https://www.freebsd.org/cgi/man.cgi?query=kldload&apropos=0&sektion=8&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html kldload(8)] and [https://www.freebsd.org/cgi/man.cgi?query=kldunload&apropos=0&sektion=8&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html kldunload(8)].
 
Loading and unloading kernel modules is done with [https://www.freebsd.org/cgi/man.cgi?query=kldload&apropos=0&sektion=8&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html kldload(8)] and [https://www.freebsd.org/cgi/man.cgi?query=kldunload&apropos=0&sektion=8&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html kldunload(8)].
  
'''Example:''' You want to load ''vboxdrv.ko,'' listed in '''/boot/[[Modules|modules]]/vboxdrv.ko''' as a third-party kernel module. You simply chop of ''/boot/modules/''  and the ''.ko'' extention and write in a terminal:<br/>
+
'''Example:''' You want to load ''vboxdrv.ko,'' listed in ''/boot/[[Modules|modules]]/vboxdrv.ko'' as a third-party kernel module. You simply chop of ''/boot/modules/''  and the ''.ko'' extention and write in a terminal:<br/>
 
<code><nowiki>#</nowiki> kldload vboxdrv</code><br/>
 
<code><nowiki>#</nowiki> kldload vboxdrv</code><br/>
  
Line 74: Line 71:
 
===Loading Modules at Boot===
 
===Loading Modules at Boot===
 
Normally you want to load a kernel module automatically at boot.<br/>
 
Normally you want to load a kernel module automatically at boot.<br/>
You have to make an entry in the '''[[/boot/loader.conf]]''' file.
+
You have to make an entry in the ''/boot/loader.conf'' file.
  
 
The procedure is always the same: Take the name of the kernel module and add: <code>_load="YES"</code>
 
The procedure is always the same: Take the name of the kernel module and add: <code>_load="YES"</code>
Line 82: Line 79:
 
<code>vboxdrv_load="YES"</code>
 
<code>vboxdrv_load="YES"</code>
  
==[[Sysctl]]==     
+
==sysctl==     
  
With [[Sysctl] you will get information obout your kernel version and much more.<br/>
+
The simplest and best supported way to alter a kernel is to use the [[sysctl]] interface. The [https://www.freebsd.org/cgi/man.cgi?query=sysctl&apropos=0&sektion=8&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html sysctl(8)] allows you to retrieve the values used by the kernel and in some cases to set them.
The simplest and best supported way to alter a kernel is to use the '''[[sysctl]]''' interface. The [https://www.freebsd.org/cgi/man.cgi?query=sysctl&apropos=0&sektion=8&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html sysctl(8)] allows you to retrieve the values used by the kernel and in some cases to set them.
+
  
 
sysctl is a very powerful program. You can solve performance issues but also crash your system.
 
sysctl is a very powerful program. You can solve performance issues but also crash your system.

Please note that all contributions to GhostBSD Wiki are considered to be released under the Creative Commons Attribution (see GhostBSD Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)