From: Frans Pop <elendil@planet.nl>
To: linux-kernel@vger.kernel.org
Cc: cryptsetup@packages.debian.org
Subject: Inconsistent console logging using 'quiet' with encrypted root fs
Date: Sun, 28 Jun 2009 20:05:11 +0200 [thread overview]
Message-ID: <200906282005.12020.elendil@planet.nl> (raw)
The boot option 'quiet' sets console_loglevel to 4 (KERN_WARNING) instead
of the default 7 (KERN_DEBUG).
This is respected during the early part of the boot of my system (x86_64,
Debian stable), when kernel and initrd are loaded/run. But after the
boot process mounts root and starts udev, I suddenly get a lot of messages
of level KERN_INFO. That can't be the intention of 'quiet'...
When I look at /proc/sys/kernel/printk after the boot, I see
console_loglevel is set to 7 instead of 4.
After some instrumentation I've found the cause for this problem.
My root partition is part of an encrypted LVM volume. So the initramfs
prompts for the passphrase needed to unlock the PV, and Debian's
cryptsetup package disables console logging around that to avoid the user
interaction getting messed up by kernel printks. That this is needed can
be seen from the partial log below.
To disable and re-enable logging to console, Debian's cryptsetup uses
klogctl(6, NULL, 0) and klogctl(7, NULL, 0). Problem is that the latter
resores console_loglevel to the *default* level instead of the previous
level. And thus the 'quiet' boot becomes noisy from that point onwards.
It seems reasonable to have "enable logging to console" restore the
previous level instead. I'll follow up with a patch that does that.
Cheers,
FJP
dmesg *after* patch in follow-up mail was applied, with instrumentation:
[...]
usb 5-2: configuration #1 chosen from 1 choice
[cryptsetup prompts for passphrase -> logging disabled]
FJP: console logging disabled (console_loglevel: 1)
FJP: console_loglevel change 4->1
usb 1-2.2: new full speed USB device using ehci_hcd and address 4
ieee1394: Host added: ID:BUS[0-00:1023] GUID[001b249929192210]
usb 1-2.2: configuration #1 chosen from 1 choice
usb 1-2.3: new low speed USB device using ehci_hcd and address 5
usb 1-2.3: configuration #1 chosen from 1 choice
usbcore: registered new interface driver hiddev
input: Logitech USB Receiver as /class/input/input1
generic-usb 0003:046D:C50D.0001: input: USB HID v1.10 Mouse
[Logitech USB Receiver] on usb-0000:00:1a.7-2.3/input0
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
usb 1-2.4: new low speed USB device using ehci_hcd and address 6
usb 1-2.4: configuration #1 chosen from 1 choice
input: USB Compliant Keyboard as /class/input/input2
generic-usb 0003:05A4:9841.0002: input: USB HID v1.10 Keyboard
[USB Compliant Keyboard] on usb-0000:00:1a.7-2.4/input0
input: USB Compliant Keyboard as /class/input/input3
generic-usb 0003:05A4:9841.0003: input: USB HID v1.10 Device
[USB Compliant Keyboard] on usb-0000:00:1a.7-2.4/input1
[incorrect passphrase entered]
FJP: console logging enabled (console_loglevel: 4)
FJP: console_loglevel change 1->4
[incorrect passphrase, so cryptsetup asks again]
FJP: console logging disabled (console_loglevel: 1)
FJP: console_loglevel change 4->1
FJP: console logging enabled (console_loglevel: 4)
FJP: console_loglevel change 1->4
PM: Starting manual resume from disk
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
[root file system mounted]
[...]
next reply other threads:[~2009-06-28 18:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-28 18:05 Frans Pop [this message]
2009-06-28 18:18 ` [PATCH,RFC] printk: Restore to previous console_loglevel when re-enabling logging Frans Pop
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200906282005.12020.elendil@planet.nl \
--to=elendil@planet.nl \
--cc=cryptsetup@packages.debian.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox