Bug 117641 - Should reboot when a root FS fsck succeeds, but says "Reboot Linux".
Summary: Should reboot when a root FS fsck succeeds, but says "Reboot Linux".
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
: 127347 128117 132346 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2004-03-06 02:18 UTC by Aleksey Nogin
Modified: 2014-03-17 02:43 UTC (History)
4 users (show)

Fixed In Version: 7.91-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-17 04:57:06 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Aleksey Nogin 2004-03-06 02:18:25 UTC
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).


rc.sysinit reboots the machine.


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 16:46:29 UTC
What's the return code of e2fsck in this case?

Comment 2 Aleksey Nogin 2004-03-08 20:42:39 UTC
Here is what the man page says:

       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 21:32:30 UTC
*** Bug 127347 has been marked as a duplicate of this bug. ***

Comment 4 Bill Nottingham 2004-07-20 16:51:41 UTC
*** Bug 128117 has been marked as a duplicate of this bug. ***

Comment 5 Michael McLagan 2004-07-20 17:10:06 UTC
At line 297 of rc.sysinit from initscripts-7.55 
change to:

	elif [ "$rc" = "1" ]; then
	        passed "$STRING"
	elif [ "$rc" = "2" -o "$rc" = "3" ]; then
	        passed "$STRING"

       		echo $"Unmounting file systems"
		umount -a
		mount -n -o remount,ro /
		echo $"Automatic reboot in 
		reboot -f
	elif [ $rc -gt 3 ]; then
	        if [ -x /usr/bin/rhgb-client ] && 
/usr/bin/rhgb-client --ping ; then
		    chvt 1

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

This reboots in the appropriate cases.

Comment 6 Bill Nottingham 2004-09-11 04:25:17 UTC
*** Bug 132346 has been marked as a duplicate of this bug. ***

Comment 7 Bill Nottingham 2004-10-17 04:57:06 UTC
Fixed in 7.91-1.

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