Solved

How to bypass manual fsck at startup?

Posted on 2002-03-09
7
1,542 Views
Last Modified: 2008-01-09

Dear Experts,

When electiricty goes off on my linux box, it usually needs manual intervention to run fsck at startup once electricity is back up.

If there is a way, how can I make it boot normally everytime without running fsck manually and requiring the root password to do so?  My problem is that I am not always available when such a thing happens and I would like to linux to start back up as normally as possible in case of electricity outage and restoration so that it provides the necessary routing and Internet connectivity it is supposed to serve.

Many thanks in advance for your help and experience.
0
Comment
Question by:u1
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 3

Expert Comment

by:tdaoud
Comment Utility

One thing you can try is to

touch /etc/fastboot

Having that file there will make it bypass fsck checking at startup.

Tarik
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
if the system goes down unexpected/unattened, the filesystem is corrupted, or as fsck says: dirty.

You need to run fsck, otherwise you will loose data, probably not what you want.

To prewent data loss, I can think of following solutions:
  1. use a journaling filesystem, like ext3, reiserfs, xfs, etc.
  2. run a cron which periodicala (every minute) syncs the disks using the sync command
     (but this will not always prewent fsck)

0
 

Author Comment

by:u1
Comment Utility

ahoffmann,

ofcourse I don't like to loose data, but soemtimes not interrupting the service is very important.  My linux box is mainly for routing and web server.

I have redhat 7.1 and will be upgrading to redhat 7.2 soon when I get the time.

I have been reading about the new journaling filesystem like ext3.

My question is can you convert an existing ext2 partition to ext3 or you would need to create new ones and copy data from one to another and so forth?
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 3

Accepted Solution

by:
tdaoud earned 200 total points
Comment Utility

If you'd like to upgrade to redhat 7.2 I suggest that you format a new hard disk with ext3 from scratch, it maybe a good way to upgrade and start using ext3.

Otherwise you can upgrade to redhat 7.2 then you need to create the journal file on each partition/filesystem using the command tune2fs (this can be done on mounted or unmounted filesystems).  Example of the command

tune2fs -j /dec/hdxx

Then you simply need to change the filesystem type in the /etc/fstab file from ext2 to ext3.

The good thing about ext3 is its compatiblity with ext2 and the ability to switch between both types at any time. Even old kernels see ext3 filesystems as ext2 and access it as normal as a simple ext2 filesystem.

Hope this helps

Tarik
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
tdaoud said it all about ext3 :)
0
 
LVL 4

Expert Comment

by:newmang
Comment Utility
Slightly off-topic but have you considered a small UPS equipped with software to gracefully shut down your system in the event of a power failure?
0
 

Author Comment

by:u1
Comment Utility

Actually I do have an old UPS that has no serial/software conection to linux.  I was already thinking toward that direction too.  But sometimes (it happened twice) we get electricity problems that even put the UPS out instantly.

I will be using tdaoud's /etc/fastboot suggestion until I upgrade to redhat 7.2 and use ext3.

Thanks for all your suggestions.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

After running Ubuntu some time, you will be asked to download updates for fixing bugs and security updates. All the packages you download replace the previous ones, except for the kernel, also called "linux-image". This is due to the fact that w…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now