Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
problems with openrc
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
saturnus
n00b
n00b


Joined: 19 Nov 2011
Posts: 5

PostPosted: Sat Nov 19, 2011 3:27 pm    Post subject: problems with openrc Reply with quote

Hi,

I keep getting the following messages at boot-up:

error: fopen (/var/log/messages) failed read-only filesystem

warning: temporary log file left behind /lib/rc/init.d/rc.log

What does it mean and how do I solve the problem

Regards,

Saturnus :)
_________________
Saturnus
Back to top
View user's profile Send private message
derk
Apprentice
Apprentice


Joined: 10 Mar 2003
Posts: 245
Location: St Thomas Ontario

PostPosted: Sat Nov 19, 2011 6:54 pm    Post subject: Reply with quote

looks like your /var/log directory is on a partition that is mounted read only .. check your fstab settings .. or you have incorrect directory permissions .. change them to allow root to write
Back to top
View user's profile Send private message
saturnus
n00b
n00b


Joined: 19 Nov 2011
Posts: 5

PostPosted: Sat Nov 19, 2011 10:07 pm    Post subject: Reply with quote

Hi again,
These are my fstab settings
# <fs> <mountpoint> <type> <opts> <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda1 /boot ext2 defaults,noatime 1 2
/dev/sda2 none swap sw 0 0
/dev/sda3 / ext3 noatime 0 1
/dev/sda4 /home ext3 noatime 0 1
/dev/cdrom /mnt/cdrom auto noauto,user 0 0
/dev/fd0 /mnt/floppy auto noauto,user 0 0
proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0

and these are my permissions:

klas@localhost / $ cd /var
klas@localhost /var $ ls -l
total 40
drwxr-xr-x 10 root root 4096 Sep 14 22:38 cache
drwxr-xr-x 4 root root 4096 Oct 31 18:19 db
drwxr-xr-x 3 root root 4096 Sep 16 18:53 empty
drwxr-xr-x 27 root root 4096 Sep 18 08:35 lib
drwxr-xr-x 2 root uucp 4096 Aug 30 17:04 lock
drwxr-xr-x 8 root root 4096 Nov 19 22:53 log
lrwxrwxrwx 1 root root 15 Sep 6 22:00 mail -> /var/spool/mail
drwxr-xr-x 18 root root 4096 Nov 19 22:53 run
drwxr-xr-x 6 root root 4096 Sep 14 22:38 spool
drwxrwxrwt 9 root root 4096 Nov 19 16:33 tmp
drwxr-xr-x 3 root root 4096 Sep 8 23:25 www
klas@localhost /var $ cd log
klas@localhost /var/log $ ls -l
total 12384
drwxr-xr-x 2 root root 4096 Sep 11 00:00 ConsoleKit
-rw-r--r-- 1 root root 17221 Nov 19 22:53 Xorg.0.log
-rw-r--r-- 1 root root 17717 Nov 19 19:43 Xorg.0.log.old
drwxr-xr-x 2 root root 4096 Sep 9 00:17 cups
-rw-r----- 1 root root 30810 Nov 19 22:53 dmesg
-rw-rw---- 1 portage portage 4457 Oct 31 17:58 emerge-fetch.log
-rw-rw---- 1 portage portage 1165806 Oct 31 18:15 emerge.log
-rw-r--r-- 1 root root 371521 Sep 24 00:18 genkernel.log
-rw-r--r-- 1 root root 72792 Nov 19 22:53 kdm.log
-rw-r--r-- 1 root root 292876 Nov 19 22:53 lastlog
-rw------- 1 root root 7554824 Nov 19 23:03 messages
drwxr-xr-x 2 mysql mysql 4096 Sep 17 23:18 mysql
-rw-r--r-- 1 root root 189441 Nov 19 22:53 pm-powersave.log
drwxrws--- 3 portage portage 4096 Aug 30 18:01 portage
-rw-r--r-- 1 root root 0 Sep 17 16:38 prelink.log
-rw-r--r-- 1 root root 1044836 Nov 19 22:53 rc.log
-rw-r--r-- 1 root root 250802 Sep 18 18:14 rc_gammal.log
drwxr-xr-x 2 root root 4096 Sep 14 22:38 samba
drwxrwx--- 2 root portage 4096 Sep 21 21:21 sandbox
-rw------- 1 root root 64128 Nov 19 14:03 tallylog
-rw-rw-r-- 1 root utmp 1822080 Nov 19 22:57 wtmp
klas@localhost /var/log $

