Bug 128117 - Improperly handles FSCK result
Improperly handles FSCK result
Status: CLOSED DUPLICATE of bug 117641
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
2
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-07-18 14:09 EDT by Michael McLagan
Modified: 2014-03-16 22:46 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 14:04:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael McLagan 2004-07-18 14:09:53 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4)
Gecko/20030624 Netscape/7.1

Description of problem:
When the initial fsck is run and the result is some minor fixes are
performed, the return code is 2 or 3.  In these cases, fsck is
suggesting a reboot of the system.

This should be handled automatically by the script.  It should follow
the path to automatically rebooting the system, not hang waiting for
user input.

Version-Release number of selected component (if applicable):
initscripts-7.55.1-1

How reproducible:
Always

Steps to Reproduce:
1. create a minor file system error (dtime != 0)
2. reboot
3. wait for fsck to finish, it reports:

   *** REBOOT LINUX ***

4. System prompts for root password or Ctrl-D to restart.
    

Actual Results:  System waits for user input without completing boot
process.

Remote servers can't be restarted without someone there to monitor
them in case something like this pops up.

Expected Results:  System should reboot automatically, as requested by
the fsck return code.

Additional info:

Something like this:

if [ -z "$fastboot" -a "X$ROOTFSTYPE" != "Xnfs" ]; then 

        STRING=$"Checking root filesystem"
	echo $STRING

	initlog -c "fsck -T -a $fsckoptions /"
	rc=$?
	
	if [ "$rc" = "0" ]; then
		success "$STRING"
		echo
	elif [ "$rc" = "1" ]; then
	        passed "$STRING"
		echo
	elif [ "$rc" = "2" -o "$rc" = "3" ]; then
	        passed "$STRING"

       		echo $"Unmounting file systems"
		umount -a
		mount -n -o remount,ro /
		echo $"Automatic reboot in progress."
		reboot -f
	fi
	
        # A return of 4 or higher means there were serious problems.
	if [ $rc -gt 3 ]; then
	        if [ "$BOOTUP" = "graphical" ]; then
		    chvt 1
		fi

... etc

This needs to be implemented in two places in the rc.sysinit script.
Comment 1 Bill Nottingham 2004-07-20 12:51:39 EDT

*** This bug has been marked as a duplicate of 117641 ***
Comment 2 Red Hat Bugzilla 2006-02-21 14:04:29 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.