* Re: Cannot mount ubifs partition [not found] <5552EE30.8060203@gmail.com> @ 2015-05-13 6:25 ` Michael Niarchos 2015-05-13 6:49 ` Richard Weinberger 0 siblings, 1 reply; 23+ messages in thread From: Michael Niarchos @ 2015-05-13 6:25 UTC (permalink / raw) To: linux-mtd On 13-May-15 06:05, Brian Norris wrote: > On Tue, May 12, 2015 at 10:38:31PM +0300, Michael N wrote: >> I am using a Zynq7000 with NAND 512MB and I am trying to deploy Linux on NAND >> memory. I use a custom built kernel with minimal features (UBI and UBIFS >> support are enabled and mtd-utils installed). I can ubiformat an mtd >> partition, I >> can ubiattach and ubidetach it but whenever I try to mount the >> partition I get this error. >> >> mount: mounting /dev/ubi0:ubi-rootfs on /mnt/ubifs failed: >> No such device > What's the exact mount command you're running? Did you take a look at > the MTD FAQ? > > http://linux-mtd.infradead.org/faq/ubifs.html#L_mount_ubif I am running this command: $ mount -t ubifs ubi0:ubi-rootfs /mnt/ubifs >> (ubi-rootfs is the name of the partition, I am sure about it) > Brian > ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-13 6:25 ` Cannot mount ubifs partition Michael Niarchos @ 2015-05-13 6:49 ` Richard Weinberger 2015-05-13 8:48 ` Michael Niarchos 0 siblings, 1 reply; 23+ messages in thread From: Richard Weinberger @ 2015-05-13 6:49 UTC (permalink / raw) To: Michael Niarchos; +Cc: linux-mtd On Wed, May 13, 2015 at 8:25 AM, Michael Niarchos <michael.niarchos@gmail.com> wrote: > On 13-May-15 06:05, Brian Norris wrote: >> >> On Tue, May 12, 2015 at 10:38:31PM +0300, Michael N wrote: >>> >>> I am using a Zynq7000 with NAND 512MB and I am trying to deploy Linux on >>> NAND >>> memory. I use a custom built kernel with minimal features (UBI and UBIFS >>> support are enabled and mtd-utils installed). I can ubiformat an mtd >>> partition, I >>> can ubiattach and ubidetach it but whenever I try to mount the >>> partition I get this error. >>> >>> mount: mounting /dev/ubi0:ubi-rootfs on /mnt/ubifs failed: >>> No such device >> >> What's the exact mount command you're running? Did you take a look at >> the MTD FAQ? >> >> http://linux-mtd.infradead.org/faq/ubifs.html#L_mount_ubif > > > I am running this command: > > $ mount -t ubifs ubi0:ubi-rootfs /mnt/ubifs Does it work if you use the device node? i.e. /dev/ubi0_X? Is it attached? -- Thanks, //richard ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-13 6:49 ` Richard Weinberger @ 2015-05-13 8:48 ` Michael Niarchos 2015-05-13 8:50 ` Richard Weinberger 0 siblings, 1 reply; 23+ messages in thread From: Michael Niarchos @ 2015-05-13 8:48 UTC (permalink / raw) To: Richard Weinberger; +Cc: linux-mtd On 05/13/2015 09:49 AM, Richard Weinberger wrote: > On Wed, May 13, 2015 at 8:25 AM, Michael Niarchos > <michael.niarchos@gmail.com> wrote: >> On 13-May-15 06:05, Brian Norris wrote: >>> >>> On Tue, May 12, 2015 at 10:38:31PM +0300, Michael N wrote: >>>> >>>> I am using a Zynq7000 with NAND 512MB and I am trying to deploy Linux on >>>> NAND >>>> memory. I use a custom built kernel with minimal features (UBI and UBIFS >>>> support are enabled and mtd-utils installed). I can ubiformat an mtd >>>> partition, I >>>> can ubiattach and ubidetach it but whenever I try to mount the >>>> partition I get this error. >>>> >>>> mount: mounting /dev/ubi0:ubi-rootfs on /mnt/ubifs failed: >>>> No such device >>> >>> What's the exact mount command you're running? Did you take a look at >>> the MTD FAQ? >>> >>> http://linux-mtd.infradead.org/faq/ubifs.html#L_mount_ubif >> >> >> I am running this command: >> >> $ mount -t ubifs ubi0:ubi-rootfs /mnt/ubifs > > Does it work if you use the device node? i.e. /dev/ubi0_X? > Is it attached? root@zx3-pm3-zynq7:~# ubiattach /dev/ubi_ctrl -m 2 [ 115.549805] UBI: attaching mtd2 to ubi0 [ 115.787102] mmc0: Card removed during transfer! [ 115.791560] mmc0: Resetting controller. [ 115.803396] mmc0: Card removed during transfer! [ 115.807853] mmc0: Resetting controller. [ 119.024116] UBI: scanning is finished [ 119.056419] UBI: attached mtd2 (name "nand-rootfs", size 506 MiB) to ubi0 [ 119.063272] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes [ 119.070053] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048 [ 119.076670] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096 [ 119.083579] UBI: good PEBs: 4044, bad PEBs: 4, corrupted PEBs: 0 [ 119.089580] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128 [ 119.096636] UBI: max/mean erase counter: 6/2, WL threshold: 4096, image sequence number: 1208887967 [ 119.105709] UBI: available PEBs: 0, total reserved PEBs: 4044, PEBs reserved for bad PEB handling: 76 [ 119.115500] UBI: background thread "ubi_bgt0d" started, PID 933 UBI device number 0, total 4044 LEBs (513490944 bytes, 489.7 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB) root@zx3-pm3-zynq7:~# mount -t ubifs /dev/ubi0_0 /mnt/ mount: mounting /dev/ubi0_0 on /mnt/ failed: No such device ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-13 8:48 ` Michael Niarchos @ 2015-05-13 8:50 ` Richard Weinberger 2015-05-13 8:56 ` Michael Niarchos 0 siblings, 1 reply; 23+ messages in thread From: Richard Weinberger @ 2015-05-13 8:50 UTC (permalink / raw) To: Michael Niarchos; +Cc: linux-mtd Am 13.05.2015 um 10:48 schrieb Michael Niarchos: > > > On 05/13/2015 09:49 AM, Richard Weinberger wrote: >> On Wed, May 13, 2015 at 8:25 AM, Michael Niarchos >> <michael.niarchos@gmail.com> wrote: >>> On 13-May-15 06:05, Brian Norris wrote: >>>> >>>> On Tue, May 12, 2015 at 10:38:31PM +0300, Michael N wrote: >>>>> >>>>> I am using a Zynq7000 with NAND 512MB and I am trying to deploy Linux on >>>>> NAND >>>>> memory. I use a custom built kernel with minimal features (UBI and UBIFS >>>>> support are enabled and mtd-utils installed). I can ubiformat an mtd >>>>> partition, I >>>>> can ubiattach and ubidetach it but whenever I try to mount the >>>>> partition I get this error. >>>>> >>>>> mount: mounting /dev/ubi0:ubi-rootfs on /mnt/ubifs failed: >>>>> No such device >>>> >>>> What's the exact mount command you're running? Did you take a look at >>>> the MTD FAQ? >>>> >>>> http://linux-mtd.infradead.org/faq/ubifs.html#L_mount_ubif >>> >>> >>> I am running this command: >>> >>> $ mount -t ubifs ubi0:ubi-rootfs /mnt/ubifs >> >> Does it work if you use the device node? i.e. /dev/ubi0_X? >> Is it attached? > > root@zx3-pm3-zynq7:~# ubiattach /dev/ubi_ctrl -m 2 > [ 115.549805] UBI: attaching mtd2 to ubi0 > [ 115.787102] mmc0: Card removed during transfer! > [ 115.791560] mmc0: Resetting controller. > [ 115.803396] mmc0: Card removed during transfer! > [ 115.807853] mmc0: Resetting controller. > [ 119.024116] UBI: scanning is finished > [ 119.056419] UBI: attached mtd2 (name "nand-rootfs", size 506 MiB) to ubi0 > [ 119.063272] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes > [ 119.070053] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048 > [ 119.076670] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096 > [ 119.083579] UBI: good PEBs: 4044, bad PEBs: 4, corrupted PEBs: 0 > [ 119.089580] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128 > [ 119.096636] UBI: max/mean erase counter: 6/2, WL threshold: 4096, image sequence number: 1208887967 > [ 119.105709] UBI: available PEBs: 0, total reserved PEBs: 4044, PEBs reserved for bad PEB handling: 76 > [ 119.115500] UBI: background thread "ubi_bgt0d" started, PID 933 > UBI device number 0, total 4044 LEBs (513490944 bytes, 489.7 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB) > root@zx3-pm3-zynq7:~# mount -t ubifs /dev/ubi0_0 /mnt/ > mount: mounting /dev/ubi0_0 on /mnt/ failed: No such device Ahh, -m 2... What does ubinfo -a print? Thanks, //richard ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-13 8:50 ` Richard Weinberger @ 2015-05-13 8:56 ` Michael Niarchos 2015-05-13 8:59 ` Richard Weinberger 0 siblings, 1 reply; 23+ messages in thread From: Michael Niarchos @ 2015-05-13 8:56 UTC (permalink / raw) To: Richard Weinberger; +Cc: linux-mtd On 05/13/2015 11:50 AM, Richard Weinberger wrote: > Am 13.05.2015 um 10:48 schrieb Michael Niarchos: >> >> >> On 05/13/2015 09:49 AM, Richard Weinberger wrote: >>> On Wed, May 13, 2015 at 8:25 AM, Michael Niarchos >>> <michael.niarchos@gmail.com> wrote: >>>> On 13-May-15 06:05, Brian Norris wrote: >>>>> >>>>> On Tue, May 12, 2015 at 10:38:31PM +0300, Michael N wrote: >>>>>> >>>>>> I am using a Zynq7000 with NAND 512MB and I am trying to deploy Linux on >>>>>> NAND >>>>>> memory. I use a custom built kernel with minimal features (UBI and UBIFS >>>>>> support are enabled and mtd-utils installed). I can ubiformat an mtd >>>>>> partition, I >>>>>> can ubiattach and ubidetach it but whenever I try to mount the >>>>>> partition I get this error. >>>>>> >>>>>> mount: mounting /dev/ubi0:ubi-rootfs on /mnt/ubifs failed: >>>>>> No such device >>>>> >>>>> What's the exact mount command you're running? Did you take a look at >>>>> the MTD FAQ? >>>>> >>>>> http://linux-mtd.infradead.org/faq/ubifs.html#L_mount_ubif >>>> >>>> >>>> I am running this command: >>>> >>>> $ mount -t ubifs ubi0:ubi-rootfs /mnt/ubifs >>> >>> Does it work if you use the device node? i.e. /dev/ubi0_X? >>> Is it attached? >> >> root@zx3-pm3-zynq7:~# ubiattach /dev/ubi_ctrl -m 2 >> [ 115.549805] UBI: attaching mtd2 to ubi0 >> [ 115.787102] mmc0: Card removed during transfer! >> [ 115.791560] mmc0: Resetting controller. >> [ 115.803396] mmc0: Card removed during transfer! >> [ 115.807853] mmc0: Resetting controller. >> [ 119.024116] UBI: scanning is finished >> [ 119.056419] UBI: attached mtd2 (name "nand-rootfs", size 506 MiB) to ubi0 >> [ 119.063272] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes >> [ 119.070053] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048 >> [ 119.076670] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096 >> [ 119.083579] UBI: good PEBs: 4044, bad PEBs: 4, corrupted PEBs: 0 >> [ 119.089580] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128 >> [ 119.096636] UBI: max/mean erase counter: 6/2, WL threshold: 4096, image sequence number: 1208887967 >> [ 119.105709] UBI: available PEBs: 0, total reserved PEBs: 4044, PEBs reserved for bad PEB handling: 76 >> [ 119.115500] UBI: background thread "ubi_bgt0d" started, PID 933 >> UBI device number 0, total 4044 LEBs (513490944 bytes, 489.7 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB) >> root@zx3-pm3-zynq7:~# mount -t ubifs /dev/ubi0_0 /mnt/ >> mount: mounting /dev/ubi0_0 on /mnt/ failed: No such device > > Ahh, -m 2... > What does ubinfo -a print? > > Thanks, > //richard > root@zx3-pm3-zynq7:~# ubinfo -a UBI version: 1 Count of UBI devices: 1 UBI control device major/minor: 10:59 Present UBI devices: ubi0 ubi0 Volumes count: 1 Logical eraseblock size: 126976 bytes, 124.0 KiB Total amount of logical eraseblocks: 4044 (513490944 bytes, 489.7 MiB) Amount of available logical eraseblocks: 0 (0 bytes) Maximum count of volumes 128 Count of bad physical eraseblocks: 4 Count of reserved physical eraseblocks: 76 Current maximum erase counter value: 6 Minimum input/output unit size: 2048 bytes Character device major/minor: 246:0 Present volumes: 0 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 ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-13 8:56 ` Michael Niarchos @ 2015-05-13 8:59 ` Richard Weinberger 2015-05-13 9:06 ` Michael Niarchos 0 siblings, 1 reply; 23+ messages in thread From: Richard Weinberger @ 2015-05-13 8:59 UTC (permalink / raw) To: Michael Niarchos; +Cc: linux-mtd 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 ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-13 8:59 ` Richard Weinberger @ 2015-05-13 9:06 ` Michael Niarchos 2015-05-13 9:10 ` Richard Weinberger 2015-05-13 9:20 ` Richard Weinberger 0 siblings, 2 replies; 23+ messages in thread From: Michael Niarchos @ 2015-05-13 9:06 UTC (permalink / raw) To: Richard Weinberger; +Cc: linux-mtd 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@zx3-pm3-zynq7:~# find /dev -name "ubi*" /dev/ubi0_0 /dev/ubi0 /dev/ubi_ctrl Thanks, Michael ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-13 9:06 ` Michael Niarchos @ 2015-05-13 9:10 ` Richard Weinberger 2015-05-13 9:27 ` Michael Niarchos 2015-05-13 9:20 ` Richard Weinberger 1 sibling, 1 reply; 23+ messages in thread From: Richard Weinberger @ 2015-05-13 9:10 UTC (permalink / raw) To: Michael Niarchos; +Cc: linux-mtd 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@zx3-pm3-zynq7:~# find /dev -name "ubi*" > /dev/ubi0_0 > /dev/ubi0 > /dev/ubi_ctrl Can you use them using ubiupdatevol, etc...? Something is fishy here or we're all missing something obvious. :) Thanks, //richard ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-13 9:10 ` Richard Weinberger @ 2015-05-13 9:27 ` Michael Niarchos 0 siblings, 0 replies; 23+ messages in thread From: Michael Niarchos @ 2015-05-13 9:27 UTC (permalink / raw) To: Richard Weinberger; +Cc: linux-mtd On 05/13/2015 12:10 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@zx3-pm3-zynq7:~# find /dev -name "ubi*" >> /dev/ubi0_0 >> /dev/ubi0 >> /dev/ubi_ctrl > > Can you use them using ubiupdatevol, etc...? > > Something is fishy here or we're all missing something obvious. :) > > Thanks, > //richard > root@zx3-pm3-zynq7:/var/volatile/tmp# ubiupdatevol /dev/ubi0_0 /tmp/zx3-image.ubifs [ 272.730913] mmc0: Card removed during transfer! [ 272.735368] mmc0: Resetting controller. This messages are been printed many times, but no error for ubi updatevol is returned or something. I 've been thinking the same thing :) I don't know if this is going to help but when I first tried to load root filesystem from NAND, kernel printed that the rootfs variable was not set right and that the available options are: mtdblock0 mtdblock1 mtdblock2 I get this when I run root@zx3-pm3-zynq7:/var/volatile/tmp# cat /proc/partitions major minor #blocks name 31 0 5120 mtdblock0 31 1 1024 mtdblock1 31 2 518144 mtdblock2 Also, root@zx3-pm3-zynq7:/var/volatile/tmp# cat /proc/mtd dev: size erasesize name mtd0: 00500000 00020000 "nand-linux" mtd1: 00100000 00020000 "nand-device-tree" mtd2: 1fa00000 00020000 "nand-rootfs" I don't know what's going on :) ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-13 9:06 ` Michael Niarchos 2015-05-13 9:10 ` Richard Weinberger @ 2015-05-13 9:20 ` Richard Weinberger 2015-05-13 9:43 ` Michael Niarchos 2015-05-14 3:45 ` Sheng Yong 1 sibling, 2 replies; 23+ messages in thread From: Richard Weinberger @ 2015-05-13 9:20 UTC (permalink / raw) To: Michael Niarchos; +Cc: linux-mtd 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@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? Thanks, //richard ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-13 9:20 ` Richard Weinberger @ 2015-05-13 9:43 ` Michael Niarchos 2015-05-13 10:16 ` Richard Weinberger 2015-05-14 3:45 ` Sheng Yong 1 sibling, 1 reply; 23+ messages in thread From: Michael Niarchos @ 2015-05-13 9:43 UTC (permalink / raw) To: Richard Weinberger; +Cc: linux-mtd On 05/13/2015 12: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@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? > No, I have not created the nodes by hand ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-13 9:43 ` Michael Niarchos @ 2015-05-13 10:16 ` Richard Weinberger [not found] ` <5553286E.2090303@gmail.com> 0 siblings, 1 reply; 23+ messages in thread From: Richard Weinberger @ 2015-05-13 10:16 UTC (permalink / raw) To: Michael Niarchos; +Cc: linux-mtd Am 13.05.2015 um 11:43 schrieb Michael Niarchos: >> BTW: Have you created the nodes by hand? Do major/minor numbers match? >> > No, I have not created the nodes by hand Please answer all my questions. Also from the other mails. Thanks, //richard ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <5553286E.2090303@gmail.com>]
[parent not found: <55532AA2.5020808@nod.at>]
* Re: Cannot mount ubifs partition [not found] ` <55532AA2.5020808@nod.at> @ 2015-05-13 10:58 ` Michael Niarchos 2015-05-13 10:59 ` Richard Weinberger 0 siblings, 1 reply; 23+ messages in thread From: Michael Niarchos @ 2015-05-13 10:58 UTC (permalink / raw) To: Richard Weinberger; +Cc: linux-mtd On 05/13/2015 01:42 PM, Richard Weinberger wrote: > Am 13.05.2015 um 12:33 schrieb Michael Niarchos: >> On 05/13/2015 01:16 PM, Richard Weinberger wrote: >>> Am 13.05.2015 um 11:43 schrieb Michael Niarchos: >>> >>>>> BTW: Have you created the nodes by hand? Do major/minor numbers match? >>>>> >>>> No, I have not created the nodes by hand >>> >>> Please answer all my questions. Also from the other mails. >>> >>> Thanks, >>> //richard > Do the minor/major numbers match? Yes they do match. $ ls -l /dev/ubi0_0 crw------- 1 root root 246, 1 May 11 16:19 /dev/ubi0_0 > Does ubiupdatevol succeed? I run the following command: $ ubiupdatevol /dev/ubi0_0 /tmp/zx3-image.ubifs and nothing is printed, so I suppose that it succeeds :) > If all ubitools work but mounting ubifs not, it is maybe an ubifs issue. > Is the ubifs module loaded? :) There is a problem with loading ubifs module (other modules as well) $ modprobe ubifs modprobe: module ubifs not found in modules.dep I think that this is a problem of my minimal built kernel. Michael ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-13 10:58 ` Michael Niarchos @ 2015-05-13 10:59 ` Richard Weinberger 2015-05-13 11:19 ` Michael Niarchos 0 siblings, 1 reply; 23+ messages in thread From: Richard Weinberger @ 2015-05-13 10:59 UTC (permalink / raw) To: Michael Niarchos; +Cc: linux-mtd Am 13.05.2015 um 12:58 schrieb Michael Niarchos: > $ modprobe ubifs > modprobe: module ubifs not found in modules.dep > > I think that this is a problem of my minimal built kernel. *gnahhhh*. No ubifs for you. Thus is why mount is failing... Thanks, //richard ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-13 10:59 ` Richard Weinberger @ 2015-05-13 11:19 ` Michael Niarchos 0 siblings, 0 replies; 23+ messages in thread From: Michael Niarchos @ 2015-05-13 11:19 UTC (permalink / raw) To: Richard Weinberger; +Cc: linux-mtd On 05/13/2015 01:59 PM, Richard Weinberger wrote: > Am 13.05.2015 um 12:58 schrieb Michael Niarchos: >> $ modprobe ubifs >> modprobe: module ubifs not found in modules.dep >> >> I think that this is a problem of my minimal built kernel. > I checked my kernel build configuration and it seems that UBI and UBIFS are built-in in the kernel and should not be loaded as modules. :S I 'll look it up anyway. Thanks ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-13 9:20 ` Richard Weinberger 2015-05-13 9:43 ` Michael Niarchos @ 2015-05-14 3:45 ` Sheng Yong 2015-05-14 7:58 ` Richard Weinberger 1 sibling, 1 reply; 23+ messages in thread From: Sheng Yong @ 2015-05-14 3:45 UTC (permalink / raw) To: Richard Weinberger, Michael Niarchos; +Cc: linux-mtd 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@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/ > > ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-14 3:45 ` Sheng Yong @ 2015-05-14 7:58 ` Richard Weinberger 2015-05-14 8:24 ` Sheng Yong 0 siblings, 1 reply; 23+ messages in thread From: Richard Weinberger @ 2015-05-14 7:58 UTC (permalink / raw) To: Sheng Yong, Michael Niarchos; +Cc: linux-mtd 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@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? Maybe I miss something as my uptime is less than 15min. ;) Thanks, //richard ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-14 7:58 ` Richard Weinberger @ 2015-05-14 8:24 ` Sheng Yong 2015-05-14 8:42 ` Richard Weinberger 0 siblings, 1 reply; 23+ messages in thread From: Sheng Yong @ 2015-05-14 8:24 UTC (permalink / raw) To: Richard Weinberger, Michael Niarchos; +Cc: linux-mtd 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@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/ > > ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-14 8:24 ` Sheng Yong @ 2015-05-14 8:42 ` Richard Weinberger 0 siblings, 0 replies; 23+ messages in thread From: Richard Weinberger @ 2015-05-14 8:42 UTC (permalink / raw) To: Sheng Yong, Michael Niarchos; +Cc: linux-mtd Am 14.05.2015 um 10:24 schrieb Sheng Yong: >> 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. :-) We already have a solution for that, udev and devtmpfs. If you create the nodes by hand you're on your own. Sadly some embedded folks still do, that's why I was asking... Thanks, //richard ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <mailman.43705.1431478462.22890.linux-mtd@lists.infradead.org>]
* RE: Cannot mount ubifs partition [not found] <mailman.43705.1431478462.22890.linux-mtd@lists.infradead.org> @ 2015-05-13 1:57 ` Bean Huo 霍斌斌 (beanhuo) 2015-05-13 6:29 ` Michael Niarchos 0 siblings, 1 reply; 23+ messages in thread From: Bean Huo 霍斌斌 (beanhuo) @ 2015-05-13 1:57 UTC (permalink / raw) To: michael.niarchos; +Cc: linux-mtd >I am using a Zynq7000 with NAND 512MB and >I am trying to deploy Linux on NAND memory. >I use a custom built kernel with minimal features >(UBI and UBIFS support are enabled and mtd-utils installed). >I can ubiformat an mtd partition, I can ubiattach and ubidetach it but whenever >I try to mount the partition I get this error. >mount: mounting /dev/ubi0:ubi-rootfs on /mnt/ubifs failed: >No such device >(ubi-rootfs is the name of the partition, I am sure about it) >I am sorry if I am asking about a problem that has been reported before, but I am new to this list >Thanks in advance, >Michael Hi, Michael Do you have create a ubi volume ubi-rootfs on this mtd device ? ubimkvol /dev/ubi0 -N ubi-rootfs -m ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-13 1:57 ` Bean Huo 霍斌斌 (beanhuo) @ 2015-05-13 6:29 ` Michael Niarchos 0 siblings, 0 replies; 23+ messages in thread From: Michael Niarchos @ 2015-05-13 6:29 UTC (permalink / raw) To: "Bean Huo 霍斌斌 (beanhuo)"; +Cc: linux-mtd On 13-May-15 04:57, Bean Huo 霍斌斌 (beanhuo) wrote: > >> I am using a Zynq7000 with NAND 512MB and >> I am trying to deploy Linux on NAND memory. >> I use a custom built kernel with minimal features >> (UBI and UBIFS support are enabled and mtd-utils installed). >> I can ubiformat an mtd partition, I can ubiattach and ubidetach it but whenever >> I try to mount the partition I get this error. > > >mount: mounting /dev/ubi0:ubi-rootfs on /mnt/ubifs failed: >> No such device > >> (ubi-rootfs is the name of the partition, I am sure about it) > >> I am sorry if I am asking about a problem that has been reported before, but I am new to this list > >> Thanks in advance, >> Michael > > Hi, Michael > > Do you have create a ubi volume ubi-rootfs on this mtd device ? > > ubimkvol /dev/ubi0 -N ubi-rootfs -m > I have created a ubi volume in u-boot with the following commands. ubi part nand-rootfs ubi create ubi-rootfs "nand-rootfs is the name of the nand partition" ^ permalink raw reply [flat|nested] 23+ messages in thread
* Cannot mount ubifs partition @ 2015-05-12 19:38 Michael N 2015-05-13 3:05 ` Brian Norris 0 siblings, 1 reply; 23+ messages in thread From: Michael N @ 2015-05-12 19:38 UTC (permalink / raw) To: linux-mtd I am using a Zynq7000 with NAND 512MB and I am trying to deploy Linux on NAND memory. I use a custom built kernel with minimal features (UBI and UBIFS support are enabled and mtd-utils installed). I can ubiformat an mtd partition, I can ubiattach and ubidetach it but whenever I try to mount the partition I get this error. mount: mounting /dev/ubi0:ubi-rootfs on /mnt/ubifs failed: No such device (ubi-rootfs is the name of the partition, I am sure about it) I am sorry if I am asking about a problem that has been reported before, but I am new to this list Thanks in advance, Michael ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Cannot mount ubifs partition 2015-05-12 19:38 Michael N @ 2015-05-13 3:05 ` Brian Norris 0 siblings, 0 replies; 23+ messages in thread From: Brian Norris @ 2015-05-13 3:05 UTC (permalink / raw) To: Michael N; +Cc: linux-mtd On Tue, May 12, 2015 at 10:38:31PM +0300, Michael N wrote: > I am using a Zynq7000 with NAND 512MB and I am trying to deploy Linux on NAND > memory. I use a custom built kernel with minimal features (UBI and UBIFS > support are enabled and mtd-utils installed). I can ubiformat an mtd > partition, I > can ubiattach and ubidetach it but whenever I try to mount the > partition I get this error. > > mount: mounting /dev/ubi0:ubi-rootfs on /mnt/ubifs failed: > No such device What's the exact mount command you're running? Did you take a look at the MTD FAQ? http://linux-mtd.infradead.org/faq/ubifs.html#L_mount_ubifs > (ubi-rootfs is the name of the partition, I am sure about it) Brian ^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2015-05-14 8:43 UTC | newest] Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <5552EE30.8060203@gmail.com> 2015-05-13 6:25 ` Cannot mount ubifs partition Michael Niarchos 2015-05-13 6:49 ` Richard Weinberger 2015-05-13 8:48 ` Michael Niarchos 2015-05-13 8:50 ` Richard Weinberger 2015-05-13 8:56 ` Michael Niarchos 2015-05-13 8:59 ` Richard Weinberger 2015-05-13 9:06 ` Michael Niarchos 2015-05-13 9:10 ` Richard Weinberger 2015-05-13 9:27 ` Michael Niarchos 2015-05-13 9:20 ` Richard Weinberger 2015-05-13 9:43 ` Michael Niarchos 2015-05-13 10:16 ` Richard Weinberger [not found] ` <5553286E.2090303@gmail.com> [not found] ` <55532AA2.5020808@nod.at> 2015-05-13 10:58 ` Michael Niarchos 2015-05-13 10:59 ` Richard Weinberger 2015-05-13 11:19 ` Michael Niarchos 2015-05-14 3:45 ` Sheng Yong 2015-05-14 7:58 ` Richard Weinberger 2015-05-14 8:24 ` Sheng Yong 2015-05-14 8:42 ` Richard Weinberger [not found] <mailman.43705.1431478462.22890.linux-mtd@lists.infradead.org> 2015-05-13 1:57 ` Bean Huo 霍斌斌 (beanhuo) 2015-05-13 6:29 ` Michael Niarchos 2015-05-12 19:38 Michael N 2015-05-13 3:05 ` Brian Norris
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.