Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-18-2004, 06:44 AM   #1
LQ Newbie
Registered: Apr 2004
Location: Planet Earth
Distribution: LFS Linux
Posts: 1

Rep: Reputation: 0
A good boot-time FSCK script?

I've installed LFS Linux lately and everything is great... Except the boot-time fsck script. Basically that script assumes there's someone there to push enter any time something goes wrong. I do remote administration a lot and it's not good for me to have servers hang on reboot because a "failed fsck" alert appears on the screen and requires a keystroke to continue booting.

I've fleshed out some requirements I have for a good boot-time fsck script. I'm wondering if anyone here has seen anything that comes close the the following:

*Boot script (or fsck portion of boot script) will not require a keystroke to continue under any circumstances.
*Successful boot up is top priority. No condition (including failed fsck) will prevent system from at least trying to mount / and boot.
*Errors running fsck will be logged or perhaps mailed to root.

Any ideas folks? Thanks in advance.

-The rat
Old 04-18-2004, 07:45 AM   #2
Senior Member
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
Depending on what filesystems you use you will have different options for the fscking tool for that specific filesystem. e2fsck for ext2fs for instance supports the -p ("preen") that will automatically repair the filesystem without asking any questions. This flag is considered safe, and the -a flag supported by some other fsck tools and which does basically the same thing, is *not* considered safe. You may want to read up on the man pages for the fscking tools you want to use.

Old 04-18-2004, 07:54 AM   #3
LQ Veteran
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392
This is probably not what you wanted to hear/read, but there's a reason why fsck behaves this way.

Even if the -a -A (-p -A) options are set (they probably are), fsck will ask you to make choices if it's 'confused'. The use of the -a (-p) options is regarded as 'dangerous', although just about every distro uses it.

If your system gets to the point where it cannot repair the fs by itself, it's not a good idea to ignore this and (try to) mount partions. Depending on the errors that surfaced, you will have a very unstable (disk)situation on your hands and (unrepairable) errors may be the result. Worst case: 1 (or more) partitions become unusable.

If you still want to walk this path, take a look at the fsck script and reprogram the part that handles the errorhandling (please don't...... )

Hope this helps.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
fsck failure at boot time - hda mounted twice Steve2001 Linux - General 1 07-30-2005 11:45 AM
how to skip fsck at boot time? ItsNotMe SUSE / openSUSE 4 04-28-2005 06:31 AM
automatic fsck on boot. fsck errors. nixel Slackware 1 05-17-2004 08:51 AM
Stop boot script at boot time!! kmiles2 Linux - Newbie 1 02-23-2004 11:04 PM
How Do I Have a script started at boot time? Chijtska Linux - General 12 03-18-2002 06:41 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:56 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration