Find the answer to your Linux question:
Results 1 to 4 of 4
Hello, I have some RH7.x systems w/ ext2 filesystems (that cannot be upgraded/changed) that I'd like to hookup to an APC remote power switch so I can reboot them from ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005
    Posts
    4

    How to make it so fsck doesn't fail?


    Hello,

    I have some RH7.x systems w/ ext2 filesystems (that cannot be upgraded/changed) that I'd like to hookup to an APC remote power switch so I can reboot them from afar when they crash.

    The issue at hand is the fsck. Upon reboot, they go into the fsck and often fail with this:

    *** An error occurred during the file system check."
    *** Dropping you to a shell; the system will reboot"
    *** when you leave the shell."

    This forces me into single user mode where I e2fsck everything. The question is how can I modify the startup scripts so that the fsck will complete automatically.

    In rc.sysinit, can I change line 264 from:

    initlog -c "fsck -T -a $fsckoptions /"

    to:

    initlog -c "e2fsck -y /"

    Is this safe? I just want the fsck to fix all errors regardless and chug through so the box boots up normally. The -a option should do that I thought but doesn't.

    Any ideas?

    Thanks!

    - Roger

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    well running fsck on a mounted filesystem = very dangerous.
    try this:
    Code:
     initlog -c "e2fsck -y /dev/hda1"
    or whatever your hdd/partition is
    -lakerdonald

  3. #3
    Just Joined!
    Join Date
    Jan 2005
    Posts
    4
    I'm going to try changing it to:

    Code:
    initlog -c "fsck -T -p $fsckoptions /"
    This should do it...

  4. #4
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    Okay. I still think that could be dangerous, but whatever

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •