Bug 158992

Summary: loader.conf(5) man page: examples are incorrect
Product: Documentation Reporter: wayne mitchell <wayne.mitchell.iz>
Component: Books & ArticlesAssignee: John Baldwin <jhb>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description wayne mitchell 2011-07-17 10:30:12 UTC
man page for loader.conf shows values to set with examples
value for 'kernel' is incorrect
man page shows:

kernel  (''/boot/kernel/kernel'')

this does not work, the system prepends this value with the /boot/kernel/ path value, which would give /boot/kernel//boot/kernel/kernel
not sure what purpose this value has as the system boots with the standard kernel even when this value is incorrect - though it does knock out the module loading

Fix: 

set value in loader.conf as:
kernel="kernel"

and correct the man page
How-To-Repeat: set value in loader.conf as:
kernel="/boot/kernel/kernel"
this should knock out module loading (is all i noticed)
Comment 1 John Baldwin freebsd_committer freebsd_triage 2011-07-18 18:15:45 UTC
> this does not work, the system prepends this value with the /boot/kernel/ 
path value, which would give /boot/kernel//boot/kernel/kernel
> not sure what purpose this value has as the system boots with the standard 
kernel even when this value is incorrect - though it does knock out the module 
loading 

The default value is actually "kernel".  You can set it to, e.g. "test" to 
boot from /boot/test/kernel (and modules from /boot/test).

How about this:

Index: loader.conf.5
===================================================================
--- loader.conf.5	(revision 224058)
+++ loader.conf.5	(working copy)
@@ -107,6 +107,9 @@ present file.
 Name of the kernel to be loaded.
 If no kernel name is set, no additional
 modules will be loaded.
+The name must be a subdirectory of
+.Pa /boot
+that contains a kernel.
 .It Ar kernel_options
 Flags to be passed to the kernel.
 .It Ar password
@@ -190,7 +193,7 @@ replacing it with
 .Dq spinning
 character (useful for embedded products and such).
 .It Va kernel
-.Pq Dq Pa /boot/kernel/kernel
+.Pq Dq kernel
 .It Va loader_conf_files
 .Pq Dq Pa /boot/loader.conf /boot/loader.conf.local
 .It Va splash_bmp_load

-- 
John Baldwin
Comment 2 dfilter service freebsd_committer freebsd_triage 2011-07-20 16:18:34 UTC
Author: jhb
Date: Wed Jul 20 15:18:24 2011
New Revision: 224228
URL: http://svn.freebsd.org/changeset/base/224228

Log:
  Note that the "kernel" variable in loader.conf is the name of a directory
  containing a kernel under /boot and that it's default value is "kernel"
  not "/boot/kernel/kernel".
  
  PR:		docs/158992
  Reported by:	Wayne Mitchell  wayne.mitchell.iz at gmail
  Approved by:	re (kib)
  MFC after:	1 week

Modified:
  head/sys/boot/forth/loader.conf.5

Modified: head/sys/boot/forth/loader.conf.5
==============================================================================
--- head/sys/boot/forth/loader.conf.5	Wed Jul 20 13:29:39 2011	(r224227)
+++ head/sys/boot/forth/loader.conf.5	Wed Jul 20 15:18:24 2011	(r224228)
@@ -23,7 +23,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd January 16, 2008
+.Dd July 20, 2011
 .Dt LOADER.CONF 5
 .Os
 .Sh NAME
@@ -107,6 +107,9 @@ present file.
 Name of the kernel to be loaded.
 If no kernel name is set, no additional
 modules will be loaded.
+The name must be a subdirectory of
+.Pa /boot
+that contains a kernel.
 .It Ar kernel_options
 Flags to be passed to the kernel.
 .It Ar password
@@ -190,7 +193,7 @@ replacing it with
 .Dq spinning
 character (useful for embedded products and such).
 .It Va kernel
-.Pq Dq Pa /boot/kernel/kernel
+.Pq Dq kernel
 .It Va loader_conf_files
 .Pq Dq Pa /boot/loader.conf /boot/loader.conf.local
 .It Va splash_bmp_load
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 3 John Baldwin freebsd_committer freebsd_triage 2011-07-20 18:32:30 UTC
State Changed
From-To: open->patched

Fix committed to HEAD. 


Comment 4 John Baldwin freebsd_committer freebsd_triage 2011-07-20 18:32:30 UTC
Responsible Changed
From-To: freebsd-doc->jhb

Fix committed to HEAD.
Comment 5 John Baldwin freebsd_committer freebsd_triage 2011-09-16 19:18:46 UTC
State Changed
From-To: patched->closed

Merged to 8.