[elbe-users] Problem with ubifs
Manuel Traut
manuel.traut at linutronix.de
Wed Apr 4 16:18:47 CEST 2018
On Mon, Feb 26, 2018 at 07:49:13PM +0100, Ralf Schlatterbeck wrote:
> I have a project where I create an UBIFS.
> This used to run on Debian oldstable (jessie) with elbe-testing and
> generated an image for oldstable.
> I'm now trying to port this to debian stable using elbe (without
> -testing). I'm getting a corrupt ubifs which gets me a kernel panic.
> (kernel messages below)
>
> Trying to unpack that image with the python project ubi-reader
> https://github.com/jrspruitt/ubi_reader
> I'm getting "UBIFS Fatal: Super block error: Wrong node type."
> which leads me to believe the resulting ubi image is really corrupt.
>
> The image got larger with debian stable, can it be that I'm silently
> creating an image that is too big to fit into the ubi data structures
> without an error message?
> The resulting image (uncompressed nand.img, elbe builds nand.img.gz) is
> now 35.9 MB while the old images (debian oldstable) were around 27.3 MB
>
> In the elbe log.txt I have:
> running cmd +mkfs.ubifs -r /var/cache/elbe/c90792e3-2d82-4753-8e56-1ae61da056d2/filesystems/0 -o /var/cache/elbe/c90792e3-2d82-4753-8e56-1ae61da056d2/rootfs.ubifs -m 2048 -e 126976 -c 256 -x lzo+
> ------------------------------------------------------------------------------
> Error: max_leb_cnt too low (272 needed)
> ------------------------------------------------------------------------------
>
> Command failed with errorcode 255
>
> Looks like my number of logical erase blocks is too low for the
> generated image of around 35M.
>
> If this is critical (and the reason for the failure): Shouldn't Elbe raise an
> error here instead of silently creating a corrupt image?
elbe just uses the output of the mtd-utils. If they produce an output you don't
expect i think it's more a mtd-utils issue than a elbe issue.
However we could check the return value of mkfs.ubifs, ubinize etc. and log
some 'critical' error as soon as we have this feature:
https://github.com/Linutronix/elbe/issues/146
> Elbe xml part of the ubi image:
>
> <images>
> <mtd>
> <name>nand.img</name>
> <nr>0</nr>
> <size>61184kB</size>
> <ubivg>
> <label>nand</label>
> <miniosize>2048</miniosize>
> <maxlogicaleraseblockcount>256</maxlogicaleraseblockcount>
> <logicaleraseblocksize>126976</logicaleraseblocksize>
> <physicaleraseblocksize>128KiB</physicaleraseblocksize>
> <ubi>
> <type>dynamic</type>
> <label>rootfs</label>
> <id>0</id>
> <size>40MiB</size>
> </ubi>
> </ubivg>
> </mtd>
> </images>
>
> Kernel messages when booting:
> ubi0: attaching mtd3
> ubi0: scanning is finished
> ubi0: attached mtd3 (name "rootfs1", size 59 MiB)
> ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
> ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
> ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
> ubi0: good PEBs: 478, bad PEBs: 0, corrupted PEBs: 0
> ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
> ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1672873418
> ubi0: available PEBs: 123, total reserved PEBs: 355, PEBs reserved for bad PEB handling: 20
> ubi0: background thread "ubi_bgt0d" started, PID 742
> stmp3xxx-rtc 80056000.rtc: setting system clock to 1970-01-01 00:20:53 UTC (1253)
> uart-pl011 80074000.serial: no DMA platform data
> List of all partitions:
> 0100 16384 ram0
> (driver?)
> 0101 16384 ram1
> (driver?)
> 0102 16384 ram2
> (driver?)
> 0103 16384 ram3
> (driver?)
> 1f00 1024 mtdblock0
> (driver?)
> 1f01 384 mtdblock1
> (driver?)
> 1f02 6144 mtdblock2
> (driver?)
> 1f03 61184 mtdblock3
> (driver?)
> 1f04 61184 mtdblock4
> (driver?)
> 1f05 512 mtdblock5
> (driver?)
> 1f06 512 mtdblock6
> (driver?)
> 1f07 4096 mtdblock7
> (driver?)
> No filesystem could mount root, tried:
> ubifs
>
> Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
> CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.21-karo+ #1
> Hardware name: Freescale MXS (Device Tree)
> ...
>
> Ralf
> --
> Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16
> Open Source Consulting www: http://www.runtux.com
> Reichergasse 131, A-3411 Weidling email: office at runtux.com
>
> _______________________________________________
> elbe-users mailing list
> elbe-users at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-users
More information about the elbe-users
mailing list