Bug 71519 - rc.sysinit doesn't let you force fsck repairs (e2fsck -y)
rc.sysinit doesn't let you force fsck repairs (e2fsck -y)
Product: Red Hat Linux
Classification: Retired
Component: anaconda (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Bill Nottingham
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2002-08-14 14:09 EDT by Marc MERLIN
Modified: 2014-03-16 22:30 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-01-14 12:58:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Marc MERLIN 2002-08-14 14:09:42 EDT
This has been one of my biggest pet peeves with RH since version 2.1: it just
hangs and drops to a prompt if e2fsck finds a non obvious problem.
Yes, it's less likely with ext3, but trust me, it happens there too.

Back when RH was a workstation distribution, that was ok, the user was in front
of the machine, but you can't install this on a server if your server drops to
a prompt in your COLO at 03:00

Yes, I know, some people will prefer to have their server not boot than have
e2fsck fix whatever it can, but let's face it, most other people want their
machine back up, even with some minor corruption (hopefully I'll be able to log
in and fix the problem).
RH should offer to set an unconditional e2fsck repair (if Ted's tool doesn't
know how to fix my filesytem, I probably won't do better by hand), and it should
save the e2fsck output and send it to syslog, Email root, or something.

Seriously, dropping to a prompt at boot time gives linux a really bad name.
Since most everyone has now be conditionned to think that linux = red hat,
please fix this. 

In the meantime, I have yet again hardcoded this on the system I had to admin:
(actually, I had something better that captured the output and Emailed root with
a special notice and the result if fsck fixed any files, but that was for RH 5.2
and I switched to debian for my servers after that)

--- /etc/rc.d/rc.sysinit.redhat Tue Aug 13 18:00:32 2002
+++ rc.sysinit.local    Wed Aug 14 10:27:28 2002
@@ -261,7 +261,7 @@

         STRING=$"Checking root filesystem"
        echo $STRING
-       initlog -c "fsck -T -a $fsckoptions /"
+       initlog -c "fsck -T -a $fsckoptions / -- -y"

        if [ "$rc" = "0" ]; then
@@ -505,7 +505,7 @@
 if [ -z "$fastboot" ]; then
         STRING=$"Checking filesystems"
        echo $STRING
-       initlog -c "fsck -T -R -A -a $fsckoptions"
+       initlog -c "fsck -T -R -A -a $fsckoptions -- -y"
Comment 1 Bill Nottingham 2003-01-14 01:03:03 EST
You can have '-y' in fsckoptions.
Comment 2 Marc MERLIN 2003-01-14 01:33:08 EST
If you want RH to be sold as a server OS, can't you make this an install option
(which honestly should be on by default for server installs IMO)?
I know how to fix this, whether it's in fsckoptions, or directly in rc.sysinit,
but when a system doesn't reboot because of fsck, you get blamed, and then people
say Linux is unreliable...

Please, consider making this an option that can be configured easily at install
time and/or with your graphical admin tools.

Comment 3 Bill Nottingham 2003-01-14 01:40:00 EST
Assigning to the installer, then.
Comment 4 Michael Fulbright 2003-01-14 12:41:12 EST
I'm not sure what is being requested here.  If the distribution architecture
deems we need this feature added we can look at it. I personally cannot decide
if this is the desired behavior.
Comment 5 Marc MERLIN 2003-01-14 12:49:01 EST

The request is to make the installer and/or the config tools have an option to
force fscks, so that servers reboot by themselves and that you don't get presented 
with an fsck prompt after an unclean shutdown (which is useless for a server in
a colo without serial console).

I would also argue that e2fsck -y should be a default, but at least making it an
option would be a good thing already.
Comment 6 Bill Nottingham 2003-01-14 12:58:46 EST
At this point, I don't think this is something we'll look at in the installer
Comment 7 David Garamond 2003-10-06 00:26:57 EDT
Let me add a comment here that I totally agree with marc_soft@merlins.org. This 
is what used to bite me in the past and what I hate about Redhat's startup 
process. True, dropping to a prompt might be useful for an expert user. But I 
reckon 99% of the time users will run fsck -y anyway. The default behaviour 
should be -y (/fsckoptions should be set to that in default), and if an expert 
desires otherwise, he can edit /fsckoptions.

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