Debugging boot performance issues in grub / before kernel logging starts
10
votes
3
answers
17532
views
My PC takes a long time booting. I have reason to believe it is caused by delays after grub, but before kernel logging starts (booting takes 30 seconds, but
dmesg
messages have time stamps between 0.00000
- 9.34223
, details in [this post](https://unix.stackexchange.com/questions/499832/long-time-spent-between-grub2-menu-before-kernel-boot)) .
Are there any ways to debug what's going on? In particular:
* Is there a way to make grub itself more verbose, or keep logs?
* Are there any other processes between grub and the kernel logging that could be taking time? How do I debug those?
I believe the question is not specific to my setup. But just in case, I'm running Ubuntu 16.10 and grub(2)
**EDIT**:
Following a suggestion by @TooTea, I set the debug=all
environment variables which produced a lot of messages a la script/script.c:50 malloc 0x7a9a2ca0
that should not be a problem. Then there is one block of messages that coincide with a 8 seconds delay delay:
kern/dl.c:56 Detecting ext2...
lib/relocator.c:1397 chunks = 0x7a7e0ae0
lib/relocator.c:434 trying to allocate in ...-... aligned ... size ...
lib/relocator.c:1198 allocated: ...+...
lib/relocator.c:1409 allocated .../...
lib/relocator.c:1410 chunks = 0x7a7e0ae0
Asked by sheß
(311 rep)
Feb 25, 2019, 04:16 PM
Last activity: Jul 14, 2025, 06:03 PM
Last activity: Jul 14, 2025, 06:03 PM