seems like root have permissions. Any idea?
_________________
Saturnus
Back to top
View user's profile Send private message
derk
Apprentice
Apprentice


Joined: 10 Mar 2003
Posts: 245
Location: St Thomas Ontario

PostPosted: Sat Nov 19, 2011 10:21 pm    Post subject: Reply with quote

lets see how stuff is currently mounted

cat /etc/mtab
Back to top
View user's profile Send private message
saturnus
n00b
n00b


Joined: 19 Nov 2011
Posts: 5

PostPosted: Sat Nov 19, 2011 10:24 pm    Post subject: Reply with quote

Here it is /etc/mtab:

rootfs / rootfs rw 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
udev /dev tmpfs rw,nosuid,relatime,size=10240k,mode=755 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620 0 0
/dev/sda3 / ext3 rw,noatime,commit=0 0 0
rc-svcdir /lib/rc/init.d tmpfs rw,nosuid,nodev,noexec,relatime,size=1024k,mode=755 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime 0 0
/dev/sda1 /boot ext2 rw,noatime 0 0
/dev/sda4 /home ext3 rw,noatime,commit=0 0 0
usbfs /proc/bus/usb usbfs rw,noexec,nosuid,devmode=0664,devgid=85 0 0
_________________
Saturnus
Back to top
View user's profile Send private message
derk
Apprentice
Apprentice


Joined: 10 Mar 2003
Posts: 245
Location: St Thomas Ontario

PostPosted: Sat Nov 19, 2011 11:11 pm    Post subject: Reply with quote

I just realized that /var/log/messages is the standard name used by the system loggers.. not a directory .. did you change the default log file name in /etc/rc.conf ? maybe there is an error in your choice of name
Back to top
View user's profile Send private message
saturnus
n00b
n00b


Joined: 19 Nov 2011
Posts: 5

PostPosted: Sat Nov 19, 2011 11:34 pm    Post subject: Reply with quote

Hello again,

yes I did. First I did some settings (maybe they are not right?) and then I got these messages. I also removed rc.log and as a result a new rc.log file was created.
Thank you for taking your time with this problem.

These are my settings in rc.conf:

# Global OpenRC configuration settings

# Set to "YES" if you want the rc system to try and start services
# in parallel for a slight speed improvement. When running in parallel we
# prefix the service output with its name as the output will get
# jumbled up.
# WARNING: whilst we have improved parallel, it can still potentially lock
# the boot process. Don't file bugs about this unless you can supply
# patches that fix it without breaking other things!
rc_parallel="YES"

# Set rc_interactive to "YES" and you'll be able to press the I key during
# boot so you can choose to start specific services. Set to "NO" to disable
# this feature. This feature is automatically disabled if rc_parallel is
# set to YES.
#rc_interactive="YES"

# If we need to drop to a shell, you can specify it here.
# If not specified we use $SHELL, otherwise the one specified in /etc/passwd,
# otherwise /bin/sh
# Linux users could specify /sbin/sulogin
rc_shell=/sbin/sulogin

# Do we allow any started service in the runlevel to satisfy the dependency
# or do we want all of them regardless of state? For example, if net.eth0
# and net.eth1 are in the default runlevel then with rc_depend_strict="NO"
# both will be started, but services that depend on 'net' will work if either
# one comes up. With rc_depend_strict="YES" we would require them both to
# come up.
#rc_depend_strict="YES"
# By default we do not allow hotplugging.
# A hotplugged service is one started by a dynamic dev manager when a matching
# hardware device is found.
# This service is intrinsically included in the boot runlevel.
# To disable services, prefix with a !
# Example - rc_hotplug="net.wlan !net.*"
# This allows net.wlan and any service not matching net.* to be plugged.
# Example - rc_hotplug="*"
# This allows all services to be hotplugged
#rc_hotplug="*"

# 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"

# By default we filter the environment for our running scripts. To allow other
# variables through, add them here. Use a * to allow all variables through.
rc_env_allow="*"

# By default we assume that all daemons will start correctly.
# However, some do not - a classic example is that they fork and return 0 AND
# then child barfs on a configuration error. Or the daemon has a bug and the
# child crashes. You can set the number of milliseconds start-stop-daemon
# waits to check that the daemon is still running after starting here.
# 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"

# By default we filter the environment for our running scripts. To allow other
# variables through, add them here. Use a * to allow all variables through.
rc_env_allow="*"

# By default we assume that all daemons will start correctly.
# However, some do not - a classic example is that they fork and return 0 AND
# then child barfs on a configuration error. Or the daemon has a bug and the
# child crashes. You can set the number of milliseconds start-stop-daemon
# waits to check that the daemon is still running after starting here.
# The default is 0 - no checking.
#rc_start_wait=100

# rc_nostop is a list of services which will not stop when changing runlevels.
# This still allows the service itself to be stopped when called directly.
#rc_nostop=""
# rc will attempt to start crashed services by default.
# However, it will not stop them by default as that could bring down other
# critical services.
#rc_crashed_stop=NO
#rc_crashed_start=YES
##############################################################################
# MISC CONFIGURATION VARIABLES
# There variables are shared between many init scripts

# Set unicode to YES to turn on unicode support for keyboards and screens.
unicode="YES"

# Below is the default list of network fstypes.
#
# afs cifs coda davfs fuse fuse.sshfs gfs glusterfs lustre ncpfs
# nfs nfs4 ocfs2 shfs smbfs
#
# If you would like to add to this list, you can do so by adding your
# own fstypes to the following variable.
#extra_net_fs_list=""

##############################################################################
# SERVICE CONFIGURATION VARIABLES
# These variables are documented here, but should be configured in
# /etc/conf.d/foo for service foo and NOT enabled here unless you
# really want them to work on a global basis.

# Some daemons are started and stopped via start-stop-daemon.
# We can set some things on a per service basis, like the nicelevel.
#export SSD_NICELEVEL="-19"

# Pass ulimit parameters
#rc_ulimit="-u 30"

# It's possible to define extra dependencies for services like so
#rc_config="/etc/foo"
#rc_need="openvpn"
#rc_use="net.eth0"
#rc_after="clock"
#rc_before="local"
#rc_provide="!net"

# You can also enable the above commands here for each service. Below is an
# example for service foo.
#rc_foo_config="/etc/foo"
#rc_foo_need="openvpn"
#rc_foo_after="clock"
# You can also remove dependencies.
# This is mainly used for saying which servies do NOT provide net.
#rc_net_tap0_provide="!net"
##############################################################################
# LINUX SPECIFIC OPTIONS

# This is the subsystem type. Valid options on Linux:
# "" - nothing special
# "lxc" - Linux Containers
# "openvz" - Linux OpenVZ
# "prefix" - Prefix
# "uml" - Usermode Linux
# "vserver" - Linux vserver
# "xen0" - Xen0 Domain
# "xenU" - XenU Domain
# If this is commented out, automatic detection will be attempted.
# Note that autodetection will not work in a prefix environment or in a
# linux container.
#
# This should be set to the value representing the environment this file is
# PRESENTLY in, not the virtualization the environment is capable of.
rc_sys=""
# This is the number of tty's used in most of the rc-scripts (like
# consolefont, numlock, etc ...)
rc_tty_number=12
_________________
Saturnus
Back to top
View user's profile Send private message
derk
Apprentice
Apprentice


