This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Unable to mount eMMC partition in NFS booting am335x

Hi,
We are using BBB(am335x) based custom board.
We have interfaced eMMC with am335x as it is interfaced in the beaglebone black.
After booting board from NFS i am able to do raw read/write to eMMC, Partition & formate the partition.
But after formating the partition when i try to mount the partition mount gives error saying "failed : not such file as /mnt/rfs"
but actually /mnt/rfs folder is present. Now my doubt is how do I flash/extract RFS on eMMC if I am not able to mount it?
And how should i debug this mouting issue.
Note that raw read/write works as I am able to boot from raw partition from SPL, U-Boot till kernel.
Any suggestions/pointer for this issue?
Thank you,
Regards,
Ankur
  • How did you formatted the raw eMMC ?
    Did you configure the eMMC with mix of raw and partitioned type ?
    Like, left out the first 10MiB as a raw for SPL,u-boot and kernel booting in raw mode and rest of the size of eMMC would be formatted as ext3 for filesystem mounting ?
    What command did you follow to format ?
  • Hi Titus,

    Thank you for reply,
    I partitioned eMMC in 3 partitions as shown below,

    # fdisk -l /dev/mmcblk0
    
    Disk /dev/mmcblk0: 3841 MB, 3841982464 bytes
    255 heads, 63 sectors/track, 467 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
            Device Boot      Start         End      Blocks  Id System
    /dev/mmcblk0p1   *           1           5       40131   c Win95 FAT32 (LBA)
    /dev/mmcblk0p2               6          30      200812+ 83 Linux
    /dev/mmcblk0p3              31          55      200812+ 83 Linux

    Then I didn't format /dev/mmcblk0p1 and wrote SPL, U-Boot, Kernel, dtb in /dev/mmcblk0p1.
    Then I formatted the /dev/mmcblk0p2 and tried mounting it as shown below,

    # mkfs.ext4 /dev/mmcblk0p
    mmcblk0p1  mmcblk0p2  mmcblk0p3
    # mkfs.ext4 /dev/mmcblk0p
    mmcblk0p1  mmcblk0p2  mmcblk0p3
    # mkfs.ext4 /dev/mmcblk0p2 -L "ROOTFS"
    mke2fs 1.42.8 (20-Jun-2013)
    Discarding device blocks: done                            
    Filesystem label=ROOTFS
    OS type: Linux
    Block size=1024 (log=0)
    Fragment size=1024 (log=0)
    Stride=0 blocks, Stripe width=0 blocks
    50400 inodes, 200812 blocks
    10040 blocks (5.00%) reserved for the super user
    First data block=1
    Maximum filesystem blocks=67371008
    25 block groups
    8192 blocks per group, 8192 fragments per group
    2016 inodes per group
    Superblock backups stored on blocks: 
            8193, 24577, 40961, 57345, 73729
    
    Allocating group tables: done                            
    Writing inode tables: done                            
    Creating journal (4096 blocks): done
    Writing superblocks and filesystem accounting information: done 
    
    # mount -t ext4 /dev/mmcblk0p2 /mnt/rfs/
    mount: mounting /dev/mmcblk0p2 on /mnt/rfs/ failed: No such device
    # 
    # 
    # 
    # ls /mnt/
    rfs   rfs2  rfs3
    

    Now i don't know what is wrong with this, any suggestions for debugging this issue?


    Thank you,

    Regards,
    Ankur

  • Have you tried any other filesystem ?
    FAT or EXT2 or EXT3 etc.,
  • Also please make sure that you have enabled "EXT4" support in kernel.
    I hope you might have completed.
  • Hi Titus,

    Ya it was my silly mistake :P
    I knew that ext4 support has to be enabled and I had enabled it also, but somehow uImage in my tftpboot was old and it didn't have ext4 support enabled. I replaced it with latest and now I am able to mount that emmc partition.
    Thank you for help,

    Regards,
    Ankur
  • Hi Ankur,
    Sounds good.
    Thanks for your update.

    FYI.
    We can also check the available filesystem support in booted kernel through the following command.
    cat /proc/filesystem

    I hope you might know this but it would help other other community members.
  • Hi Titus,

    It was back of my mind but I forgot to check it.
    Thank you for reminding it :)

    Regards,
    Ankur