Editing Kernel Competence
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 3: | Line 3: | ||
==Introduction== | ==Introduction== | ||
− | On this page and its sub-pages we will collect all information connect to the kernel, like managing kernel modules, retrieve information from the kernel and use special commands | + | On this page and its sub-pages we will collect all information connect to the kernel, like managing kernel modules, retrieve information from the kernel and use special commands. |
− | + | ||
− | + | ||
− | + | ||
==Kernel== | ==Kernel== | ||
Line 13: | Line 10: | ||
To follow the UNIX philosophy: to minimalist, modular software development the Ghost/FreeBSD kernel is set together out of modules. If a hardware requires a special piece of software, a appropriate module has to be loaded in to the working memory. Not needed modules stay on the hard disc or the software repositories. | To follow the UNIX philosophy: to minimalist, modular software development the Ghost/FreeBSD kernel is set together out of modules. If a hardware requires a special piece of software, a appropriate module has to be loaded in to the working memory. Not needed modules stay on the hard disc or the software repositories. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Modules== | ==Modules== | ||
− | The kernel and any modules included with GhostBSD are files in the directory | + | The kernel and any modules included with GhostBSD are files in the directory ''/boot/kernel''. |
− | Third-party modules are located in | + | Third-party modules are located in ''/boot/modules''. Not all modules are loaded by default. If needed, one can load them later.<br/> |
All files elsewhere on the system or in the [https://www.freebsd.org/ports/kld.html ports] called the ''userland'', meaning they are intended for users even if they use kernel facilities. | All files elsewhere on the system or in the [https://www.freebsd.org/ports/kld.html ports] called the ''userland'', meaning they are intended for users even if they use kernel facilities. | ||
Line 32: | Line 21: | ||
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 | + | '''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/> |
The following options are available:<br/> | The following options are available:<br/> | ||
− | + | * -n -- Do not try to load module if already loaded. | |
− | + | * -v -- Be more verbose. | |
− | + | * -q -- Silence any extraneous warnings. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
To unload this module you write:<br/> | To unload this module you write:<br/> | ||
− | <code><nowiki>#</nowiki> kldunload vboxdrv</code><br/> | + | <code><nowiki>#</nowiki>kldunload vboxdrv</code><br/> |
The following options are available:<br/> | The following options are available:<br/> | ||
− | + | * -f -- Force the unload. This ignores error returns to MOD_QUIESCE from the module and implies that the module should be unloaded even if it is currently in use. The users are left to cope as best they can. | |
− | + | * -v -- Be more verbose. | |
− | + | * -i id -- Unload the file with this ID. | |
− | + | * -n name -- Unload the file with this name. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
'''NOTES'''<br/> | '''NOTES'''<br/> | ||
− | The kernel security level settings may prevent a module from being loaded or unloaded by giving | + | The kernel security level settings may prevent a module from being loaded or unloaded by giving Operation not permitted. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | == | + | ===Loading modules at Boot=== |
+ | Normally you want to load a kernel module automatically at boot . So you have to use ''/boot/loader.conf''. | ||
− | + | ==Kernel Tools== | |
− | + | ||
− | |||