I'm attempting to configure a server for a debian lenny on software raid0 and a LVM root filesystem via the serial console and the hosting company's recovery console (basically an ubuntu liveCD).
After configuring the raid0, establishing LVM, running debootstrap, installing grub, etc, I reboot, and the server hangs in boot, before reaching init. Based on the kernel log messages, the raid array was brought online, and possibly LVM as well (sorry, don't have the exact log messages right now, but will tomorrow).
There is absolutely no error output from the initramfs scripts themselves - only kernel log messages. How can I get the initramfs to produce some useful debug output so I can at least determine where it dies?
It appears that the problem was the console was specified twice on the kernel command line:
Although kernel messages went to both consoles, userspace messages presumably only went to the latter.
Kernel messages get copied to all devices specified on the kernel command line (/proc/cmdline). However, for scenarios where input is necessary (e.g., a command shell), output goes only to the last console= device (and that's from where input is taken of course).
As far as the initramfs stuff, debug= can be set on the kernel command line (e.g., done through a boot loader such as GrUB) to show the commands being executed at whatever level: top, premount, init, etc. I've looked at the initramfs version of init, and be careful: the value is minus the "init-" part which you see while booting. I was hoping to see all levels by using just "debug", but alas, it doesn't work like that.
BTW...not that it'd be different, but for me this is Ubuntu 10.04
It all has to do with how the device (/dev/console) is treated. When it's opened, it refers to the last kernel command line mention of console= . So while the kernel may output messages to all "mentions," userland ordinarily has access to only the last one.
After 6 years things has changed a lot. Debian wiki doc might be useful for someone: https://wiki.debian.org/InitramfsDebug#Saving_debug_information