Joined: 10 Mar 2003
Posts: 245
Location: St Thomas Ontario

PostPosted: Sun Nov 20, 2011 1:05 am    Post subject: Reply with quote

you have a duplicated entry in /etc/rc.conf two references to rc_log_path="/var/log/rc.log" plus compared with mine it is missing stuff ..

Looks like one of your edits went a miss .. the default rc.conf is as follows:

# Global OpenRC configuration settings

# Set to "YES" if you want the rc system to try and start services
# in parallel for a slight speed improvement. When running in parallel we
# prefix the service output with its name as the output will get
# jumbled up.
# WARNING: whilst we have improved parallel, it can still potentially lock
# the boot process. Don't file bugs about this unless you can supply
# patches that fix it without breaking other things!
#rc_parallel="NO"

# Set rc_interactive to "YES" and you'll be able to press the I key during
# boot so you can choose to start specific services. Set to "NO" to disable
# this feature. This feature is automatically disabled if rc_parallel is
# set to YES.
#rc_interactive="YES"

# If we need to drop to a shell, you can specify it here.
# If not specified we use $SHELL, otherwise the one specified in /etc/passwd,
# otherwise /bin/sh
# Linux users could specify /sbin/sulogin
rc_shell=/sbin/sulogin

# Do we allow any started service in the runlevel to satisfy the dependency
# or do we want all of them regardless of state? For example, if net.eth0
# and net.eth1 are in the default runlevel then with rc_depend_strict="NO"
# both will be started, but services that depend on 'net' will work if either
# one comes up. With rc_depend_strict="YES" we would require them both to
# come up.
#rc_depend_strict="YES"

# rc_hotplug is a list of services that we allow to be hotplugged.
# By default we do not allow hotplugging.
# A hotplugged service is one started by a dynamic dev manager when a matching
# hardware device is found.
# This service is intrinsically included in the boot runlevel.
# To disable services, prefix with a !
# Example - rc_hotplug="net.wlan !net.*"
# This allows net.wlan and any service not matching net.* to be plugged.
# Example - rc_hotplug="*"
# This allows all services to be hotplugged
#rc_hotplug="*"

# 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"

# By default we filter the environment for our running scripts. To allow other
# variables through, add them here. Use a * to allow all variables through.
#rc_env_allow="VAR1 VAR2"

# By default we assume that all daemons will start correctly.
# However, some do not - a classic example is that they fork and return 0 AND
# then child barfs on a configuration error. Or the daemon has a bug and the
# child crashes. You can set the number of milliseconds start-stop-daemon
# waits to check that the daemon is still running after starting here.
# The default is 0 - no checking.
#rc_start_wait=100

# rc_nostop is a list of services which will not stop when changing runlevels.
# This still allows the service itself to be stopped when called directly.
#rc_nostop=""

# rc will attempt to start crashed services by default.
# However, it will not stop them by default as that could bring down other
# critical services.
#rc_crashed_stop=NO
#rc_crashed_start=YES

##############################################################################
# MISC CONFIGURATION VARIABLES
# There variables are shared between many init scripts

# Set unicode to YES to turn on unicode support for keyboards and screens.
unicode="YES"

# Below is the default list of network fstypes.
#
# afs cifs coda davfs fuse fuse.sshfs gfs glusterfs lustre ncpfs
# nfs nfs4 ocfs2 shfs smbfs
#
# If you would like to add to this list, you can do so by adding your
# own fstypes to the following variable.
#extra_net_fs_list=""

##############################################################################
# SERVICE CONFIGURATION VARIABLES
# These variables are documented here, but should be configured in
# /etc/conf.d/foo for service foo and NOT enabled here unless you
# really want them to work on a global basis.

