Sorry, you need to enable JavaScript to visit this website.

Issues with loading rootfs from SD Card

Solved
4 posts / 0 new
wcheng90's picture
wcheng90
Junior(0)
Issues with loading rootfs from SD Card

Hi,
I've been trying to load an Ubuntu rootfs from a second partition on an SD card that I've been using with my Ultrazed board. The first partition holds the boot files which seem to have no problems. It appears to boot fine until it tries to mount the rootfs and has a kernel panic because it cannot open the partition even though it can detect it.
[    3.974399] VFS: Cannot open root device "mmcblk1p2" or unknown-block(179,34): error -30
[    3.982564] Please append a correct "root=" boot option; here are the available partitions:
[    3.991000] 0100           65536 ram0 [    3.994566]  (driver?)
[    3.996902] 0101           65536 ram1 [    4.000480]  (driver?)
[    4.002814] 0102           65536 ram2 [    4.006396]  (driver?)
[    4.008733] 0103           65536 ram3 [    4.012310]  (driver?)
[    4.014644] 0104           65536 ram4 [    4.018227]  (driver?)
[    4.020558] 0105           65536 ram5 [    4.024133]  (driver?)
[    4.026468] 0106           65536 ram6 [    4.030049]  (driver?)
[    4.032381] 0107           65536 ram7 [    4.035969]  (driver?)
[    4.038307] 0108           65536 ram8 [    4.041889]  (driver?)
[    4.044211] 0109           65536 ram9 [    4.047804]  (driver?)
[    4.050138] 010a           65536 ram10 [    4.053808]  (driver?)
[    4.056138] 010b           65536 ram11 [    4.059815]  (driver?)
[    4.062151] 010c           65536 ram12 [    4.065822]  (driver?)
[    4.068151] 010d           65536 ram13 [    4.071829]  (driver?)
[    4.074164] 010e           65536 ram14 [    4.077835]  (driver?)
[    4.080165] 010f           65536 ram15 [    4.083841]  (driver?)
[    4.086180] b300         7438336 mmcblk0 [    4.090027]  driver: mmcblk
[    4.092800]   b301          250040 mmcblk0p1 00000000-01[    4.097967]
[    4.099409] b318            4096 mmcblk0rpmb [    4.103634]  (driver?)
[    4.105968] b310           16384 mmcblk0boot1 [    4.110258]  (driver?)
[    4.112591] b308           16384 mmcblk0boot0 [    4.116882]  (driver?)
[    4.119207] b320        31166976 mmcblk1 [    4.123062]  driver: mmcblk
[    4.125836]   b321         1048576 mmcblk1p1 fe74220a-01[    4.131004]
[    4.132446]   b322        30116864 mmcblk1p2 fe74220a-02[    4.137643]
[    4.139086] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,34)
[    4.147731] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.9.0-xilinx-v2017.2
It also appears that the device mmcblk1 is detected as read only even though, I have the the jumper JP2 properly set. Moving the jumper has no impact.
 
I did notice that my issue appeared to be identical to the issue that this user was having (http://zedboard.com/zh-hant/node/19041). I used the DisplayPort Reference Design as my baseline and I did notice that the WP for SD1 was not properly set which I ended up updating in the Vivado design. However, it did not appear to fix the issue, nor am I even sure if this changed anything because it still indicated that the partition was in read only mode.
 
Does anyone happen to have any insight here as to what might be going wrong and what I should change?
 
 

mbrown's picture
mbrown
Moderator(7)
rootfs too large?

I've seen similar errors when the rootfs is too large. Good explanation of the max size here:

http://www.lightofdawn.org/blog/?viewDetailed=00128

Do you see an error like the following earlier in the boot log?

That's a clue.

If the kernel thinks your rootfs is an initrd image, which looks like a hard disk (block device), it needs a pre-formatted filesystem. Is your 2nd partition formated ext4?

 

/Matt

wcheng90's picture
wcheng90
Junior(0)
I figured out the issue.

I figured out the issue. Apparently my device tree needed an update to let the system know to disable the write protection on the SD card.
This forum post was very helpful. 
https://forums.xilinx.com/t5/Embedded-Development-Tools/Beginners-proble...
 

wcheng90's picture
wcheng90
Junior(0)
I figured out the issue.

I figured out the issue. Apparently my device tree needed an update to let the system know to disable the write protection on the SD card.
This forum post was very helpful. 
https://forums.xilinx.com/t5/Embedded-Development-Tools/Beginners-proble...