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.

Linux: Not able to mount UBIFS partition in linux kernel

Tool/software: Linux

Hi,

     I have a TI board. I have configured one of the partitions namely "usr-lib" with UBIFS. I have successfully built the image and flashed it using USB. While the kernel comes up the mount on that device partition is failing with bad super-user block or unknown file system type. Kindly help me in resolving with this.

  • Hello Harish,

    Please, refer to this post to fix this issue.

    Best regards,
    Kemal

  • Hi Kemal,
    I went through the post but thats for the nfs. The message i am getting is this "mount: wrong fs type, bad option, bad superblock on /dev/mtd23,missing codepage or helper program, or other error". Not sure what option i will set for this. Moreover, we are using Yocto build tool which internally given the .json configuration file, it builds the ubifs image (ubifs.mkfs and ubinize) and I am flashing it. But mounting is not happening and its giving the above error.I am trying ubifs for usr-lib partition which was squashfs before. Any thoughts will be helpful.
  • Can you post the output of this command, executed in U-Boot console?
    => printenv nandroot

    Can you check if there is a ubifs listed, after executing this command in Linux?
    root@am335x-evm:~# cat /proc/filesystems

    Can you attach the complete boot log for better orientation?

  • Hi Kemal,

                       I am trying this usr-lib UBIFS partition on NOR not NAND. I will give you the output of the command after few more tweaks. Till then let me know if you can guess something on this issue.

    Basically, u-boot boots up and kernel starts, while mounting the UBIFS image(usr_lib.dms.ubifs), it is failing with the error message below:

    "mount: wrong fs type, bad option, bad superblock on /dev/mtd23,
           missing codepage or helper program, or other error"

    Also when I do : cat /proc/filesystems I can see "nodev ubifs" as one of the entries.

    Thanks

    Harish

  • You are passing a wrong rootfstype to the kernel, also the /dev/mtd23 is suspicious. It is less likely to have a NOR with 23 partitions.

  • Hi kemal,
    U mean to say i need to have rootfs shall be built with Ubifs option and then usr-lib can be built with ubifs option. Is this what you are suspecting. All the partitions combined i have 27 partitions. So, mtd23 should be OK??? Please clarify. And where do u think i am passing the wrong rootfstype??? Thank you.
  • Can you attach this usr-lib you have? In U-Boot.
  • Hello Harish,

    Please, close the thread by clicking on "This resolved my issue" button if you are done with it.

    Best regards,
    Kemal
  • Hi Kemal,

                   I have one more question before i flash the UBIFS image again. Is these commands for mounting fine for the UBIFS partition usr_lib:

    ubimkvol /dev/ubi0 -N usr_lib -s 24MiB
    mount -t ubifs ubi0:usr_lib /mnt/ubi

    Please help in correctin this.

  • Yes, there is. You can find these commands in this page.

  • Hello Harish,

    Please, close this thread by clicking on "This resolved my issue" button, before continuing with your new thread.

    Thanks,
    Kemal