Determining why kernel hangs on boot

2.6k views Asked by At

hi : i was building kernel for my gentoo linux . when i start the kernel , i got this message , and can't going on.

pci_hotplug: PCI Hot Plug PCI Core version: 0.5
non-volatile memory driver v1.3


i don't know how to solve this problem . and i need help . thanks .
3

There are 3 answers

2
AudioBubble On

Why don't you try to disable pci hotplug support in kernel (if I recall correctly is in main config menu / PCI support)? You probably don't need this.

0
mike On

i have solved the problem by enable all pci hotplug flag in kernel config file. thinks all.

0
Chris Stratton On

I'm going to have to disagree with those voting to close, because I think there really is a question here, and the question is "How to debug this?"

I'm going to propose two approaches:

1) Studious approach: Learn about mechanisms intended for handling boot problems. See if you can increase the kernel debug message level. Disable un-needed drivers as Quizzo suggested.

2) Cowboy approach: grep the kernel sources for strings seen in the final messages, and start shotgunning all possibly relevant bits of code with your own "still alive at" printk messages. Once you know where it's hanging, figure out why and either remove that mechanism or fix it.

At an extreme there's also a tool for debugging the kernel - kgdb - which you could set up if you have a second machine available.

If you already have linux running on this box, see if there's a config.gz in /proc or in a boot folder which you can extract and compare to the configuration you are trying to compile. It might not be a bad idea to first recompile and test exactly the same version and configuration as you have running, and then make desired changes one by one.

Also you might see if there's odd hardware in your system you could temporarily remove. For example, an older PC I have has a bios that hangs during drive enumeration if I have a large USB external drive plugged in during boot.