Help to locate the place where the boot procedure stuck


I merged some upstream patches to the latest jetson kernel. When reboot the tegra, the boot procedure got stuck at the step “Root device found: mmcblk0p1”. see below :

[ 0.566646] ALSA device list:
[ 0.566650] No soundcards found.
[ 0.576465] Freeing unused kernel memory: 5376K
[ 0.614609] Run /init as init process
[ 0.643322] Root device found: mmcblk0p1. <<<< stuck here

Normally, the boot sequences next to “root device found: mmcblk0p1” should look like :

Found dev node: /dev/mmcblk0p1
EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode.
Rootfs mounted over mmcblk0p1

Based on this message, it seems that root device node is no longer recognized by the kernel or driver after the update.

Certainly, this is caused by the code I merged in. But my question is simple: if I want to debug the problem further, how do I locate the place where the last message “Root device found: mmcblk0p1” was displayed?

If someone can help me to locate that place, I think I can move on.


Hi, assume you are monitoring the booting process from a host PC using serial connection,
you may simply use script:

script boot_log.txt


everything in this terminal session will be logged in the specified file.

I actually can monitor the boot process from a PC console. If using ‘script boot_log.txt’ can catch more detailed info, please kindly let me to how to do that.

Thanks again!

Note that even if your patches did not exist, we’d still need to know exactly how you configured your kernel before compile. We don’t know if you started with a matching configuration (aside from perhaps adding something used with the patches), and we don’t know if you also installed all of the modules (with patched source this is likely required…a new “uname -r” and new modules in “/lib/modules/$(uname -r)/kernel”).

Can you elaborate your question more?
By saying

how do I locate the place where the last message “Root device found: mmcblk0p1” was displayed?

, I think you mean that there’s too many log showing up on the screen, so it’s hard to find where a specific line of message appear, so you may first cache the UART log, and use a text editor to analyze the log afterwards.

So it’s

script boot_log.txt
Open a serial connection session
Boot your device
Close the session

My apologies… I was away last week.

Actually I have all the boot sequences on the console. But my question is simple - I need to find out the place where this string “Root device found” was emitted from the source so that I can further investigate the problem.

For example, if the message is “Freeing unused kernel memory”, then this message should be displayed by the function free_initmem() in arch/csky/mm/init.c

void free_initmem(void)
unsigned long addr;

    addr = (unsigned long) &__init_begin;

    while (addr < (unsigned long) &__init_end) {
            addr += PAGE_SIZE;

    pr_info("Freeing unused kernel memory: %dk freed\n",
    ((unsigned int)&__init_end - (unsigned int)&__init_begin) >> 10);


However, the string “Root device found” seems not to exist in the entire source tree. I must have missed out some other sources when searching. That’s why I asked that.


Hi, do you have anything showing behind Root device found?
Please tell us which Jetson board and the version of L4T you are using, and put the entire boot log here.

I started tracking this issue from start_kernel(). After walking through the kernel initialization related code, finally I found it. That string was actually printed from the script /init which is included in initrd boot archive.

Thanks for having responded to my request.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.