Red Hat Bugzilla – Bug 71519
rc.sysinit doesn't let you force fsck repairs (e2fsck -y)
Last modified: 2014-03-16 22:30:01 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"
- 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
- initlog -c "fsck -T -R -A -a $fsckoptions"
+ initlog -c "fsck -T -R -A -a $fsckoptions -- -y"
You can have '-y' in fsckoptions.
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.
Assigning to the installer, then.
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.
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.
At this point, I don't think this is something we'll look at in the installer
Let me add a comment here that I totally agree with firstname.lastname@example.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.