SD card mounting file system: VFS: Cannotopenrootdevice "mmcblk0p2" solution

Source: Internet
Author: User
SD card mounting file system: VFS: Cannotopenrootdevice & quot; mmcblk0p2 & quot; solve the problem of using the initramfs file system. linux can run normally and read and write SD cards normally. However, if it is mounted to the SD card, the disk cannot be mounted. the bootargs is letlettysc0, 1152... 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 running b303 6831315 running panic-not syncing: VFS: unable to mount root fs on unknown-block (179,2 )[ ] (Unwind_backtrace + 0x0/0xe4) from [ ] (Panic + 0x58/0 xd8 )[ ] (Panic + 0x58/0 xd8) from [ ] (Mount_block_root + 0x1c8/0x208 )[ ] (Mount_block_root + 0x1c8/0x208) from [ ] (Prepare_namespace + 0x120/0x174 )[ ] (Prepare_namespace + 0x120/0x174) from [ ] (Kernel_init + 0x120/0x168 )[ ] (Kernel_init + 0x120/0x168) from [ ] (Kernel_thread_exit + 0x0/0x8) It is found that SD is read-only: mmcblk0: mmc0: b368 00000 7.51 GiB (ro). Note that the error message appears (ro ), and the recommended Mount partition: 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! [ ] (Unwind_backtrace + 0x0/0xe4) from [ ] (Panic + 0x58/0 xd8 )[ ] (Panic + 0x58/0 xd8) from [ ] (Do_exit + 0x68/0x608 )[ ] (Do_exit + 0x68/0x608) from [ ] (Do_group_exit + 0xa8/0xd8 )[ ] (Do_group_exit + 0xa8/0xd8) from [ ] (Get_signal_to_deliver + 0x378/0 x3cc )[ ] (Get_signal_to_deliver + 0x378/0 x3cc) from [ ] (Do_signal + 0x68/0x680 )[ ] (Do_signal + 0x68/0x680) from [ ] (Do_policy_resume + 0x18/0x48 )[ ] (Do_policy_resume + 0x18/0x48) from [ ] (Work_pending + 0x1c/0x20) the red part shows that 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.