Project

General

Profile

Actions

Bug #234

closed

Bug #232: [STICKY] Annoying bugs in softwares used by DC

bootlog: no logs anymore when /var/log is on a separate partition

Added by Marc Dequènes almost 13 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Start date:
2011-06-22
Due date:
% Done:

100%

Estimated time:
Patch Available:
No
Confirmed:
No
Branch:
Entity:
DuckCorp
Security:
No
Help Needed:
No


Related issues 1 (0 open1 closed)

Related to DuckCorp Infrastructure - Bug #172: No bootlog anymore on ToushirouResolvedMarc Dequènes2010-10-30

Actions
Actions #1

Updated by Arnaud Fontaine over 12 years ago

I had a look at this issue. Considering that, insserv is not the default AFAIK and that bootlogd init script is executed before mountall.sh (/etc/rcS.d/S04bootlogd and /etc/rcS.d/S09mountall.sh respectively), I don't even understand how it was supposed to work before when having a separate /var mount point... Any idea?

A possible workaround for this issue would be to mount /var through initrd and thus by using initramfs-tools (existing configuration for mount root partition can be found in /usr/share/initramfs-tools/init and /usr/share/initramfs-tools/scripts/local).

Actions #2

Updated by Arnaud Fontaine over 12 years ago

I might understand what could be the issue after looking again at bootlogd manpage. Apparently, there is an -c option:

Attempt to write to the logfile even if it does not yet exist. Without this option, bootlogd will wait for the logfile to appear before attempting to write to it. This behavior prevents bootlogd from creating logfiles under mount points.

As this option is the defaut in /etc/init.d/bootlogd, it should work unless there is already /var/log/bootlogd before mounting /var. Therefore, deleting the file under the mount point should work, if not, it means there is a bug in -c option (maybe possible considering that it was working before)... I will test that this evening...

Actions #3

Updated by Marc Dequènes over 12 years ago

I just had a look and you're right, log/boot already exists in the /var partition (without mounting /var/log).

We should then check all machines and cleanup if necessary, and test a reboot if possible to confirm. And we should update the Debian BR too.

Maybe this option was added at some time, and in earlier versions /var/log/boot was created before /var/log being mounted, thus creating this situation.

Actions #4

Updated by Arnaud Fontaine over 12 years ago

Sorry, didn't read carefully the manpage before posting my previous message, as it states that if the option -c is present, then the log file will be written even if it does not exist yet. However, as -c is the default, then it will always be written under the mount point.

Thus a workaround I have just tested is to:

  1. Remove existing /var/log/boot under the mount point.
  2. Do not start bootlogd with -c by removing it from /etc/init.d/bootlogd.

Then it's working well. After reading quickly the changelog of the package, it seems that bootlogd has been moved up and down the init sequence, so the -c option could have been left behind in the process.

BTW, do you know approximatively when it stopped working in order to look when the regression happened exactly?

Actions #5

Updated by Marc Dequènes over 12 years ago

  • Assignee set to Arnaud Fontaine
Actions #6

Updated by Arnaud Fontaine over 12 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 90
Actions #7

Updated by Arnaud Fontaine over 12 years ago

Patch sent to Debian BTS.

Actions #8

Updated by Marc Dequènes almost 12 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100
  • Help Needed set to No

Fixed in recent Debian upload.

Actions #9

Updated by Marc Dequènes about 4 years ago

  • Subject changed from No bootlog anymore when /var/log is on a separate partition to bootlog: no logs anymore when /var/log is on a separate partition
Actions

Also available in: Atom PDF