My system occasionally hangs during the kernel boot. So I'm doing some investigation trying to see what's going on. I'm using Fedora 9, and I'm following instructions from
http://fedoraproject.org/wiki/Docs/CustomKernel to modify and build a kernel.
Basically I just added some printk statements around the places where the hang happens. The problem is after rebuilding the kernel, I don't see the messages I added come out on the console when I boot it up. (I added 'console=ttyS0,115200' as a kernel parameter in grub.conf).
I have a couple of questions.
1. In the files where I added my printk, there are already some printk there in the format
Code:
printk(KERN_INFO PREFIX "text"\n.);
but I omitted the PREFIX from the printk I added. So I just have
Code:
printk(KERN_INFO "my text"\n.);
But that shouldn't be the reason why my printk is not coming out right?
2. I see in the kernel source that there are a lot of other printk already there, but I don't see those coming out on my serial terminal neither. What do I have to change to get all the printk to come out on the serial? I've already tried adding the line
Code:
"kernel.printk = 7 1 4 7"
to my sysctl.conf file, but that doesn't seem to be making any difference.
I guess my goal is I would like to be able to see all of the kernel messages come out on the serial console so it can help me pinpoint what's the problem when the system hangs. Right now the messages that come out by default are not sufficient. So I'm trying to add my own, but having a problem seeing them. Any help is much appreciated.