# Some daemons are started and stopped via start-stop-daemon.
# We can set some things on a per service basis, like the nicelevel.
#export SSD_NICELEVEL="-19"

# Pass ulimit parameters
#rc_ulimit="-u 30"

# It's possible to define extra dependencies for services like so
#rc_config="/etc/foo"
#rc_need="openvpn"
#rc_use="net.eth0"
#rc_after="clock"
#rc_before="local"
#rc_provide="!net"

# You can also enable the above commands here for each service. Below is an
# example for service foo.
#rc_foo_config="/etc/foo"
#rc_foo_need="openvpn"
#rc_foo_after="clock"

# You can also remove dependencies.
# This is mainly used for saying which servies do NOT provide net.
#rc_net_tap0_provide="!net"

##############################################################################
# LINUX SPECIFIC OPTIONS

# This is the subsystem type. Valid options on Linux:
# "" - nothing special
# "lxc" - Linux Containers
# "openvz" - Linux OpenVZ
# "prefix" - Prefix
# "uml" - Usermode Linux
# "vserver" - Linux vserver
# "xen0" - Xen0 Domain
# "xenU" - XenU Domain
# If this is commented out, automatic detection will be attempted.
# Note that autodetection will not work in a prefix environment or in a
# linux container.
#
# This should be set to the value representing the environment this file is
# PRESENTLY in, not the virtualization the environment is capable of.
rc_sys=""

# This is the number of tty's used in most of the rc-scripts (like
# consolefont, numlock, etc ...)
rc_tty_number=12
Back to top
View user's profile Send private message
saturnus
n00b
n00b


Joined: 19 Nov 2011
Posts: 5

PostPosted: Sun Nov 20, 2011 1:36 am    Post subject: Reply with quote

I rolled back to the default values in rc.conf, but I still get those messages.
_________________
Saturnus
Back to top
View user's profile Send private message
wcg
Apprentice
Apprentice


Joined: 06 Jan 2009
Posts: 249

PostPosted: Sun Nov 20, 2011 3:34 am    Post subject: Reply with quote

Try
Code:

rc_parallel="NO"

in /etc/rc.conf.

/var/log/ is on the root filesystem (/dev/sda3). The only way you would get that message
from a process running as root is if something tried to open /var/log/messages while
/dev/sda3 was still mounted read-only.

rc_parallel="NO" prevents that on my system. If the root fs needs to be fscked
first, nothing else runs until that completes and / is remounted rw.
_________________
TIA
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 3204

PostPosted: Sun Nov 20, 2011 12:19 pm    Post subject: Reply with quote

As your root file system is mount RW
As your file set as RO is message

I then think you use syslog-ng, and that you have install syslog-ng in the boot process instead of the default one. Next to that syslog-ng is start before your root is remount RW and cannot then write to message.

Please check you get answer like this :
Code:
rc-status default | grep syslog
 syslog-ng     


And if not, fix it with
Code:
rc-update del syslog-ng
rc-update add syslog-ng default
Back to top
View user's profile Send private message
RazielFMX
l33t
l33t


Joined: 23 Apr 2005
Posts: 672
Location: NY, USA

PostPosted: Tue Nov 29, 2011 4:31 pm    Post subject: Reply with quote

I also get /var/log/rc.log not found on shutdown (and that I supposedly have an orphaned file under /lib64/rc/init.d called rc.log). I think the message is a code bug as I have nothing under that directory called rc.log:

Code:

nightshade init.d # find . -type f -iname "rc*" -o -iname "*log" -ls
nightshade init.d # echo $?
0
nightshade init.d #


And, my /var/log/rc.log does have my last shutdown recorded (though lacks the error messages being displayed):

Code:

nightshade log # grep rc.log messages
nightshade log # grep rc.log rc.log
nightshade log # head -10 rc.log

