Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Oct 2000 10:59:19 +0600 (YEKST)
From:      anton@urc.ac.ru
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   misc/21904: Fix for diskless startup bug in /etc/rc
Message-ID:  <200010110459.e9B4xJG82752@belle.rnoc.urc.ac.ru>

next in thread | raw e-mail | index | archive | help

>Number:         21904
>Category:       misc
>Synopsis:       Fix for diskless startup bug in /etc/rc
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 10 22:10:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Anton Voronin
>Release:        FreeBSD 4.1-STABLE i386
>Organization:
Southern Ural State University, Chelyabinsk, Russia
>Environment:

	i386 workstations boot FreeBSD 4.1-STABLE remotely from the server with
	the same OS using rc.diskless* scripts. / and /usr are monted from
	the server (actually the server's / and /usr), /etc and /var are
	mounted by rc.diskless2. /tmp and swap are mounted from local disks.

>Description:

	/etc/rc checks $1 against "autoboot" after it runs /etc/rc.diskless1.
	But as the latter uses "set" command, it clears the command line, and
	so /etc/rc fails to check for autoboot mode, so it doesn't run fsck,
	and so fails to mount local filesystems (/tmp in my case).

>How-To-Repeat:

	Ensure you have /etc/rc.diskless* on the file server, boot
	FreeBSD 4.1-STABLE remotely from this server, and specify some
	locally mounted filesystems in /etc/fstab (ensure you have "1" in
	the 6th column for these filesystems. Then do a "dirty" reboot
	of the remote-booting machine (with reset button), and watch the
	booting process: instead of running fsck it prints "Skipping disk
	checks...", and then fails to mount local filesystems because they
	are still not clean.

>Fix:

--- rc.old	Fri Sep  8 12:16:20 2000
+++ rc	Wed Oct 11 10:34:09 2000
@@ -20,6 +20,7 @@
 trap : 2
 trap : 3	# shouldn't be needed
 
+bootmode=$1
 HOME=/
 PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
 export HOME PATH
@@ -57,7 +58,7 @@
 
 swapon -a
 
-case $1 in
+case ${bootmode} in
 autoboot)
 	echo Automatic boot in progress...
 	fsck -p


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200010110459.e9B4xJG82752>