Fedora Linux Support Community & Resources Center
  #1  
Old 13th June 2012, 12:35 AM
manuel19 Offline
Registered User
 
Join Date: Jun 2012
Location: Florida
Posts: 22
linuxfirefox
Question about fdisk and Linux system errors

Hello!
I installed Linux Fedora Core 8 (Werewolf), the server is a firewall, we know that Linux mostly by default checked every 30 mounts, if the system contains errors, etc, etc ... As I can do to make my client ever turn on the Linux server, the system check BUT in turn, the same system is repaired automatically without typing anything in the console?

The only one I have for now is, edit the file: /etc/rc.d/rc.sysinit and there, add at the begining of the file this lines:

/sbin/fsck -y
/sbin/fsck -y
/sbin/fsck -y


I repeat the same like to be sure that it check the system for errors....
BUT... I'm doing right? I mean... this is the solution you will recommend?
Reply With Quote
  #2  
Old 13th June 2012, 12:54 AM
sea Offline
"Shells" (of a sub world)
 
Join Date: May 2011
Location: Confoederatio Helvetica (Swissh)
Age: 34
Posts: 3,278
linuxfirefox
Re: Question about fdisk and Linux system errors

The way you posted, it executes 3 times the check, each boot occouring...
I wouldnt suggest to do it this way.

But more the like:
Code:
tmp=/boot/mount-count
counter=$(cat $tmp)
if [ "$counter" = 23 ]
then    /sbin/fsck -y && counter=0 || counter=22
fi
counter=$[ $counter + 1 ]
echo $counter > $tmp
__________________
Laptop: Toshiba satellite p50-a-11 CPU: Intel i7 8*2400 MHz GPU: GeForce GT 745M RAM: 8192 MB Distro: Fedora (Rawhide) DE: Awesome
Text User Interface (TUI) // Windows 8+ & Fedora 20+ Dualboot
Reply With Quote
  #3  
Old 13th June 2012, 01:41 AM
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,720
linuxfirefox
Re: Question about fdisk and Linux system errors

On ext2/3/4 you can
sudo dumpe2fs -h /dev/sda1

and these twp parameters describe the mount count since last fsck, and the number of mounts before a fsck is forced,

Mount count: 10
Maximum mount count: -1
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
  #4  
Old 13th June 2012, 03:51 PM
manuel19 Offline
Registered User
 
Join Date: Jun 2012
Location: Florida
Posts: 22
windows_xp_2003chrome
Re: Question about fdisk and Linux system errors

I just want to know, if running

/sbin/fsck -y

after the system BOOT, that will make my system BOOT always CLEAN, without any issues/errors/problems...?
Reply With Quote
  #5  
Old 14th June 2012, 02:09 PM
manuel19 Offline
Registered User
 
Join Date: Jun 2012
Location: Florida
Posts: 22
windows_98_nt_2000ie
Re: Question about fdisk and Linux system errors

Can someone tell me?
Reply With Quote
Reply

Tags
errors, fdisk, linux, question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Very quick question! RE Linux File System tizwoz Installation, Upgrades and Live Media 1 5th November 2006 09:09 PM
fdisk command question satimis Using Fedora 2 4th August 2006 01:18 PM
Linux equivalents to fdisk /mbr ? tashirosgt Using Fedora 7 21st September 2004 10:16 PM


Current GMT-time: 07:48 (Friday, 01-08-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat