SD Card not Detecting


I installed ubuntu mate on SD card and after that installed the OS to emmc through USB drive through DD, and formatted the SD Card.

Now i am able to boot from emmc, but if sd card is installed then it doesn’t boot, and if i boot and then insert the SD card it is not showing in fdisk

What is the procedure to enable the sd card because after installing ubuntu mate only 400MB space is remaining and need to store the video files for operation


I have the same problem, did you solve it ?

No buddy and there is no support from @sinovoip also

–edited – M4 uses mainline U-boot and device tree and does NOT use .fex – see reply below for my approach–

I noted the approach in the link below but haven’t had the time to get it to work.

I believe the solution involves editing the sys_config.fex file to use eMMC as rootfs and the sdcard as typical storage. I’m yet to come across details of the options available in sys_config.fex but here are the instructions to re-compile the uboot

Finally got to this. Having a TTL-usb cable helps ALOT!

I got M4 to boot from eMMC with an SD card inserted. with rootfs located on eMMC. Everything done with su

  1. Copy a working sd card image to eMMC I used a USB card reader, then dd image to the eMMC

  2. mount eMMC FAT32 p1 boot partition mount -t vfat /dev/mmcblk{your eMMC} /mnt -o uid=0,gid=0,utf8,dmask=027,fmask=137

  3. modify the uEnv.txt on the boot partition of eMMC nano /mnt/bananapi/bpi-m4/linux/uEnv.txt

    1. change root to “=/dev/mmcblk{your eMMC}p2”
    2. remove "sdmmc_on=${sdmmc_on} ${bootopts} " from the line with “abootargs” variable Save and umount /dev/mmcblk{your eMMC}
  4. mount SDcard FAT32 p1 boot partition e.g mount -t vfat /dev/mmcblk{your SDcard} /mnt -o uid=0,gid=0,utf8,dmask=027,fmask=137 nano /mnt/bananapi/bpi-m4/linux/uEnv.txt (modifing the uEnv.txt on the boot partition of SDcard)

    1. change root to “=/dev/mmcblk{your eMMC}p2”
    2. remove "sdmmc_on=${sdmmc_on} ${bootopts} " from the line with “abootargs” variable
  5. reboot

I used the ttys0 to monitor the boot activity.

Now, you can boot with

  1. eMMC only.
  2. eMMC and SDcard inserted ONLY if sdcard with rootfs pointing to eMMC
  3. SDcard if rootfs pointing to SDcard - for recovery mode