Subject: bin/5119: LKM's in /etc/rc break nfs mounted /usr
To: None <>
From: Charlie Root <>
List: netbsd-bugs
Date: 03/06/1998 03:58:50
>Number:         5119
>Category:       bin
>Synopsis:       LKM's in /etc/rc break nfs mounted /usr
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar  6 03:05:00 1998
>Originator:     Tim Rightnour
Tim Rightnour    -
>Release:        1.3 i386<NetBSD-current source date>
System: NetBSD polaris 1.3 NetBSD 1.3 (POLARIS) #4: Thu Mar 5 06:55:33 MST 1998 root@polaris:/usr/src/sys/arch/i386/compile/POLARIS i386


If you have LKM=yes in /etc/rc.conf and nfs mount your /usr partition.. 
the rc file will hang your system on boot because the network has not yet 
been initialized.

# load kernel modules specified in /etc/lkm.conf if the /usr filesystem
# is already present with "/" or can be mounted now
if checkyesno lkm && [ -f /etc/rc.lkm ]; then
        mount /usr >/dev/null 2>&1
        if [ -x /usr/bin/ld ]; then
                . /etc/rc.lkm
# set hostname, turn on network

the mount of /usr tries to hit nfs.. which cannot happen because the next 
section is what initializes the network devices.


set LKM=yes in /etc/rc.conf and mount /usr over nfs


workaround: set LKM=no

Have a variable like NETBEFORELKM and check that before trying to run the 
lkm stuff. I would create a diff.. but I'm not sure if this solution 
would be acceptable to everyone.  I'm assuming here that some LKM's might 
be necc. in bringing up the network.. which would complicate things much 
further in this situation.
Severity:	serious<[ non-critical | serious | critical ] (one line)>