确定内核在启动时挂起的原因
你好 : 我正在为我的 gentoo linux 构建内核。当我启动内核时,我 收到此消息,无法继续。
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 .
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 .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你为什么不尝试在内核中禁用 pci 热插拔支持(如果我没记错的话是在主配置菜单/PCI 支持中)?你可能不需要这个。
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.
我将不得不不同意那些投票结束的人,因为我认为这里确实存在一个问题,问题是“如何调试这个?”
我将提出两种方法:
1) 勤奋的方法:了解用于处理启动问题的机制。看看是否可以提高内核调试消息级别。按照 Quizzo 的建议禁用不需要的驱动程序。
2) 牛仔方法:grep 内核源代码以查找最终消息中看到的字符串,并开始使用您自己的“仍然处于活动状态”printk 消息来猎杀所有可能相关的代码位。一旦你知道它挂在哪里,找出原因,然后删除该机制或修复它。
在极端情况下,还有一个用于调试内核的工具 - kgdb - 如果您有第二台可用的机器,您可以设置它。
如果您已经在此机器上运行 Linux,请查看 /proc 或启动文件夹中是否有 config.gz,您可以提取该文件并将其与您尝试编译的配置进行比较。首先重新编译并测试与运行时完全相同的版本和配置,然后一一进行所需的更改,这可能不是一个坏主意。
此外,您可能会看到系统中是否有可以暂时删除的奇怪硬件。例如,如果我在启动期间插入了大型 USB 外部驱动器,我拥有的一台旧 PC 的 BIOS 会在驱动器枚举期间挂起。
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.
我通过在内核配置文件中启用所有 pci 热插拔标志解决了这个问题。
认为所有。
i have solved the problem by enable all pci hotplug flag in kernel config file.
thinks all.