LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-01-2009, 10:44 AM   #1
alpha_lt
Member
 
Registered: Jul 2009
Location: Lithuania
Distribution: Debian testing (laptop), Debian stable (server)
Posts: 91

Rep: Reputation: 15
Question Fsck on ubuntu


Hello all,

I have several question on using fsck on Ubuntu. As I know its not possible to use fsck on mounted system. Booting other system from USB is not an option for me. The best for me is doing fsck on boot time. Questions:
1. Will shutdown -F -r now work on ubuntu. I used man shutdown and did not find -F option, so maybe its not for ubuntu ?
2. How can I set options for fsck which will run on system boot ?
3. Where I can see logs of fsck that run on boot time ?
4. As I know fsck runs every 35 (don't know exactly) boots of system. How can I change this value

I will be very greatful if I get answers to these questions.
Thanks in advance.

Best regards,
alpha
 
Old 11-01-2009, 11:06 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,647

Rep: Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524
1. -F is in Debian, so I have no idea why it wouldn't be found in Ubuntu
4. use tune2fs to change the number of mounts after which your ext3 filesystems will be checked
 
Old 11-01-2009, 11:09 AM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,511

Rep: Reputation: 884Reputation: 884Reputation: 884Reputation: 884Reputation: 884Reputation: 884Reputation: 884
Quote:
1. Will shutdown -F -r now work on ubuntu. I used man shutdown and did not find -F option, so maybe its not for ubuntu ?
It works on debian.
Why don't you try?
Quote:
2. How can I set options for fsck which will run on system boot ?
You can use
Code:
tune2fs -c
or install autofsck
https://wiki.ubuntu.com/AutoFsck
Quote:
3. Where I can see logs of fsck that run on boot time ?
/var/log/fsck/
Quote:
4. As I know fsck runs every 35 (don't know exactly) boots of system. How can I change this value
see #2

Last edited by repo; 11-01-2009 at 11:20 AM.
 
Old 11-01-2009, 12:17 PM   #4
alpha_lt
Member
 
Registered: Jul 2009
Location: Lithuania
Distribution: Debian testing (laptop), Debian stable (server)
Posts: 91

Original Poster
Rep: Reputation: 15
Thank you very much for such detailed answer !

Regards,
alpha
 
Old 12-31-2009, 08:57 AM   #5
alpha_lt
Member
 
Registered: Jul 2009
Location: Lithuania
Distribution: Debian testing (laptop), Debian stable (server)
Posts: 91

Original Poster
Rep: Reputation: 15
Hello,

I want to return little bit to this topic. For example e2fsck runs in boot time, but with what parameters it runs ? I mean normally from command line you use:

Code:
e2fsck [ -pacnyrdfvstDFSV ] [ -b superblock ] [ -B blocksize ] [ -l|-L bad_blocks_file ] [ -C fd ] [ -j external-journal ] [ -E extended_options ] device
What about running at boot time ? What device will be scanned and what scanner options will be used ? Normally question is with what command line will run e2fsck at boot time ? Thanks.
 
Old 12-31-2009, 09:20 AM   #6
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,647

Rep: Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524
If you have the file /etc/init.d/checkfs.sh, you can read it for details. If not, grep for "fsck" in /etc/init.d/* and look at the boot scripts fsck is found in. On my system, the ultimately used command line is
Code:
fsck -C3 -R -A
 
1 members found this post helpful.
Old 12-31-2009, 09:25 AM   #7
alpha_lt
Member
 
Registered: Jul 2009
Location: Lithuania
Distribution: Debian testing (laptop), Debian stable (server)
Posts: 91

Original Poster
Rep: Reputation: 15
That's what I wanted. Thank you very much !
 
  


Reply

Tags
e2fsck, ext3, fsck, tune2fs


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
Set Ubuntu to auto-fsck after crash? ternarybit Linux - Newbie 2 07-13-2009 12:56 PM
I need to know how to run a fsck from my ubuntu livecd benhayman Linux - General 2 03-02-2008 12:23 PM
fsck fails while booting Ubuntu concoran Linux - General 8 02-20-2008 02:17 PM
Problems starting Ubuntu after cloning with Ghost 8.2 (fsck complains) ToniCipriani Linux - Laptop and Netbook 3 10-21-2007 06:38 PM
Running fsck from hdb (Ubuntu) on hda (RH) ? uncle-c Linux - Newbie 2 10-30-2006 04:06 PM


All times are GMT -5. The time now is 01:12 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration