# Need fsck output in log file on boot up.

## dman777

My monitor always power saves so I can not verify if fsck was done on my filesystems on boot up. I have log_buf_len=512K on my grub config line, but I still can't find any output of the fsck in /var/log/messages or dmesg. How do I capture the fsck output upon boot up in a log file?

----------

## Goverp

Are you using an initramfs?  Their startup usually doesn't include a syslog daemon, so there's no logging support until the initramfs' script has finished, switched root, and started your system init.  What I found does work during initramfs' script is to write stuff to /proc/kmsg.  It gets stored and the syslog daemon processes it when it starts, so you could try redirecting fsck output there.  That will obviously require hacking the initramfs startup script.

Of course, if you're not using initramfs, this is all pointless  :Smile: 

----------

## dman777

no, i do not use a initramfs. is using a initramfs the only way? no other options? can i disable the power off on the monitor during bootup then?

----------

## freke

I'm not really into the innings of how a linux-system boots, but on my two system (1x headless PPC, 1x headless x86) I'm using openrc - it creates (or at least can be configured to) a log file - which shows all the services starting and fsck output included, too...

/etc/rc.conf

```
...

# rc_logger launches a logging daemon to log the entire rc process to

# /var/log/rc.log

# NOTE: Linux systems require the devfs service to be started before

# logging can take place and as such cannot log the sysinit runlevel.

rc_logger="YES"

# Through rc_log_path you can specify a custom log file.

# The default value is: /var/log/rc.log

#rc_log_path="/var/log/rc.log"

...

```

/var/log/rc.log

```
rc boot logging started at Sat Nov 24 21:12:41 2012

 * Setting system clock using the hardware clock [UTC] ...

 [ ok ]

 * Autoloaded 0 module(s)

 * Checking local filesystems  ...

/dev/sda1 has gone 379 days without being checked, check forced.

/dev/sda1: |                                                        |  0.6%   /dev/sda1: |=                                                       /  1.2%   /dev/sda1: |=                                                       -  1.9%   /dev/sda1: |=                                                       \  2.5%   /dev/sda1: |==                                                      |  3.1%   /dev/sda1: |==                                                      /  3.8%   /dev/sda1: |==                                                      -  4.4%   /dev/sda1: |===                                                     \  5.0%   /dev/sda1: |===                                                     |  5.6%   /dev/sda1: |====                                                    /  6.2%   /dev/sda1: |====                                                    -  6.9%   /dev/sda1: |====                                                    \  7.5%   /dev/sda1: |=====                                                   |  8.1%   /dev/sda1: |=====                                                   /  8.8%   /dev/sda1: |=====                                                   -  9.4%   /dev/sda1: |======                                                  \ 10.0%   /dev/sda1: |======                                                  | 10.6%   /dev/sda1: |======                                                  / 11.2%   /dev/sda1: |=======                                                 - 11.9%   /dev/sda1: |=======                                                 \ 12.5%   /dev/sda1: |=======                                                 | 13.1%   /dev/sda1: |========                                                / 13.8%   /dev/sda1: |========                                                - 14.4%   /dev/sda1: |========                                                \ 15.0%   /dev/sda1: |=========                                               | 15.6%   /dev/sda1: |=========                                               / 16.2%   /dev/sda1: |=========                                               - 16.9%   /dev/sda1: |==========                                              \ 17.5%   /dev/sda1: |==========                                              | 18.1%   /dev/sda1: |===========                                             / 18.8%   /dev/sda1: |===========                                             - 19.4%   /dev/sda1: |===========                                             \ 20.0%   /dev/sda1: |============                                            | 20.6%   /dev/sda1: |============                                            / 21.2%   /dev/sda1: |============                                            - 21.9%   /dev/sda1: |=============                                           \ 22.5%   /dev/sda1: |=============                                           | 23.1%   /dev/sda1: |=============                  
```

Dunno if that's of any use?

----------

## Hu

The monitor will enter powersave after a period of disuse.  Pressing a key on the keyboard should awaken it, allowing you to read what is shown there.

----------

## Goverp

 *dman777 wrote:*   

> no, i do not use a initramfs. is using a initramfs the only way? no other options? can i disable the power off on the monitor during bootup then?

 

No, using an initramfs would not help.  If you can't see the output, it's some other problem.

----------

