Cannot mount ubifs partition

Sheng Yong shengyong1 at huawei.com
Wed May 13 20:45:47 PDT 2015


Hi, folks,

On 5/13/2015 5:20 PM, Richard Weinberger wrote:
> Am 13.05.2015 um 11:06 schrieb Michael Niarchos:
>>
>>
>> On 05/13/2015 11:59 AM, Richard Weinberger wrote:
>>> Am 13.05.2015 um 10:56 schrieb Michael Niarchos:
>>>> Volume ID:   0 (on ubi0)
>>>> Type:        dynamic
>>>> Alignment:   1
>>>> Size:        3964 LEBs (503332864 bytes, 480.0 MiB)
>>>> State:       OK
>>>> Name:        ubi-rootfs
>>>> Character device major/minor: 246:1
>>>
>>> Is the device node present?
>>>
>>> Thanks,
>>> //richard
>>>
>> Yes, it is present
>>
>> root at zx3-pm3-zynq7:~# find /dev -name "ubi*"
>> /dev/ubi0_0
>> /dev/ubi0
>> /dev/ubi_ctrl
> 
> BTW: Have you created the nodes by hand? Do major/minor numbers match?
If we create the dev node by hand, it is hard for kernel to notice that.

UBI (and even driver base) seems doesn't know and doesn't care if device
nodes already exist. UBI just checks the ubi_devices, registers devices,
and tells udev to make node. Although everything seems ok, `mount' will
fail because of wrong device node. However, the "device node" is removed
when detaching without any warning or error message. In this way, UBI
could delete the file without user's permission.

Is this appropriate? Shall we add some code in ubidetach to detect whether
the "device node" to be removed is correct?

thanks,
Sheng

> 
> Thanks,
> //richard
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
> 
> 




More information about the linux-mtd mailing list