Skip to main content
alenik-mm
Associate II
December 22, 2020
Solved

Kernel cannot find the rootfs

  • December 22, 2020
  • 3 replies
  • 2643 views

Hello,

I have a custom board based on STM32MP151c with an eMMC on it (no SD card). The eMMC is successfully found in the U-Boot and has the following partitioning:

part list mmc 0
 
Partition Map for MMC device 0 -- Partition Type: EFI
 
Part Start LBA End LBA Name
 Attributes
 Type GUID
 Partition GUID
 1 0x00000400 0x000013ff "ssbl"
 attrs: 0x0000000000000000
 type: 8da63339-0007-60c0-c436-083ac8230908
 guid: 81ae02b5-e823-4dfa-909e-f18021275bd7
 2 0x00001400 0x000213ff "boot"
 attrs: 0x0000000000000004
 type: 0fc63daf-8483-4772-8e79-3d69d8477de4
 type: linux
 guid: 8691f7b3-c55d-4979-ad45-ab006af4d469
 3 0x00021400 0x000293ff "vendorfs"
 attrs: 0x0000000000000000
 type: 0fc63daf-8483-4772-8e79-3d69d8477de4
 type: linux
 guid: c1241248-0452-4a9d-a181-dd26b1b8dc4a
 4 0x00029400 0x001a93ff "rootfs"
 attrs: 0x0000000000000000
 type: 0fc63daf-8483-4772-8e79-3d69d8477de4
 type: linux
 guid: e91c4e10-16e6-4c0e-bd0e-77becf4a3582
 5 0x001a9400 0x0075fbff "userfs"
 attrs: 0x0000000000000000
 type: 0fc63daf-8483-4772-8e79-3d69d8477de4
 type: linux
 guid: 91050ee0-2f8c-4a37-b0b1-54b16dfb2ec8

Before booting, I set the bootargs as following:

setenv bootargs root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rw console=ttySTM0,115200

However, the Kernel cannot find the rootfs partition:

[ 3.256832] VFS: Cannot open root device "PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582" or unknown-block(0,0): error -6
[ 3.266412] Please append a correct "root=" boot option; here are the available partitions:
[ 3.274832] 0100 65536 ram0
[ 3.274837] (driver?)
[ 3.280751] 0101 65536 ram1
[ 3.280754] (driver?)
[ 3.286888] 0102 65536 ram2
[ 3.286892] (driver?)
[ 3.293295] 0103 65536 ram3
[ 3.293300] (driver?)
[ 3.299064] 0104 65536 ram4
[ 3.299067] (driver?)
[ 3.305204] 0105 65536 ram5
[ 3.305207] (driver?)
[ 3.311270] 0106 65536 ram6
[ 3.311273] (driver?)
[ 3.317536] 0107 65536 ram7
[ 3.317540] (driver?)
[ 3.323516] 0108 65536 ram8
[ 3.323520] (driver?)
[ 3.329580] 0109 65536 ram9
[ 3.329583] (driver?)
[ 3.335685] 010a 65536 ram10
[ 3.335688] (driver?)
[ 3.341873] 010b 65536 ram11
[ 3.341876] (driver?)
[ 3.348065] 010c 65536 ram12
[ 3.348068] (driver?)
[ 3.354275] 010d 65536 ram13
[ 3.354278] (driver?)
[ 3.360443] 010e 65536 ram14
[ 3.360446] (driver?)
[ 3.366635] 010f 65536 ram15
[ 3.366638] (driver?)
[ 3.372830] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 3.381109] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.56 #1
[ 3.387030] Hardware name: STM32 (Device Tree Support)
[ 3.392210] [<c011253c>] (unwind_backtrace) from [<c010d780>] (show_stack+0x10/0x14)
[ 3.399953] [<c010d780>] (show_stack) from [<c0b14dd4>] (dump_stack+0xb0/0xc4)
[ 3.407192] [<c0b14dd4>] (dump_stack) from [<c0125e60>] (panic+0x11c/0x31c)
[ 3.414167] [<c0125e60>] (panic) from [<c1001594>] (mount_block_root+0x1cc/0x27c)
[ 3.421663] [<c1001594>] (mount_block_root) from [<c10018b0>] (mount_root+0x124/0x148)
[ 3.429597] [<c10018b0>] (mount_root) from [<c1001a54>] (prepare_namespace+0x180/0x1c4)
[ 3.437622] [<c1001a54>] (prepare_namespace) from [<c0b2c3c8>] (kernel_init+0x8/0x110)
[ 3.445557] [<c0b2c3c8>] (kernel_init) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[ 3.453136] Exception stack(0xcf089fb0 to 0xcf089ff8)
[ 3.458197] 9fa0: 00000000 00000000 00000000 00000000
[ 3.466397] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 3.474592] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 3.481232] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

Any ideas on what might be wrong and how to correct it?

Regards,

Aleksandar

This topic has been closed for replies.
Best answer by alenik-mm

Hello Olivier,

actually, the MMC is not found when the rootfs is to be mounted (racing condition). So rootdelay in the cmd line solved the problem (temporarily).

3 replies

Olivier GALLIEN
Technical Moderator
January 4, 2021

Hi @Community member​ ,

Just read your post.

Are you still facing the problem ?

If yes could you share earlier traces from TF-A / uboot during boot ?

Thanks

Olivier

Olivier GALLIEN In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
alenik-mm
alenik-mmAuthor
Associate II
January 4, 2021
Hello,

I cannot access to the ST Community at the moment, so I am sending the earlier traces from TF-A / U-Boot via email:
Olivier GALLIEN
Technical Moderator
January 11, 2021

Hi @Community member​ ,

The eMMC looks to be mounted under mmc 0 , while uboot expect to see it on mmc 1 to boot kernel.

Please check aliases node in uboot dts to remap device correctly.

Olivier

Olivier GALLIEN In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
alenik-mm
alenik-mmAuthorBest answer
Associate II
January 13, 2021

Hello Olivier,

actually, the MMC is not found when the rootfs is to be mounted (racing condition). So rootdelay in the cmd line solved the problem (temporarily).