LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 04-18-2004, 05:44 AM   #1
BFG-rat
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, 06:45 AM   #2
hw-tph
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.


Håkan
 
Old 04-18-2004, 06:54 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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.
 
  


Reply



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 10:45 AM
how to skip fsck at boot time? ItsNotMe SUSE / openSUSE 4 04-28-2005 05:31 AM
automatic fsck on boot. fsck errors. nixel Slackware 1 05-17-2004 07:51 AM
Stop boot script at boot time!! kmiles2 Linux - Newbie 1 02-23-2004 10:04 PM
How Do I Have a script started at boot time? Chijtska Linux - General 12 03-18-2002 05:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:41 PM.

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