SD card mount file system: VFS: Cannot open root device & quot; mmcblk0p2 &

Source: Internet
Author: User

SD card mounting File System: VFS: Cannot open root device "mmcblk0p2" solves the problem of using the initramfs file system. linux can run properly and read and write SD cards normally. However, it cannot be mounted when it is mounted on the SD card. The information about bootargs is "console = ttySC0, 115200 root =/dev/mmcblk0p2 init =/init rootfstype = ext3 rootwait: mmc0 at 0xd082c000 irq 119 usbcore: registered new interface driver usbhidusbhid: usb hid core driverNo device for DAI AK4554ALSA device list: No soundcards found. TCP cubic registeredNET: Registered protocol family 17VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4 Waiting for root device/dev/mmcblk0p2... mmc0: new high speed SDHC card at address limit: mmc0: b368 00000 7.51 GiB (ro) mmcblk0: p1 p2 p3VFS: Cannot open root device "mmcblk0p2" or unknown-block (179,2) please append a correct "root =" boot option; here are the available partitions: b300 7879680 mmcblk0 driver: mmcblk b301 486266 mmcblk0p1 b302 555768 mmcblk0p2 b303 6831315 running pan Ic-not syncing: VFS: Unable to mount root fs on unknown-block (179,2) [<c0027620>] (unwind_backtrace + 0x0/0xe4) from [<c029c958>] (panic + 0x58/0 xd8) [<c029c958>] (panic + 0x58/0 xd8) from [<c0008d74>] (mount_block_root + 0x1c8/0x208) [<c0008d74>] (mount_block_root + 0x1c8/0x208) from [<c000902c>] (prepare_namespace + 0x120/0x174) [<c000902c>] (prepare_namespace + 0x120/0x174) from [<c000845c>] (kernel_init + 0x120/ 0x168) [<c000845c>] (kernel_init + 0x120/0x168) from [<c0022f90>] (kernel_thread_exit + 0x0/0x8) it is found that SD is read-only: mmcblk0: mmc0: b368 00000 7.51 GiB (ro) Note that this error message appears (ro) and the recommended Mount partition will be prompted later: Please append a correct "root =" boot option; here are the available partitions :... in fact, the SD card is not locked, because the hardware cannot be viewed, so temporary modification in the Code: to cancel the part of the mmc driver about determining read/write protection, directly return 0. Then run again, and a new error occurs: Waiting for root device/dev/mmcblk0p2... mmc0: new high speed SDHC card at address bw.mmcblk0: mmc0: b368 00000 7.51 GiB mmcblk0: p1 p2 p3EXT3-fs: barriers not enabledEXT3-fs (mmcblk0p2): warning: mounting unchecked fs, running e2fsck is recommendedkjournald starting. commit interval 5 secondsEXT3-fs (mmcblk0p2): using internal journalEXT3-fs (mmcblk0p2): mounted filesystem with orde Red data modeVFS: Mounted root (ext3 filesystem) on device 179: 2. Freeing init memory: 76 KKernel panic-not syncing: Attempted to kill init! [<C0021844>] (unwind_backtrace + 0x0/0xe4) from [<c023fe74>] (panic + 0x58/0 xd8) [<c023fe74>] (panic + 0x58/0 xd8) from [<c0030d30>] (do_exit + 0x68/0x608) [<c0030d30>] (do_exit + 0x68/0x608) from [<c0031378>] (do_group_exit + 0xa8/0xd8) [<c0031378>] (do_group_exit + 0xa8/0xd8) from [<c003c47c>] (get_signal_to_deliver + 0x378/0 x3cc) [<c003c47c>] (get_signal_to_deliver + 0x378/0 x3cc) from [<c001e7b4>] (do_signal + 0x68/0x68 0) [<c001e7b4>] (do_signal + 0x68/0x680) from [<c001ede4>] (do_policy_resume + 0x18/0x48) [<c001ede4>] (do_policy_resume + 0x18/0x48) from [<c001bed0>] (work_pending + 0x1c/0x20) from the red part, we can see that, in fact, the file system has been mounted. It should be an error when loading the init program. In the subsequent search process, we found that the driver code of the SD card depends on the DMA module, and the problem is related to the driver module compilation sequence. This problem is too hidden. I'm glad you have helped me. In the drivers/Makefile file, the default compiling sequence of source code is that after the DMA module is completed, the MMC is modified and compiled before the DMA. The problem is solved. Note the error message After Freeing init memory. The general reason is inferred later. Before the DMA compilation, when the MMC driver is loaded in the kernel, the SD card partition is detected, and mmcblk0p2 is mounted directly.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.