Author Topic: initializing /var/log  (Read 1460 times)

RayPlante

  • Newbie
  • *
  • Posts: 3
    • View Profile
initializing /var/log
« on: April 01, 2013, 07:56:19 AM »
I see that /var/log is mounted as a tmpfs filesystem which causes its contents to be lost when the platform shuts down.  I would like to move it to the non-volatile part of / to preserve logs.  Any tips to point me in the right direction?  In particular, where in the init process is /var/log set up on the tmpfs?

I consider myself fairly savvy with Linux; however, I haven't kept up with the evolution of Ubuntu and init (e.g. I went looking for /etc/inittab but it looks like it's been replaced  by /etc/init/). 

jnetman1

  • Administrator
  • Hero Member
  • *****
  • Posts: 286
    • View Profile
Re: initializing /var/log
« Reply #1 on: April 02, 2013, 10:11:58 AM »
Right now this is baked into the aufs-root mount intentionally, as we are setting up with a limited amount of space for users to make changes in and don't want to eat it up with logs over time. If you are troubleshooting and need logs to be persistent, you can always boot in generic mode (see http://ubermix.org/customization.html for instructions), which leaves the mounts in a relatively stock state (ie /var/log is written to the disk). You could also set the machine to boot in generic mode permanently by editing /boot/grub/grub.cfg. Of course, this defeats much of the reset functionality.

I initially tried to make the tmpfs mounts part of a more standard fstab, but found that mountall was too unreliable with an aufs-root and would hang on tmpfs mounts.