# /var/log/messages not written to on diskless nodes

## Wizumwalt

My diskless nodes don't seem to be sending messages to /var/log/messages. I am not exporting /var from the master node because the diskless nodes create their own /var dir and are able to write to it just fine. In fact, the diskless nodes have the following contents in /var/log ...

```

-rw-r----- 1 root root  61366 Sep 17 17:12 dmesg

-rw-r--r-- 1 root root 292292 Sep 20 15:38 lastlog

-rw------- 1 root root 142074 Sep 20 15:41 messages

-rw-rw-r-- 1 root utmp   9600 Sep 20 15:38 wtmp

```

The files contents look fine after a boot, and when I log into root on a diskless node, I see the msg when tailing /var/log/messages ... but when I load a kernel module which should write to /var/log/messages (and I've tested this on the master node), I don't see any messages in the diskless nodes /var/log/messages (but I do when running it on the master). So I'm wondering if somehow the linuxrc script given to the init= param is somehow overwriting something on the diskless nodes.

Diskless nodes boot w/ the following parameters ...

```

APPEND ip=dhcp ro rootfstype=nfs root=/dev/nfs nfsroot=10.0.0.10:/diskless/gentoo-ssi init=/linuxrc raid=noautodetect

```

The linuxrc script from the init= param is as follows ...

```

echo "Mount /tmp"

mount -n -t tmpfs tmpfs /tmp

echo "Mount /var"

mount -n -t tmpfs tmpfs /var

mkdir /var/log

mkdir /var/run

mkdir /var/lock

mkdir /var/spool

mkdir /var/state

mkdir /var/tmp

mkdir /var/empty

mkdir -p /var/lib/init.d

mkdir -p /var/lib/nfs/sm

echo "Populating /var"

cd /var

mount -n -t tmpfs tmpfs /var/log

mount -n -t tmpfs tmpfs /var/run

mount -n -t tmpfs tmpfs /var/lock

mount -n -t tmpfs tmpfs /var/lib/init.d

mount -n -t tmpfs tmpfs /var/lib/nfs/sm

mount -n -t tmpfs tmpfs /var/spool

cd /var

tar -c -f - . | tar -C /var -x -f -

echo "Populate /etc"

cd /etc

mount -n -t tmpfs tmpfs /etc

tar -c -f - . | tar -C /etc -x -f -

cd /

# ...

                                                              

exec /sbin/init < /dev/console > /dev/console 2>&1

```

Any help much appreciated.Last edited by Wizumwalt on Mon Sep 20, 2010 7:25 pm; edited 2 times in total

----------

## dmpogo

What program for syslog are you using ?Last edited by dmpogo on Mon Sep 20, 2010 5:05 pm; edited 1 time in total

----------

## Wizumwalt

This will sound stupid, but ... can you help me out w/ "what program"? I don't think I get your question.

----------

## dmpogo

 *Wizumwalt wrote:*   

> This will sound stupid, but ... can you help me out w/ "what program"? I don't think I get your question.

 

There is some daemon running that logs the system messages, probably called syslogd.    It can be either from syslog-ng or sysklogd package.   Where what is written is determined by configuration files of this daemon.

----------

## Wizumwalt

Yeah, it's syslog-ng. I compare the syslog processes running on the diskless node that are running on the master node, they are the same.

```

~# ps -ef | grep syslog

root      2766     1  0 Sep17 ?        00:00:00 supervising syslog-ng

root      2767  2766  0 Sep17 ?        00:00:00 /usr/sbin/syslog-ng

root      8957  8827  0 17:12 pts/0    00:00:00 grep syslog

```

app-admin/syslog-ng is installed in the diskless image.

Still can't see why this isn't working.

----------

