Amiga Unix — 68040 · 68060

Manual pages › System administration commands (1M)

modadmin(1M)

load, unload and inspect kernel modules

Package: modtools, added for amigaux.

modadmin - load, unload and inspect kernel modules

modadmin -s | -S
modadmin -q id ... | -Q name ...
modadmin -l name|path ...
modadmin -u id ... | -U name ...
modadmin -d dir[:dir] | -D
modadmin -r cdev|sdev name major ...
modadmin -k name ... | -a addr ...
modadmin -p name[:n] ... | -w name value
modadmin -L | -K | -B

modadmin loads, unloads and reports the loadable modules of a running Amix 1.1 kernel: disk and network drivers, filesystems and the rest. Most modules need no attention: the generation that booted names them, and the kernel and the boot scripts load them by class. Root-class modules load as the kernel starts, boot-class modules at the first sysinit entry, and demand-class modules at the first open of their device or the first mount of their filesystem.

kbootset(1M) decides what a generation holds; use it to add or remove a module for good. modadmin acts on the running kernel only, and what it does is gone at the next boot.

Exactly one option is given, as the first argument. The status options, loads, unloads and search-path options, and -r, are for root. -k and -a are for anyone. -p, -w, -L and -K need access to /dev/kmem.

One line per loaded module: its id, reference count, dependent count and name.
The full status of every loaded module, as -q.
The full status of each module: name, id, path, size, base address, wrapper revision, unload delay, reference and dependent counts, flags and linkages. An unload delay of never (locked) is a module that cannot be unloaded.
The same, by name.
Load each module and print its id. A module loads only as a member of the booted generation: from the path its manifest gives, /stand/gen/id/mod/name, and only with the SHA-256 the manifest gives. Anything else is refused with EPERM, and the console says why. A boot with development loading (kbootset next devload) lifts that rule for that boot, and the console says so at each load. In safe mode only the root set and what /etc/conf/modreg.local.d marks safe will load.
Unload each module. An id of 0 unloads every unused module. A module loads pinned unless it declares unload=allowed: a pinned one, or one in use, is refused with EBUSY.
Unload by name.
Put these directories first on the kernel's module search path.
Reset the search path.
Register character (cdev) or STREAMS (sdev) driver majors for a module, so that the first open loads it. The major registry decides: a major that belongs to another module is refused.
Print the address of each symbol: the kernel's exported names first, then each loaded module's globals.
Print the symbol each address falls in, and the offset into it.
Print n longs (default 1, at most 64) at a symbol, read through /dev/kmem. A module's tunables and counters move with it, so they are reached by name.
Write one long at a symbol through /dev/kmem.
Print the kernel's message buffer, oldest first, text only, after a line of its control words: what the core and the modules printed, also after the console stopped showing kernel messages. It finds the buffer in /stand/unix.
Keep every kernel message in that buffer as well as on the console. Without a console logger the kernel stores nothing there after boot.
Load the boot-class modules of the booted generation, once a boot. The first sysinit entry of /etc/inittab runs it; it is not for use by hand.

After -l, -u or -U has loaded or unloaded a module, modadmin runs kbootset namelist, so that /stand/unix carries the loaded modules' symbols for crash(1M). A demand-class module loaded by a first open or mount appears there at the next rewrite.

0
Every operand succeeded.
1
An operand failed; the others were still tried, and each failure is named on standard error.
2
A usage error.

/stand/gen/id/mod/
the modules of a generation, boot and demand class.
/stand/unix
the booted kernel's namelist, written by kbootset(1M).
/dev/kmem
kernel memory, for -p, -w, -L and -K.
/etc/inittab
runs modadmin -B as its first sysinit entry.

What is loaded:

modadmin -s

One module in full:

modadmin -Q ufs

What the kernel printed since boot, kept from now on:

modadmin -K
modadmin -L

kbootset(1M), apkg(1), crash(1M)

2026-11-04 modtools