Bug 163442

Summary: boot/loader.conf not processed at boot time
Product: Base System Reporter: User & <tomdean>
Component: amd64Assignee: freebsd-amd64 (Nobody) <amd64>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description User & 2011-12-19 01:00:21 UTC
# cat /boot/loader.conf
cpuctl_load="YES"
nvidia_load="YES"
linux_load="YES"

# reboot

< login >
# kldstat
 1   27 0xffffffff80200000 fdc000   kernel
 2    1 0xffffffff81412000 328d     ng_ubt.ko
 3    1 0xffffffff81416000 8b3d     ng_hci.ko
 4    3 0xffffffff8141f000 a79      ng_bluetooth.ko
 5    5 0xffffffff81420000 8e12     netgraph.ko
 6    1 0xffffffff81429000 b4a2     ng_l2cap.ko
 7    1 0xffffffff81435000 1695e    ng_btsocket.ko
 8    1 0xffffffff8144c000 1ba9     ng_socket.ko

# ls /boot/kernel|grep cpuctl
cpuctl.ko*
cpuctl.ko.symbols*
# ls /boot/modules | grep nvidia
nvidia.ko*

# kldload linux
# kldload cpuctl
# kldload nvidia
# kldstat
 1   27 0xffffffff80200000 fdc000   kernel
 2    1 0xffffffff81412000 328d     ng_ubt.ko
 3    1 0xffffffff81416000 8b3d     ng_hci.ko
 4    3 0xffffffff8141f000 a79      ng_bluetooth.ko
 5    5 0xffffffff81420000 8e12     netgraph.ko
 6    1 0xffffffff81429000 b4a2     ng_l2cap.ko
 7    1 0xffffffff81435000 1695e    ng_btsocket.ko
 8    1 0xffffffff8144c000 1ba9     ng_socket.ko
 9    1 0xffffffff8144e000 1e17b    linux.ko
10    1 0xffffffff8146d000 d48      cpuctl.ko
11    1 0xffffffff8146e000 a34f1d   nvidia.ko

If I put linux_enable="YES" in etc/rc.conf then linux is loaded on boot.  But,
 cpuctl="YES" or nvidia="YES" do not have similar effects..

Has 9.0 dropped loader.conf?  The man pages still refer to it and say that is
the way to load modules at boot time.

In /boot/defaults/loader.conf, I see
loader_conf_files="/boot/device.hints /boot/loader.conf /boot/loader.conf.local"

/boot/nextboot.conf does not exist.

# cat /boot/loader.rc
\ Loader.rc
\ $FreeBSD: releng/9.0/sys/boot/i386/loader/loader.rc 151874 2005-10-30 05:41:42Z scottl $
\
\ Includes additional commands
include /boot/loader.4th

\ Reads and processes loader.conf variables
start

\ Tests for password -- executes autoboot first if a password was defined
check-password

\ Load in the boot menu
include /boot/beastie.4th

\ Start the boot menu
beastie-start

How-To-Repeat: Install cpuctl and nvidia
Create/edit /boot/loader.conf
reboot
Comment 1 Rainer Hurling freebsd_committer freebsd_triage 2011-12-19 06:57:27 UTC
> If I put linux_enable="YES" in etc/rc.conf then linux is loaded on boot.  But,
>   cpuctl="YES" or nvidia="YES" do not have similar effects..

For me it is nvidia_load="YES" and cpuctl_load="YES" which works in 
/boot/loader.conf. Could you please try it?

Rainer
Comment 2 Andriy Gapon freebsd_committer freebsd_triage 2011-12-20 18:54:35 UTC
State Changed
From-To: open->closed

Reporter says this was not an issue with FreeBSD boot chain.