Cannot mount ubifs partition

Sheng Yong shengyong1 at huawei.com
Thu May 14 01:24:40 PDT 2015



On 5/14/2015 3:58 PM, Richard Weinberger wrote:
> Am 14.05.2015 um 05:45 schrieb Sheng Yong:
>> 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?
> 
> Michael's problem was that ubifs was not loaded.
> He confirmed that off-list.
> 
>> 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?
> 
> Isn't this the behavior that all device drivers have?
Yes, I think so. I just considered that is there any point to do something
to avoid this, when I read the mail that you suggest Michael to check the
device node. :-)

thanks,
Sheng

> Maybe I miss something as my uptime is less than 15min. ;)
> 
> Thanks,
> //richard
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
> 
> 




More information about the linux-mtd mailing list