rc shutdown logging started at Tue Nov 29 11:10:49 2011

 * Stopping local
 [ ok ]
 * Stopping vixie-cron ...
 [ ok ]
 * Saving random seed ...
 [ ok ]
 * Deactivating swap devices ...
nightshade log #


For the morbidly curious, my /etc/fstab file (in case I'm missing something obvious):

Code:

# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs>                                     <mountpoint> <type>    <opts>                             <dump/pass>

# /dev/sda3
UUID=cea5737a-c726-45cc-b01a-52b3e13252cb   /            ext4      defaults,noatime,nodiratime         0 1

# /dev/sda1
UUID=f4f9d712-f116-47fb-88dd-252ee49976b7   /boot        ext2      defaults,noatime,nodiratime         1 2

# /dev/sda2
UUID=fba7f57f-caa9-4f53-a60f-11643a4eeaae   none         swap      sw                                  0 0

# /dev/sda5
UUID=4de566cc-7135-4d25-b575-bc9dac5e25e5   /home        ext4      defaults,noatime,nodiratime         0 2

# /dev/sda6
UUID=60e8f366-b20e-464d-aabe-b3db8c0164b6   /var         reiserfs  defaults,noatime,nodiratime,notail  0 2

# /dev/sda7
UUID=9abe7496-4ee8-4995-9679-fb81a6e5cd8c   /tmp         ext4      defaults,noatime,nodiratime,nosuid  0 2

#
# Special file systems
#
proc                                        /proc        proc      defaults                            0 0

#
# Removable media
#
/dev/cdrom                                  /mnt/cdrom    auto      user,noauto,exec,ro,utf8            0 0
/dev/fd0                                    /mnt/floppy  auto      rw,user,noauto,noexec,utf8          0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
shm                                         /dev/shm     tmpfs     nodev,nosuid,noexec                 0 0
Back to top
View user's profile Send private message
tristen
n00b
n00b


Joined: 29 Jul 2011
Posts: 6
Location: Heidelberg, Germany

PostPosted: Fri Dec 02, 2011 3:47 pm    Post subject: Me too Reply with quote

Upon startup I get:
* Error fopen(/lib64/rc/init.d/rc.log) failed: No such file or directory

I have no idea why it's even trying to open that file. It doesn't exist on my machine,
nor is it specified in any of my config files in /etc.
Back to top
View user's profile Send private message
azmulx
n00b
n00b


Joined: 02 Dec 2011
Posts: 2

PostPosted: Sat Dec 03, 2011 12:22 am    Post subject: Reply with quote

Is it possible that those kind of messages are caused by full filesystem?
Back to top
View user's profile Send private message
poncho
n00b
n00b


Joined: 06 Mar 2011
Posts: 26

PostPosted: Sat Dec 03, 2011 1:31 am    Post subject: Reply with quote

Maybe related:

Bug 390645 - sys-apps/openrc: /var/log/rc.log is written before fsck/localmount
Back to top
View user's profile Send private message
RazielFMX
l33t
l33t


Joined: 23 Apr 2005
Posts: 672
Location: NY, USA

PostPosted: Fri Dec 09, 2011 3:26 pm    Post subject: Reply with quote

poncho wrote:
Maybe related:

Bug 390645 - sys-apps/openrc: /var/log/rc.log is written before fsck/localmount


I believe it is. My /var partition is unmounted before the /var/log/rc.log is updated with the final writes from shutdown.
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1077

PostPosted: Fri Dec 09, 2011 6:16 pm    Post subject: Reply with quote

RazielFMX wrote:


I believe it is.


Hi,
It may be that this was the cause with your /var.
But since the new openrc I have the same error as the thread-starter and not a separate /var partition.
I'm watching this thread hoping to find a solution. I've looked around in the meantime, but without success. This error seems to be related with the script for localmount. I have moved the most scripts in the runlevels, from default to boot or sysinit and back. Also I changed the entries in fstab to without success.

I have no idea what to do.

Here are the runlevels:

tux # eselect rc show all wrote:

Status of init scripts in runlevel "boot"
alsasound [started]
bootmisc [started]
consolefont [started]
fbcondecor [started]
fsck [started]
hostname [started]
keymaps [started]
localmount [started]
modules [started]
mtab [started]
net.lo [started]
procfs [started]
root [started]
swap [started]
sysctl [started]
sysfs [started]
syslog-ng [started]
termencoding [started]
udev-mount [started]
urandom [started]
Status of init scripts in runlevel "default"
NetworkManager [started]
autofs [started]
avahi-daemon [started]
avahi-dnsconfd [started]
consolekit [started]
cpufrequtils [started]
cupsd [started]
dbus [started]
gpm [started]
hddtemp [started]
hdparm [started]
hwclock [started]
local [started]
net.eth0 [started]
netmount [started]
ntpd [started]
pdnsd [started]
privoxy [started]
udev-postmount [started]
vixie-cron [started]
vmware [started]
xdm [started]
Status of init scripts in runlevel "shutdown"
killprocs [stopped]
mount-ro [stopped]
savecache [stopped]
Status of init scripts in runlevel "sysinit"
devfs [started]
dmesg [started]
udev [started]
tux#

_________________
The Indian Shankar Drum Ganesh Machine
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1077

PostPosted: Sat Dec 10, 2011 10:33 pm    Post subject: Reply with quote

Code:
Error: fopen (/var/log/messages) failed read-only file system
warning: temporary log file left behind /lib/rc/init.d/rc.log


This is definitely a bug. I did a fresh install with the latest -> stage3-amd64-20111208.tar.bz2
and the error appears again.

Ma

eselect rc show all wrote:

Status of init scripts in runlevel "boot"
alsasound [started]
bootmisc [started]
consolefont [started]
dbus [started]
fsck [started]
gpm [started]
hostname [started]
hwclock [started]
keymaps [started]
localmount [started]
modules [started]
mtab [started]
net.lo [started]
procfs [started]
root [started]
swap [started]
sysctl [started]
termencoding [started]
urandom [started]
Status of init scripts in runlevel "default"
local [started]
net.eth0 [started]
netmount [started]
udev-postmount [started]
xdm [started]
Status of init scripts in runlevel "shutdown"
killprocs [stopped]
mount-ro [stopped]
savecache [stopped]
Status of init scripts in runlevel "sysinit"
devfs [started]
dmesg [started]
udev [started]

_________________
The Indian Shankar Drum Ganesh Machine
Back to top
View user's profile Send private message
hujuice
Apprentice
Apprentice


Joined: 16 Oct 2007
Posts: 165
Location: Rome, Italy

PostPosted: Sun Dec 11, 2011 12:43 pm    Post subject: Reply with quote

poncho wrote:
Maybe related:

Bug 390645 - sys-apps/openrc: /var/log/rc.log is written before fsck/localmount


I think that the shutdown problem should not be considered strictly related to the startup one.

Consider what's happening (or what should happen) in both situations.

During startup, each log message is stored somewhere in memory. Once the system is up and running, messages are dumped to the wanted file. This should work.
During shutdown, messages are kept in memory and finally dumped... where? If (as usually) /var has been unmounted, there's no /var/log/rc.log file to append to. This cannot work.

So, if during shutdown you umount /var via localmount and if you want to log everything until the very last message (included the Unmounting /var ... message), you have to drive rc.log to your rootfs.

I really don't like this solution, but it is anyway very different from the startup scenario.

Regards,
HUjuice
_________________
Who haven't spine, should have a method.
Chi non ha carattere, deve pur avere un metodo.
Back to top
View user's profile Send private message
RazielFMX
l33t
l33t


Joined: 23 Apr 2005
Posts: 672
Location: NY, USA

PostPosted: Mon Dec 12, 2011 5:05 pm    Post subject: Reply with quote

I think openrc should dump the shutdown log prior to file systems being unmounted; whatever happens after that just won't be logged. Given the data in previous posts, it appears that the log is trying to be dumped even after the root partition has been remounted RO so even if rc.log is on the rootfs we will still see this issue. Thus, I think the only viable option is to sacrifice the last few lines of shutdown and dump the log prior to dropping the mounts and remounting rootfs readonly.
Back to top
View user's profile Send private message
hujuice
Apprentice
Apprentice


Joined: 16 Oct 2007
Posts: 165
Location: Rome, Italy

PostPosted: Mon Dec 12, 2011 5:34 pm    Post subject: Reply with quote

Messages could also be stored in a temporary file and appended to /var/log/rc.log during the next startup.
Cold management (e.g. with a live) should be aware of this, but it would be complete.

That's the actual solution (/lib64/rc/cache/rc.log, the error message is wrong).
Simply, openrc could restore that content in the usual file.

Regards,
HUjuice
_________________
Who haven't spine, should have a method.
Chi non ha carattere, deve pur avere un metodo.
Back to top
View user's profile Send private message
EddyC
n00b
n00b


Joined: 14 Dec 2011
Posts: 1

PostPosted: Mon Dec 19, 2011 3:15 pm    Post subject: Reply with quote

FYI,

I was facing this problem, I solved by adding localmount & mtab to sysinit

rc-update add localmount sysinit
rc-update add mtab sysinit

Best Regards,
Eddy
Back to top
View user's profile Send private message
wcg
Apprentice
Apprentice


Joined: 06 Jan 2009
Posts: 249

PostPosted: Tue Dec 20, 2011 7:31 pm    Post subject: Reply with quote

Keep in mind that "/lib/rc/init.d/" (or /lib64/rc/init.d) is a tmpfs mount
where openrc keeps state information on the running system. When
you shutdown, the contents simply disappear, and when the system
boots again, they are created anew. If the system dumped a temporary
copy of a log file to that filesystem during shutdown, it would be gone
when the system rebooted.

Code:

mount | fgrep rc-svcdir


(That error seems like a development artifact. At one time, that directory
was perhaps on a filesystem that persisted across reboots, so dumping
a temporary log there if opening /var/log/rc.log reported error was fine.
Then someone said, "Hey, why don't we put this on a tmpfs mount,
so we are never working with stale data after a reboot." That worked,
but the developers overlooked changing the "temporary alternate log dump"
functionality to adapt to the fact that /lib/rc/init.d/* was no longer persistent
across reboots, which would make dumping a log there during shutdown
useless.)
_________________
TIA
Back to top
View user's profile Send private message
hujuice
Apprentice
Apprentice


Joined: 16 Oct 2007
Posts: 165
Location: Rome, Italy

PostPosted: Tue Dec 20, 2011 9:45 pm    Post subject: Reply with quote

wcg wrote:
Keep in mind that "/lib/rc/init.d/" (or /lib64/rc/init.d) is a tmpfs mount...


In fact, despite the error message, I found the shutdown log in
Code:
/lib/rc/cache/rc.log


I agree, it seems like a shortcut for a chicken-and-egg problem.

Regards,
HUjuice
_________________
Who haven't spine, should have a method.
Chi non ha carattere, deve pur avere un metodo.
Back to top
View user's profile Send private message
wcg
Apprentice
Apprentice


Joined: 06 Jan 2009
Posts: 249

PostPosted: Wed Dec 21, 2011 9:43 am    Post subject: Reply with quote

Consider also what happens if openrc finds itself running on a kernel
that has not been compiled with tmpfs support enabled. Then the
data in /lib/rc/init.d/ will likely find itself on persistent storage, and
that would work as an alternate log location.
_________________
TIA
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum