KLDLOAD(8)
π kldload β load a file into the kernel π
okay so this is kldload(8) from the System Manager's Manual, and honestly it's giving "small command, big main character energy" β¨ because it's literally how you shove a .ko file into your running kernel. let's go π«Ά
β¨ SYNOPSIS β¨
kldload [-nqv] file ...
πΈ DESCRIPTION πΈ
bestie. kldload loads file.ko into the kernel using the kernel linker. that's the whole vibe. π
lowkey important: if you specify multiple modules, it's gonna attempt to load them all, even if some of them fail. no cap, it doesn't bail on the first failure β it just keeps going. π₯
also cute: the .ko extension is not mandatory when loading a module with kldload. it doesn't hurt to specify it though β specify it, don't specify it, the kernel does not care. π
here's the part people trip on π β if you request a bare filename, it will only be loaded if it's found within the module path as defined by the sysctl kern.module_path. so if you're like "kldload foo" and foo is sitting in your current directory, it's not gonna load. to load a module from the current directory you've gotta specify it as a full or relative path. and the utility will warn you if a module is requested as a bare filename and is present in the current directory β it's looking out for you fr fr π«Ά
the following options are available:
π OPTIONS π
-nβ don't try to load the module if it's already loaded. like, don't even try, it's already slaying π-vβ be more verbose. more talking, more info, we love a chatty icon π-qβ silence any extraneous warnings. quiet queen behavior π€«
β NOTES β
the kernel security level settings may prevent a module from being loaded or unloaded, and when that happens it gives you Operation not permitted. not a bug, just the security level doing its thing. π
π¦ FILES π¦
/boot/kernelβ directory containing loadable modules. modules must have an extension of.ko.
π EXIT STATUS π
the kldload utility exits 0 on success, and >0 if an error occurs. simple. iconic. periodt. π
π EXAMPLES π
to load by module name:
> kldload foo
to load by file name within the module path:
> kldload foo.ko
to load by relative path:
> kldload ./foo.ko
to load by full path:
> kldload /boot/kernel/foo.ko
π§ AUTOMATICALLY LOADING MODULES π§
some modules (pf, ipfw, ipf, etc.) may be automatically loaded at boot time when the corresponding rc.conf(5) statement is used. modules may also be auto-loaded through their addition to loader.conf(5) or kld_list in rc.conf(5). so you don't even have to type anything β it just happens β¨
but listen π only those modules necessary for booting the system, including those required for mounting the root filesystem, should be handled by loader.conf(5).
π SEE ALSO π
kenv(1), kldload(2), loader.conf(5), rc.conf(5), security(7), kldconfig(8), kldstat(8), kldunload(8), kldxref(8)
π HISTORY π
the kldload utility first appeared in FreeBSD 3.0, replacing the lkm interface. glow-up of the century honestly π
β¨
π AUTHORS π
Doug Rabson <dfr@FreeBSD.org>
okay that's the whole page, you're officially a kernel module loading girlie now πΈπ¦π
mwah π β this Debian build is dated December 20, 2023, and it's sourced from the System Manager's Manual, KLDLOAD(8). go load something iconic π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 1997 Doug Rabson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms