Subject: misc/29822: [dM] interrupting fsck doesn't go single-user
To: None <misc-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: netbsd-bugs
Date: 03/29/2005 07:45:00
>Number:         29822
>Category:       misc
>Synopsis:       interrupting fsck doesn't go single-user
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 29 07:45:00 +0000 2005
>Originator:     der Mouse
>Release:        NetBSD 2.0
>Organization:
	Dis-
>Environment:
	Seen on NetBSD/sparc with sd disk and NetBSD/i386 with wd disk;
	I see no reason at this point to think it has any
	hardware-specific aspect.  Both were fairly vanilla 2.0
	installs (eg no non-stock rc.d files).  I can provide the
	rc.conf from the SPARC system on request; the i386 system
	likewise, but it may take longer (it I have less direct access
	to).
>Description:
	When the boot scripts run fsck, interrupting the fsck with ^C
	should drop to single-user mode, but doesn't.  For example
	(this cut-and-pasted from a deliberate example on the SPARC
	machine mentioned above, which uses serial console):

	swapctl: adding /dev/sd0b as swap device at priority 0
	Starting file system checks:
	^C/dev/sd0e: file system not clean (fs_clean=4); please fsck(8)
	/dev/sd0e: lost blocks 0 files 0
	/dev/sd0a: file system not clean (fs_clean=4); please fsck(8)
	/dev/sd0a: lost blocks 0 files 0
	Setting tty flags.

	Note that when I interrupted the fsck, it went ahead and
	mounted the filesystems read/write anyway, then proceeded with
	the usual next boot-time action.

>How-To-Repeat:
	Add -f to fsck_flags in rc.conf and reboot; or, deliberately
	provoke a dirty filesystem (eg, power off without halting) and
	reboot.  In either case, then ^C the fsck and watch.

>Fix:
	Looking at rc.d/fsck, I suspect $autoboot is getting set wrong,
	but even that is pure speculation.  If this is not reproducible
	elsewhere, I may be able to provide remote serial console
	access to the SPARC, or even do some debugging on it myself.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B