Find the answer to your Linux question:
Results 1 to 4 of 4
Hello, I have a problem with switching off my embedded Gentoo machine. Conditions in which my Gentoo machine works are such that I very often need to turn it off ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2011
    Posts
    2

    problem with saving log files in Gentoo embedded


    Hello,

    I have a problem with switching off my embedded Gentoo machine. Conditions in which my Gentoo machine works are such that I very often need to turn it off immediately on switch button, without setting turn off from PC previously. It causes a lot of problems with my filesystem. After booting machine again there is a lot of 'failed' situations and everything is messed up!

    I don't know how to handle this!

    I think that problem is with saving log files. Could I manage that Gentoo doesn't save log files any more?

    Any suggestions?

    Thank you!
    Miroslav

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,440
    If it is *just* logfiles, then you could configure syslog.conf to send it to <somehwere>.

    But I somehow doubt it (pidfiles, tempfiles, working directories etc)
    What might help is to choose ramdisks for directories, that need to be written to *and* can easily be lost on a poweroff.
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    May 2011
    Posts
    2
    Thank you very much!

    I edited /etc/rsyslog.conf, and I think that I managed to send log files to ram disk (I replace /var/log with /tmp2 directory that I previously create and mount to ram).
    I noticed that there is no new records in /var/log.

    How could I manage pidfiles, tempfiles to be sent to ram?

    There are still errors like:

    EXT2-fs error (device hdb1): ext2_lookup: deleted inode referenced: 855

    when I boot up Gentoo machine!

  4. $spacer_open
    $spacer_close
  5. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,440
    I meant:
    Send the logs to another machine.

    Otherwise they will fill your ramdisk quite quickly, especially on a embedded device


    For the other files:
    Look for the exact locations. Probably /var/tmp /var/lock etc
    And mount these to ramdisk(s)

    It might make sense to verify each application, cronjob and daemon you intend to run
    and search for possible write locations.
    On a embedded system, the number of such processes should be pretty low.

    In theory, each mountpoint except the ramdisk(s) should be readonly.
    You must always face the curtain with a bow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •