Bug 272139

Summary: loader(8) description, and see also, with regard to kernel modules
Product: Documentation Reporter: Graham Perrin <grahamperrin>
Component: Manual PagesAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Many People CC: doc, emaste
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272129

Description Graham Perrin freebsd_committer freebsd_triage 2023-06-22 05:12:39 UTC
From <https://man.freebsd.org/cgi/man.cgi?query=loader&sektion=8&manpath=freebsd-release#DESCRIPTION>: 

> … responsible for bringing the kernel, kernel modules and other files 
> into memory. …

That's not sole responsibility; and SEE ALSO makes no mention of hier(7), rc(8) or rc.conf(5). 

From the latter: 

> … kld_list … Loading modules at this point in the boot process is 
> much faster than doing it via /boot/loader.conf for those modules 
> not necessary for mounting local disks. …

A simple improvement to the description or loader(8) should clarify that responsibility is for these kernel modules: 

/boot/firmware/
/boot/kernel/

– but not these kernel modules: 

/boot/modules/
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2023-06-22 05:14:24 UTC
In reply to Mina Galić from bug 272129 comment 9

I took a hier(7) perspective: 

/boot/     …

     defaults/     …
     dtb/          …
     efi/          …
     firmware/     loadable kernel modules …
     kernel/       pure kernel … and kernel modules
     modules/      third-party loadable kernel modules, …
     …             …

Whilst D25601 was rc-oriented, it is true (for my use cases) that the majority of kernel modules are in /boot/kernel/ …

% sudo rm /boot/modules/*.pkgsave
% ls /boot/firmware
% ls /boot/kernel
% ls /boot/modules
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2023-06-22 05:29:11 UTC
(In reply to Graham Perrin from comment #0)

> … A simple improvement to the description or loader(8) …

Correction: 

> … A simple improvement to the description of loader(8) …
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2023-06-22 05:34:39 UTC
(In reply to Graham Perrin from comment #0)

> … not sole responsibility; …

That's not quite what I meant, but I'll not attempt to correct the meaning in Bugzilla. 

> … A simple improvement …

I'll make a pull request.
Comment 4 Ed Maste freebsd_committer freebsd_triage 2023-06-22 13:58:14 UTC
(In reply to Graham Perrin from comment #0)
I don't see why loader is not responsible for /boot/modules
Comment 5 Graham Perrin freebsd_committer freebsd_triage 2023-06-22 19:31:12 UTC
(In reply to Ed Maste from comment #4)

Indeed, that's part of what I wanted to correct in comment 0