Bug 117641 - Should reboot when a root FS fsck succeeds, but says "Reboot Linux".
Should reboot when a root FS fsck succeeds, but says "Reboot Linux".
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
: 127347 128117 132346 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-03-05 21:18 EST by Aleksey Nogin
Modified: 2014-03-16 22:43 EDT (History)
4 users (show)

See Also:
Fixed In Version: 7.91-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-17 00:57:06 EDT
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 Aleksey Nogin 2004-03-05 21:18:25 EST
To reproduce: 

1) Create a situation where on boot a fsck of / succeeds in restoring
the filesystem, but changes it enough to issue the "Reboot LINUX"
message. (You might need to use ext2 for / in order for this to happen).

Expected/desired:

rc.sysinit reboots the machine.

Actual:

rc.sysinit goes to "An error occurred during the file system check.
Dropping you to a shell; ..." routine.

This is especially unpleasant if the reboot is unattended.

Component versions:

I am seeing this with initscripts-7.46-1.1 and e2fsprogs-1.35-6.1 on
an AMD Opteron.
Comment 1 Bill Nottingham 2004-03-08 11:46:29 EST
What's the return code of e2fsck in this case?
Comment 2 Aleksey Nogin 2004-03-08 15:42:39 EST
Here is what the man page says:

EXIT CODE
       The  exit  code  returned  by e2fsck is the sum of the
following conditions:
            0    - No errors
            1    - File system errors corrected
            2    - File system errors corrected, system should
                   be rebooted
            4    - File system errors left uncorrected
            8    - Operational error
            16   - Usage or syntax error
            32   - E2fsck canceled by user request
            128  - Shared library error
Comment 3 Bill Nottingham 2004-07-06 17:32:30 EDT
*** Bug 127347 has been marked as a duplicate of this bug. ***
Comment 4 Bill Nottingham 2004-07-20 12:51:41 EDT
*** Bug 128117 has been marked as a duplicate of this bug. ***
Comment 5 Michael McLagan 2004-07-20 13:10:06 EDT
At line 297 of rc.sysinit from initscripts-7.55 
change to:

	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
	elif [ $rc -gt 3 ]; then
	        if [ -x /usr/bin/rhgb-client ] && 
/usr/bin/rhgb-client --ping ; then
		    chvt 1
		fi

Also add the above at line 577 of the modified file.

This reboots in the appropriate cases.
Comment 6 Bill Nottingham 2004-09-11 00:25:17 EDT
*** Bug 132346 has been marked as a duplicate of this bug. ***
Comment 7 Bill Nottingham 2004-10-17 00:57:06 EDT
Fixed in 7.91-1.

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