LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Fsck on ubuntu (https://www.linuxquestions.org/questions/linux-newbie-8/fsck-on-ubuntu-766017/)

alpha_lt 11-01-2009 10:44 AM

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

AlucardZero 11-01-2009 11:06 AM

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

repo 11-01-2009 11:09 AM

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

alpha_lt 11-01-2009 12:17 PM

Thank you very much for such detailed answer !

Regards,
alpha

alpha_lt 12-31-2009 08:57 AM

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.

AlucardZero 12-31-2009 09:20 AM

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

alpha_lt 12-31-2009 09:25 AM

That's what I wanted. Thank you very much !


All times are GMT -5. The time now is 04:33 PM.