linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* cannot ubiupdatevol squashfs image
@ 2019-09-10 13:10 Boris Stein
  2019-09-10 19:31 ` Richard Weinberger
  0 siblings, 1 reply; 8+ messages in thread
From: Boris Stein @ 2019-09-10 13:10 UTC (permalink / raw)
  To: linux-mtd

Hi,
I am implementing recovery mechanism where i need to flash/update
squashfs volume.
But so far failed

Using the following ubi configuration to create image:

[sysfs_volume]
mode=ubi
image=machine-image.squashfs
vol_id=0
vol_type=dynamic
vol_name=rootfs
vol_size=55MiB
[md_rootfs_volume]
mode=ubi
image=machine-image.squashfs.verity
vol_id=1
vol_type=dynamic
vol_name=md-rootfs
vol_size=1MiB
[sdatafs_volume]
mode=ubi
image=sdata.squashfs
vol_id=2
vol_type=dynamic
vol_name=sdatafs
vol_size=8MiB
[md_sdatafs_volume]
mode=ubi
image=sdata.squashfs.verity
vol_id=3
vol_type=dynamic
vol_name=md-sdatafs
vol_size=1MiB
[cache_volume]
mode=ubi
vol_id=4
vol_type=dynamic
vol_name=cachefs
vol_size=154MiB
[systemrw_volume]
mode=ubi
vol_id=5
vol_type=dynamic
vol_name=systemrw
vol_size=6MiB
[persist_volume]
mode=ubi
vol_id=6
vol_type=dynamic
vol_name=persist
vol_size=6MiB
[usrfs_volume]
mode=ubi
image=usrfs.ubifs
vol_id=7
vol_type=dynamic
vol_name=usrfs
vol_flags = autoresize
========

The failure happens when updating "rootfs" volume 0 using
ubiupdatevol, which is our root file system, using squashfs (fastmap
enabled)

The size of new " machine-image.squashfs " is  43257856.
Using "ubiupdatevol" in recovery mode, no errors observed:

[   10.813659] MTD : Attaching UBI device /dev/mtdblock25 for system @1
[   10.821989] ubi1: attaching mtd25
[   11.933699] ubi1: scanning is finished
[   11.940405] CHRDEV "ubi1" major number 233 goes below the dynamic
allocation range
[   11.977933] ubi1: attached mtd25 (name "system", size 319 MiB)
[   11.977965] ubi1: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
[   12.020256] ubi1: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
[   12.020287] ubi1: VID header offset: 4096 (aligned 4096), data offset: 8192
[   12.034289] ubi1: good PEBs: 1279, bad PEBs: 0, corrupted PEBs: 0
[   12.034320] ubi1: user volume: 8, internal volumes: 1, max. volumes
count: 128
[   12.054275] ubi1: max/mean erase counter: 2/0, WL threshold: 4096,
image sequence number: 796905358
[   12.054308] ubi1: available PEBs: 0, total reserved PEBs: 1279,
PEBs reserved for bad PEB handling: 40
[   12.064001] ubi1: background thread "ubi_bgt1d" started, PID 500
UBI device number 1, total 1279 LEBs (324804608 bytes, 309.7 MiB),
available 0 LEBs (0 bytes), LEB size 253952 bytes (248.0 KiB)
[   12.099084] /dev/ubi1 created
[   12.099353] /dev/ubi1_0 created, proceeding
[   12.104307] /dev/ubi1_1 created, proceeding
[   12.104587] /dev/ubi1_2 created, proceeding
[   12.104772] /dev/ubi1_3 created, proceeding
[   12.105002] /dev/ubi1_4 not yet created, checking again ..
[   12.182398] /dev/ubi1_4 created, proceeding
[   12.182649] /dev/ubi1_5 created, proceeding
[   12.182828] /dev/ubi1_6 created, proceeding
[   12.182995] /dev/ubi1_7 created, proceeding
[   12.433175] MTD : Looking for UBI volume : /cache for cachefs
[   12.617237] Found Volume: cachefs
[   12.640165] UBIFS (ubi1:4): background thread "ubifs_bgt1_4" started, PID 534
[   12.700176] UBIFS (ubi1:4): recovery needed
[   12.818233] UBIFS (ubi1:4): recovery completed
[   12.818413] UBIFS (ubi1:4): UBIFS: mounted UBI device 1, volume 4,
name "cachefs"
[   12.821615] UBIFS (ubi1:4): LEB size: 253952 bytes (248 KiB),
min./max. I/O unit sizes: 4096 bytes/4096 bytes
[   12.829126] UBIFS (ubi1:4): FS size: 158973952 bytes (151 MiB, 626
LEBs), journal size 7872512 bytes (7 MiB, 31 LEBs)
[   12.839034] UBIFS (ubi1:4): reserved for root: 4952683 bytes (4836 KiB)
[   12.849620] UBIFS (ubi1:4): media format: w4/r0 (latest is w4/r0),
UUID AEF335FC-4B15-4588-BDD8-6731D5EFDF11, small LPT model
[   12.859249] MTD : Mounting of /dev/ubi1_4 on /cache done
[   13.325589] Detected block device : /misc for misc
[   13.369449] Mounting of /dev/mtdblock18 on /misc done
mount: mounting /dev/mtdblock18 on /misc failed: No such device
[   13.434608] rc (284) used greatest stack depth: 5164 bytes left

Starting Recovery
Starting recovery on Wed Jan  7 20:59:59 1970
Starting recovery (pid 663) on Wed Jan  7 20:59:59 1970[   14.531474]
fs_mgr: Warning: unknown flag 0
[   14.535375] fs_mgr: Warning: unknown flag 0

recovery filesystem table
=========================
  0 /cache ubifs /dev/ubi1_4 0
  1 /misc mtd /dev/mtdblock18 0
  2 /mnt/fota ramdisk ramdisk 0

mtd: successfully wrote block at 0
I:Set boot command "boot-recovery"
locale is [en_US]
stage is []
reason is [(null)]
Execute command /usr/sbin/ubiupdatevol /dev/ubi1_0 /cache/fota/rootfs.squashfs
invoking reboot
[   24.672514] reboot: Restarting system


But then there is a failure when system boots:


[    0.000000] Linux version 4.9.155 (oe-user@oe-host) (gcc version
6.4.0 (GCC) ) #1 PREEMPT Mon Sep 9 05:35:36 UTC 2019



[    2.483342] msm_nand_parse_smem_ptable: Parsing partition table
info from SMEM
[    2.490265] msm_nand_parse_smem_ptable: SMEM partition table found:
ver: 4 len: 26
[    2.497490] msm_nand_version_check: nand_major:1, nand_minor:5,
qpic_major:1, qpic_minor:5
[    2.505471] msm_nand_flash_onfi_probe: CRC Check failed on param page
[    2.513310] msm_nand_scan: NAND Id: 0x2680ac2c Buswidth: 8Bits
Density: 512 MByte
[    2.519771] msm_nand_scan: pagesize: 4096 Erasesize: 262144
oobsize: 256 (in Bytes)
[    2.527249] msm_nand_scan: BCH ECC: 8 Bit
[    2.534714] msm_nand_scan: CFG0: 0x290409c0,           CFG1: 0x08045d5c
[    2.534714]             RAWCFG0: 0x2b8401c0,        RAWCFG1: 0x0005055d
[    2.534714]           ECCBUFCFG: 0x00000203,      ECCBCHCFG: 0x42040d10
[    2.534714]           RAWECCCFG: 0x42000d11, BAD BLOCK BYTE: 0x00000175
[    2.542870] Creating 26 MTD partitions on "1b00000.nand":
[    2.565106] 0x000000000000-0x000000280000 : "sbl"
[    2.572965] 0x000000280000-0x000000500000 : "mibib"
[    2.577494] 0x000000500000-0x000001000000 : "efs2"
[    2.585217] 0x000001000000-0x0000011c0000 : "tz"
[    2.587075] 0x0000011c0000-0x0000012c0000 : "tz_devcfg"
[    2.591275] 0x0000012c0000-0x000001440000 : "ddr"
[    2.596360] 0x000001440000-0x000001540000 : "apdp"
[    2.601127] 0x000001540000-0x000001640000 : "xbl_config"
[    2.605727] 0x000001640000-0x000001740000 : "multi_image"
[    2.611282] 0x000001740000-0x000001840000 : "aop"
[    2.616490] 0x000001840000-0x000001940000 : "qhee"
[    2.621221] 0x000001940000-0x000001a40000 : "abl"
[    2.625813] 0x000001a40000-0x000001cc0000 : "uefi"
[    2.631250] 0x000001cc0000-0x000001e40000 : "toolsfv"
[    2.635499] 0x000001e40000-0x000001fc0000 : "loader_sti"
[    2.640688] 0x000001fc0000-0x000002f00000 : "boot"
[    2.651010] 0x000002f00000-0x000003000000 : "scrub"
[    2.652636] 0x000003000000-0x000008140000 : "modem"
[    2.685041] 0x000008140000-0x000008300000 : "misc"
[    2.686886] 0x000008300000-0x000008480000 : "devinfo"
[    2.690509] 0x000008480000-0x000009180000 : "recovery"
[    2.699717] 0x000009180000-0x000009340000 : "fota"
[    2.701645] 0x000009340000-0x00000be40000 : "recoveryfs"
[    2.720416] 0x00000be40000-0x00000bf40000 : "sec"
[    2.722076] 0x00000bf40000-0x00000c040000 : "data"
[    2.725631] 0x00000c040000-0x000020000000 : "system"
[    2.844662] msm_nand_probe: NANDc phys addr 0x1b00000, BAM phys
addr 0x1b04000, BAM IRQ 22
[    2.844691] msm_nand_probe: Allocated DMA buffer at virt_addr
0xdec58000, phys_addr 0x9ec58000

[    5.919637] ubi0: attaching mtd25
[    7.038038] ubi0: scanning is finished
[    7.048738] ubi0: attached mtd25 (name "system", size 319 MiB)
[    7.048767] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
[    7.053530] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
[    7.060333] ubi0: VID header offset: 4096 (aligned 4096), data offset: 8192
[    7.067173] ubi0: good PEBs: 1279, bad PEBs: 0, corrupted PEBs: 0
[    7.073956] ubi0: user volume: 8, internal volumes: 1, max. volumes
count: 128
[    7.080208] ubi0: max/mean erase counter: 2/1, WL threshold: 4096,
image sequence number: 796905358
[    7.087316] ubi0: available PEBs: 0, total reserved PEBs: 1279,
PEBs reserved for bad PEB handling: 40
[    7.096278] ubi0: background thread "ubi_bgt0d" started, PID 207
[    7.105838] cpuidle: enable-method property 'psci' found operations
[    7.106471] lpm_levels_of: Residency < 0 for LPM
[    7.106475] lpm_levels_of: idx 1 420
[    7.106478] lpm_levels_of: Residency < 0 for LPM
[    7.106480] lpm_levels_of: idx 2 500
[    7.106483] lpm_levels_of: idx 2 3040
[    7.106693] lpm_levels: register_cluster_lpm_stats()
[    7.108873] rmnet_ipa3 started initialization
[    7.109878] RNDIS_IPA module is loaded.
[    7.109878] audio_pdr_late_init get_service_location failed ret -19
[    7.110531] msm_bus_late_init: Remove handoff bw requests
[    7.135649] vreg_sd_mmc: disabling
[    7.135656] emac_phy: disabling
[    7.135661] rgmii_io_pads: disabling
[    7.135668] vreg_wlan: disabling
[    7.135672] ALSA devic[    7.193476] Freeing unused kernel memory: 1024K
/etc/mdev/iio.sh: .: line 19: can't open
'/sys/bus/i2c/devices/*-006*/iio:device?*/uevent'
[    7.697004] iio.sh (216) used greatest stack depth: 6288 bytes left
/etc/mdev/iio.sh: .: line 19: can't open
'/sys/bus/i2c/devices/*-006*/iio:device?*/uevent'
[    7.730144] iio.sh (218) used greatest stack depth: 6256 bytes left
mkdir: can't create directory '/mnt/sdcard/': No such file or directory
mount: mounting /dev/mmcblk0p1 on /mnt/sdcard/ failed: No such file or directory
[    8.038745] mdev (214) used greatest stack depth: 6000 bytes left
mdm-init : Detected block device : 25 for system
[    8.051651] ubi: mtd25 is already attached to ubi0ubiattach:
error!: cannot attach mtd25
           error 17 (File exists)
[    8.107261] Waiting for ubinfo for md-rootfs
[    8.107431] Done ubinfo for md-rootfs, volume ID: 1
[    8.111069] Waiting for /dev/ubi0_1
[    8.115328] Done waiting for /dev/ubi0_1
[    8.124406] block ubiblock0_1: created from ubi0:1(md-rootfs)
[    8.125039] Waiting for /dev/ubiblock0_1
[    8.186355] Done waiting for /dev/ubiblock0_1
[    8.216688] Waiting for ubinfo for rootfs
[    8.216872] Done ubinfo for rootfs, volume ID: 0
[    8.219764] Waiting for /dev/ubi0_0
[    8.224833] Done waiting for /dev/ubi0_0
[    8.233326] block ubiblock0_0: created from ubi0:0(rootfs)
[    8.233943] Waiting for /dev/ubiblock0_0
[    8.301729] Done waiting for /dev/ubiblock0_0
[    8.614592] 1911 device_is_secure: #########################
device_is_secure=0
[    8.651724] Waiting for ubinfo for md-sdatafs
[    8.651900] Done ubinfo for md-sdatafs, volume ID: 3
[    8.655158] Waiting for /dev/ubi0_3
[    8.660428] Done waiting for /dev/ubi0_3
[    8.668817] block ubiblock0_3: created from ubi0:3(md-sdatafs)
[    8.669459] Waiting for /dev/ubiblock0_3
[    8.734968] Done waiting for /dev/ubiblock0_3
[    8.766984] Waiting for ubinfo for sdatafs
[    8.767156] Done ubinfo for sdatafs, volume ID: 2
[    8.770369] Waiting for /dev/ubi0_2
[    8.774891] Done waiting for /dev/ubi0_2
[    8.783874] block ubiblock0_2: created from ubi0:2(sdatafs)
[    8.784493] Waiting for /dev/ubiblock0_2
[    8.851409] Done waiting for /dev/ubiblock0_2
[    8.913053] 1911 device_is_secure: #########################
device_is_secure=0
mount: mounting /dev on /system/dev failed: Invalid argument
mount: mounting /dev/pts on /system/dev/pts failed: No such file or directory
[    9.006327] SQUASHFS error: zlib decompression failed, data probably corrupt
[    9.006359] SQUASHFS error: squashfs_read_data failed to read block 0x785a5a
[    9.012677] SQUASHFS error: Unable to read fragment cache entry [785a5a]
[    9.019470] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
[    9.026242] SQUASHFS error: Unable to read fragment cache entry [785a5a]
[    9.032876] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
[    9.039529] SQUASHFS error: Unable to read fragment cache entry [785a5a]
[    9.046225] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
[    9.052910] SQUASHFS error: Unable to read fragment cache entry [785a5a]
[    9.059573] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
[    9.066281] SQUASHFS error: Unable to read fragment cache entry [785a5a]
[    9.072954] SQUASHFS error: Unable to read page, block 785a5a, size d6b4


Please adivse,

Regards,
Boris

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cannot ubiupdatevol squashfs image
  2019-09-10 13:10 cannot ubiupdatevol squashfs image Boris Stein
@ 2019-09-10 19:31 ` Richard Weinberger
  2019-09-10 23:55   ` David Oberhollenzer
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Weinberger @ 2019-09-10 19:31 UTC (permalink / raw)
  To: Boris Stein; +Cc: linux-mtd

On Tue, Sep 10, 2019 at 3:11 PM Boris Stein <boris.stein@gmail.com> wrote:

[...]

> But then there is a failure when system boots:

[...]

> [    5.919637] ubi0: attaching mtd25
> [    7.038038] ubi0: scanning is finished
> [    7.048738] ubi0: attached mtd25 (name "system", size 319 MiB)
> [    7.048767] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
> [    7.053530] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
> [    7.060333] ubi0: VID header offset: 4096 (aligned 4096), data offset: 8192
> [    7.067173] ubi0: good PEBs: 1279, bad PEBs: 0, corrupted PEBs: 0
> [    7.073956] ubi0: user volume: 8, internal volumes: 1, max. volumes
> count: 128
> [    7.080208] ubi0: max/mean erase counter: 2/1, WL threshold: 4096,
> image sequence number: 796905358
> [    7.087316] ubi0: available PEBs: 0, total reserved PEBs: 1279,
> PEBs reserved for bad PEB handling: 40
> [    7.096278] ubi0: background thread "ubi_bgt0d" started, PID 207
> [    7.105838] cpuidle: enable-method property 'psci' found operations
> [    7.106471] lpm_levels_of: Residency < 0 for LPM
> [    7.106475] lpm_levels_of: idx 1 420
> [    7.106478] lpm_levels_of: Residency < 0 for LPM
> [    7.106480] lpm_levels_of: idx 2 500
> [    7.106483] lpm_levels_of: idx 2 3040
> [    7.106693] lpm_levels: register_cluster_lpm_stats()
> [    7.108873] rmnet_ipa3 started initialization
> [    7.109878] RNDIS_IPA module is loaded.
> [    7.109878] audio_pdr_late_init get_service_location failed ret -19
> [    7.110531] msm_bus_late_init: Remove handoff bw requests
> [    7.135649] vreg_sd_mmc: disabling
> [    7.135656] emac_phy: disabling
> [    7.135661] rgmii_io_pads: disabling
> [    7.135668] vreg_wlan: disabling
> [    7.135672] ALSA devic[    7.193476] Freeing unused kernel memory: 1024K
> /etc/mdev/iio.sh: .: line 19: can't open
> '/sys/bus/i2c/devices/*-006*/iio:device?*/uevent'
> [    7.697004] iio.sh (216) used greatest stack depth: 6288 bytes left
> /etc/mdev/iio.sh: .: line 19: can't open
> '/sys/bus/i2c/devices/*-006*/iio:device?*/uevent'
> [    7.730144] iio.sh (218) used greatest stack depth: 6256 bytes left
> mkdir: can't create directory '/mnt/sdcard/': No such file or directory
> mount: mounting /dev/mmcblk0p1 on /mnt/sdcard/ failed: No such file or directory
> [    8.038745] mdev (214) used greatest stack depth: 6000 bytes left
> mdm-init : Detected block device : 25 for system
> [    8.051651] ubi: mtd25 is already attached to ubi0ubiattach:
> error!: cannot attach mtd25
>            error 17 (File exists)
> [    8.107261] Waiting for ubinfo for md-rootfs
> [    8.107431] Done ubinfo for md-rootfs, volume ID: 1
> [    8.111069] Waiting for /dev/ubi0_1
> [    8.115328] Done waiting for /dev/ubi0_1
> [    8.124406] block ubiblock0_1: created from ubi0:1(md-rootfs)
> [    8.125039] Waiting for /dev/ubiblock0_1
> [    8.186355] Done waiting for /dev/ubiblock0_1
> [    8.216688] Waiting for ubinfo for rootfs
> [    8.216872] Done ubinfo for rootfs, volume ID: 0
> [    8.219764] Waiting for /dev/ubi0_0
> [    8.224833] Done waiting for /dev/ubi0_0
> [    8.233326] block ubiblock0_0: created from ubi0:0(rootfs)
> [    8.233943] Waiting for /dev/ubiblock0_0
> [    8.301729] Done waiting for /dev/ubiblock0_0
> [    8.614592] 1911 device_is_secure: #########################
> device_is_secure=0

???

> [    8.651724] Waiting for ubinfo for md-sdatafs
> [    8.651900] Done ubinfo for md-sdatafs, volume ID: 3
> [    8.655158] Waiting for /dev/ubi0_3
> [    8.660428] Done waiting for /dev/ubi0_3
> [    8.668817] block ubiblock0_3: created from ubi0:3(md-sdatafs)
> [    8.669459] Waiting for /dev/ubiblock0_3
> [    8.734968] Done waiting for /dev/ubiblock0_3
> [    8.766984] Waiting for ubinfo for sdatafs
> [    8.767156] Done ubinfo for sdatafs, volume ID: 2
> [    8.770369] Waiting for /dev/ubi0_2
> [    8.774891] Done waiting for /dev/ubi0_2
> [    8.783874] block ubiblock0_2: created from ubi0:2(sdatafs)
> [    8.784493] Waiting for /dev/ubiblock0_2
> [    8.851409] Done waiting for /dev/ubiblock0_2
> [    8.913053] 1911 device_is_secure: #########################
> device_is_secure=0

???

> mount: mounting /dev on /system/dev failed: Invalid argument
> mount: mounting /dev/pts on /system/dev/pts failed: No such file or directory

wut?

> [    9.006327] SQUASHFS error: zlib decompression failed, data probably corrupt
> [    9.006359] SQUASHFS error: squashfs_read_data failed to read block 0x785a5a

usually squashfs has a blocksize of 1k or 4k. So block 0x785a5a is out
of bounds.

> [    9.012677] SQUASHFS error: Unable to read fragment cache entry [785a5a]
> [    9.019470] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
> [    9.026242] SQUASHFS error: Unable to read fragment cache entry [785a5a]
> [    9.032876] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
> [    9.039529] SQUASHFS error: Unable to read fragment cache entry [785a5a]
> [    9.046225] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
> [    9.052910] SQUASHFS error: Unable to read fragment cache entry [785a5a]
> [    9.059573] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
> [    9.066281] SQUASHFS error: Unable to read fragment cache entry [785a5a]
> [    9.072954] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
>
>
> Please adivse,

There seem to be many other components involved.
Is the squashfs image actually correct?

-- 
Thanks,
//richard

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cannot ubiupdatevol squashfs image
  2019-09-10 19:31 ` Richard Weinberger
@ 2019-09-10 23:55   ` David Oberhollenzer
  2019-09-11 12:41     ` Boris Stein
  0 siblings, 1 reply; 8+ messages in thread
From: David Oberhollenzer @ 2019-09-10 23:55 UTC (permalink / raw)
  To: Richard Weinberger, Boris Stein; +Cc: linux-mtd

On 9/10/19 9:31 PM, Richard Weinberger wrote:
> On Tue, Sep 10, 2019 at 3:11 PM Boris Stein <boris.stein@gmail.com> wrote:
> 
> [...]
> 
>> [    9.006327] SQUASHFS error: zlib decompression failed, data probably corrupt
>> [    9.006359] SQUASHFS error: squashfs_read_data failed to read block 0x785a5a
> 
> usually squashfs has a blocksize of 1k or 4k. So block 0x785a5a is out
> of bounds.
>

SquashFS has a device block size that is either 1k or 4k that is only relevant
for I/O transfers. The actual block size is between 4k to 1M (defaults to 128k).
The data blocks also have no headers or checksums.

Meta data (inodes, directory entries, tables) is chopped in 8k chunks and stored
possibly compressed with a 2 byte header.

Once compressed, blocks can have any size and there is absolutely no requirement
for alignment. Inodes (or in this case the fragment table) can literally point
just anywhere between the super block and the inode table.

>> [    9.012677] SQUASHFS error: Unable to read fragment cache entry [785a5a]
>> [    9.019470] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
>> [    9.026242] SQUASHFS error: Unable to read fragment cache entry [785a5a]
>> [    9.032876] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
>> [    9.039529] SQUASHFS error: Unable to read fragment cache entry [785a5a]
>> [    9.046225] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
>> [    9.052910] SQUASHFS error: Unable to read fragment cache entry [785a5a]
>> [    9.059573] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
>> [    9.066281] SQUASHFS error: Unable to read fragment cache entry [785a5a]
>> [    9.072954] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
>>
>>

SquashFS tries to read a fragment block located some ~7.5 MiB after the
super block (0x785a5a) with a compressed size of 54964 bytes (0xd6b4).
For a ~41 MiB SquashFS image this sounds plausible.

Uncompressing fails, so the location that the fragment table points to does
not contain a valid zlib stream.


Interestingly, the inode, directory and fragment tables seem to be at least
partially readable. Accessing the root inode and walking through the tree
seems to work, since there are no other SquashFS error messages.

*Assuming* that it is not the data that is broken, *if* there are no xattrs
and NFS export tables, the fragment table is pretty much at the very end.
Maybe the filesystem is partially chopped off at the end?


Have you tried dumping the SquashFS image from the UBI volume and extracting it?
(E.g. using unsquashfs, rdsquashfs or sqfs2tar which generate more useful error
messages about what actually broke)


Regards,

David

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cannot ubiupdatevol squashfs image
  2019-09-10 23:55   ` David Oberhollenzer
@ 2019-09-11 12:41     ` Boris Stein
  2019-09-11 13:24       ` David Oberhollenzer
  0 siblings, 1 reply; 8+ messages in thread
From: Boris Stein @ 2019-09-11 12:41 UTC (permalink / raw)
  To: David Oberhollenzer; +Cc: Richard Weinberger, linux-mtd

Which tool should I use for dumping squashfs volume?

On Wed, Sep 11, 2019 at 2:55 AM David Oberhollenzer
<david.oberhollenzer@sigma-star.at> wrote:
>
> On 9/10/19 9:31 PM, Richard Weinberger wrote:
> > On Tue, Sep 10, 2019 at 3:11 PM Boris Stein <boris.stein@gmail.com> wrote:
> >
> > [...]
> >
> >> [    9.006327] SQUASHFS error: zlib decompression failed, data probably corrupt
> >> [    9.006359] SQUASHFS error: squashfs_read_data failed to read block 0x785a5a
> >
> > usually squashfs has a blocksize of 1k or 4k. So block 0x785a5a is out
> > of bounds.
> >
>
> SquashFS has a device block size that is either 1k or 4k that is only relevant
> for I/O transfers. The actual block size is between 4k to 1M (defaults to 128k).
> The data blocks also have no headers or checksums.
>
> Meta data (inodes, directory entries, tables) is chopped in 8k chunks and stored
> possibly compressed with a 2 byte header.
>
> Once compressed, blocks can have any size and there is absolutely no requirement
> for alignment. Inodes (or in this case the fragment table) can literally point
> just anywhere between the super block and the inode table.
>
> >> [    9.012677] SQUASHFS error: Unable to read fragment cache entry [785a5a]
> >> [    9.019470] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
> >> [    9.026242] SQUASHFS error: Unable to read fragment cache entry [785a5a]
> >> [    9.032876] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
> >> [    9.039529] SQUASHFS error: Unable to read fragment cache entry [785a5a]
> >> [    9.046225] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
> >> [    9.052910] SQUASHFS error: Unable to read fragment cache entry [785a5a]
> >> [    9.059573] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
> >> [    9.066281] SQUASHFS error: Unable to read fragment cache entry [785a5a]
> >> [    9.072954] SQUASHFS error: Unable to read page, block 785a5a, size d6b4
> >>
> >>
>
> SquashFS tries to read a fragment block located some ~7.5 MiB after the
> super block (0x785a5a) with a compressed size of 54964 bytes (0xd6b4).
> For a ~41 MiB SquashFS image this sounds plausible.
>
> Uncompressing fails, so the location that the fragment table points to does
> not contain a valid zlib stream.
>
>
> Interestingly, the inode, directory and fragment tables seem to be at least
> partially readable. Accessing the root inode and walking through the tree
> seems to work, since there are no other SquashFS error messages.
>
> *Assuming* that it is not the data that is broken, *if* there are no xattrs
> and NFS export tables, the fragment table is pretty much at the very end.
> Maybe the filesystem is partially chopped off at the end?
>
>
> Have you tried dumping the SquashFS image from the UBI volume and extracting it?
> (E.g. using unsquashfs, rdsquashfs or sqfs2tar which generate more useful error
> messages about what actually broke)
>
>
> Regards,
>
> David

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cannot ubiupdatevol squashfs image
  2019-09-11 12:41     ` Boris Stein
@ 2019-09-11 13:24       ` David Oberhollenzer
  2019-09-12  7:32         ` Boris Stein
  0 siblings, 1 reply; 8+ messages in thread
From: David Oberhollenzer @ 2019-09-11 13:24 UTC (permalink / raw)
  To: Boris Stein; +Cc: Richard Weinberger, linux-mtd

On 9/11/19 2:41 PM, Boris Stein wrote:
> Which tool should I use for dumping squashfs volume?
> 

I would try to either use dd on the ubiblock which you are trying to mount,
or cat on the underlying ubi volume and pipe it into a file.

It shouldn't matter if there's extra garbage at the end. The SquashFS super
block specifies the exact size of the image.

Regards,

David

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cannot ubiupdatevol squashfs image
  2019-09-11 13:24       ` David Oberhollenzer
@ 2019-09-12  7:32         ` Boris Stein
  2019-09-19 11:54           ` Boris Stein
  0 siblings, 1 reply; 8+ messages in thread
From: Boris Stein @ 2019-09-12  7:32 UTC (permalink / raw)
  To: David Oberhollenzer; +Cc: Richard Weinberger, linux-mtd

I now have similar problem with different image, in our system we have
rootfs ubi and recovery ubi.
I created a new recovery ubi and flashed it with "fastboot flash" command.
Tried to boot into recovery mode and got similar error that i got from
rootfs ubi:

[    5.890160] ubi0: attaching mtd22
[    6.046149] ubi0: scanning is finished
[    6.057618] ubi0: volume 1 ("recoveryfs") re-sized from 47 to 123 LEBs
[    6.058478] ubi0: attached mtd22 (name "recoveryfs", size 43 MiB)
[    6.063089] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
[    6.069193] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
[    6.075978] ubi0: VID header offset: 4096 (aligned 4096), data offset: 8192
[    6.082842] ubi0: good PEBs: 172, bad PEBs: 0, corrupted PEBs: 0
[    6.089591] ubi0: user volume: 2, internal volumes: 1, max. volumes
count: 128
[    6.095862] ubi0: max/mean erase counter: 126/67, WL threshold:
4096, image sequence number: 1118681957
[    6.102890] ubi0: available PEBs: 0, total reserved PEBs: 172, PEBs
reserved for bad PEB handling: 40
[    6.112542] ubi0: background thread "ubi_bgt0d" started, PID 207
[    6.121653] qcom,qpnp-rtc
c440000.qcom,spmi:qcom,pmxpoorwills@0:qcom,pmxpoorwills_rtc: setting
system clock to 1970-01-09 15:40:59 UTC (747659)
[    6.121718] cpuidle: enable-method property 'psci' found operations
[    6.122358] lpm_levels_of: Residency < 0 for LPM
[    6.122363] lpm_levels_of: idx 1 420
[    6.122365] lpm_levels_of: Residency < 0 for LPM
[    6.122368] lpm_levels_of: idx 2 500
[    6.122371] lpm_levels_of: idx 2 3040
[    6.122595] lpm_levels: register_cluster_lpm_stats()
[    6.124767] rmnet_ipa3 started initialization
[    6.125782] RNDIS_IPA module is loaded.
[    6.125783] audio_pdr_late_init get_service_location failed ret -19
[    6.126374] msm_bus_late_init: Remove handoff bw requests
[    6.140613] emac_phy: disabling
[    6.140620] rgmii_io_pads: disabling
[    6.140628] vreg_wlan: disabling
[    6.140632] ALSA deviã[    6.205886] Freeing unused kernel memory: 1024K
/etc/mdev/iio.sh: .: line 19: can't open
'/sys/bus/i2c/devices/*-006*/iio:device?*/uevent'
/etc/mdev/iio.sh: .: line 19: can't open
'/sys/bus/i2c/devices/*-006*/iio:device?*/uevent'
mkdir: can't create directory '/mnt/sdcard/': No such file or directory
mount: mounting /dev/mmcblk0p1 on /mnt/sdcard/ failed: No such file or directory
MTD : Detected block device : 22 for recoveryfs
[    7.062327] ubi: mtd22 is already attached to ubi0ubiattach:
error!: cannot attach mtd22
           error 17 (File exists)
[    7.103812] Waiting for ubinfo for recoveryfs
[    7.103991] Done ubinfo for recoveryfs, volume ID: 1
[    7.107239] Waiting for /dev/ubi0_1
[    7.112617] Done waiting for /dev/ubi0_1
[    7.121111] block ubiblock0_1: created from ubi0:1(recoveryfs)
[    7.121735] Waiting for /dev/ubiblock0_1
[    7.189342] Done waiting for /dev/ubiblock0_1
[    7.220706] Waiting for ubinfo for md-recoveryfs
[    7.220894] Done ubinfo for md-recoveryfs, volume ID: 0
[    7.224486] Waiting for /dev/ubi0_0
[    7.229447] Done waiting for /dev/ubi0_0
[    7.238403] block ubiblock0_0: created from ubi0:0(md-recoveryfs)
[    7.239025] Waiting for /dev/ubiblock0_0
[    7.305156] Done waiting for /dev/ubiblock0_0
[    7.436322] 1911 device_is_secure: #########################
device_is_secure=0
[    7.453434] mount (277) used greatest stack depth: 6004 bytes left
mount: mounting /dev on /system/dev failed: Invalid argument
mount: mounting /dev/pts on /system/dev/pts failed: No such file or directory
[    7.627410] SQUASHFS error: zlib decompression failed, data probably corrupt
[    7.627449] SQUASHFS error: squashfs_read_data failed to read block 0x1e97f5
[    7.645982] SQUASHFS error: zlib decompression failed, data probably corrupt
[    7.646018] SQUASHFS error: squashfs_read_data failed to read block 0x1e97f5
[    7.670215] Kernel panic - not syncing: Attempted to kill init!
exitcode=0x00000007
[    7.670215]
[    7.670249] CPU: 0 PID: 1 Comm: init Not tainted 4.9.155 #1
[    7.678403] Hardware name: Qualcomm Technologies, Inc. SDX
POORWILLS (Flattened Device Tree)
[    7.683728] [<c010e784>] (unwind_backtrace) from [<c010bab8>]
(show_stack+0x10/0x14)
[    7.692390] [<c010bab8>] (show_stack) from [<c01bf188>] (panic+0x13c/0x340)
[    7.700115] [<c01bf188>] (panic) from [<c011eb78>] (do_exit+0x4d8/0xa10)
[    7.706796] [<c011eb78>] (do_exit) from [<c01202e8>]
(do_group_exit+0xb8/0xbc)
[    7.713741] [<c01202e8>] (do_group_exit) from [<c012a000>]
(get_signal+0x538/0x578)
[    7.720774] [<c012a000>] (get_signal) from [<c010ae4c>]
(do_signal+0x74/0x3f4)
[    7.728325] [<c010ae4c>] (do_signal) from [<c010b358>]
(do_work_pending+0x78/0xbc)
[    7.735616] [<c010b358>] (do_work_pending) from [<c01078f4>]
(slow_work_pending+0xc/0x20)
[    7.943190] ipa ipa3_active_clients_panic_notifier:259


I then boot no normal rootfs. and i can ubiattach recovry partition
and mount recoveryfs volume:

~ # ubiattach -p /dev/mtd22
[ 50.903364] ubi2: attaching mtd22
[ 51.060835] ubi2: scanning is finished
[ 51.066292] CHRDEV "ubi2" major number 226 goes below the dynamic
allocation range
[ 51.067865] ubi2: attached mtd22 (name "recoveryfs", size 43 MiB)
[ 51.100394] ubi2: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
[ 51.100427] ubi2: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
[ 51.106160] ubi2: VID header offset: 4096 (aligned 4096), data offset: 8192
[ 51.120237] ubi2: good PEBs: 172, bad PEBs: 0, corrupted PEBs: 0
[ 51.120269] ubi2: user volume: 2, internal volumes: 1, max. volumes count: 128
[ 51.150477] ubi2: max/mean erase counter: 127/67, WL threshold: 4096,
image sequence number: 1118681957
[ 51.150514] ubi2: available PEBs: 0, total reserved PEBs: 172, PEBs
reserved for bad PEB handling: 40
[ 51.158691] ubi2: background thread "ubi_bgt2d" started, PID 1607
UBI device number 2, total 172 LEBs (43679744 bytes, 41.6 MiB),
available 0 LEBs (0 bytes), LEB size 253952 bytes (248.0 KiB)
~ #
~ #

~ # ubiblock --create /dev/ubi2_1
[ 151.715001] block ubiblock2_1: created from ubi2:1(recoveryfs)
~ # mount -t squashfs /dev/ubiblock2_ /tmp/recovery
ubiblock2_0 ubiblock2_1
~ # mount -t squashfs /dev/ubiblock2_1 /tmp/recovery
~ # cd /tmp/recovery/
/var/volatile/tmp/recovery # ls -l
total 0
drwxr-xr-x 2 root root 3 Sep 11 2019 app
drwxr-xr-x 2 root root 3175 Sep 12 2019 bin
drwxr-xr-x 2 root root 3 Sep 11 2019 boot
drwxr-xr-x 2 root root 3 Sep 12 2019 cache
drwxr-xr-x 2 root root 36 Sep 12 2019 data
drwxr-xr-x 2 root root 826 Sep 12 2019 dev
drwxr-xr-x 22 root root 971 Sep 12 2019 etc
drwxr-xr-x 2 root root 3 Sep 11 2019 firmware
drwxr-xr-x 21 root root 289 Sep 12 2019 home
drwxr-xr-x 5 root root 1343 Sep 12 2019 lib
drwxr-xr-x 12 diag diag 134 Sep 11 2019 media
drwxr-xr-x 2 root root 3 Sep 12 2019 misc
drwxr-xr-x 4 root root 41 Sep 12 2019 mnt
drwxr-xr-x 2 root root 3 Sep 11 2019 proc
drwxr-xr-x 2 root root 45 Sep 12 2019 res
drwxr-xr-x 2 root root 3 Sep 11 2019 rom
drwxr-xr-x 2 root root 3 Sep 12 2019 run
drwxr-xr-x 2 root root 2235 Sep 12 2019 sbin
lrwxrwxrwx 1 root root 11 Sep 11 2019 sdcard -> /mnt/sdcard
drwxr-xr-x 3 root root 29 Sep 11 2019 share
drwxr-xr-x 2 root root 3 Sep 11 2019 sys
drwxr-xr-x 2 root root 3 Sep 12 2019 system
drwxr-xr-x 2 root root 3 Sep 11 2019 systemrw
lrwxrwxrwx 1 root root 8 Sep 11 2019 tmp -> /var/tmp
drwxr-xr-x 10 root root 140 Sep 12 2019 usr
drwxr-xr-x 8 root root 141 Sep 11 2019 var


I can see files and read them inside /tmp/recovery.
But if i try to chroot from system root to recovery root , i get:

/var/volatile/tmp/recovery/etc # cd /
/ # chroot /tmp/recovery
[ 1556.782747] SQUASHFS error: zlib decompression failed, data probably corrupt
[ 1556.782786] SQUASHFS error: squashfs_read_data failed to read block 0x1e97f5
[ 1556.801516] SQUASHFS error: zlib decompression failed, data probably corrupt
[ 1556.801554] SQUASHFS error: squashfs_read_data failed to read block 0x1e97f5
Bus error


Same as when booting "recovery".
Our squashfs images created with:
mksquashfs ${IMAGE_ROOTFS} ${OUTPUT_FILE_SYSTEM_SQ} -noappend -b 128K
-no-fragments -xattrs -noI
We run Kernel
[    0.000000] Linux version 4.9.155 (oe-user@oe-host) (gcc version
6.4.0 (GCC) ) #1 PREEMPT Wed Sep 11 11:52:26 UTC 2019


On Wed, Sep 11, 2019 at 4:24 PM David Oberhollenzer
<david.oberhollenzer@sigma-star.at> wrote:
>
> On 9/11/19 2:41 PM, Boris Stein wrote:
> > Which tool should I use for dumping squashfs volume?
> >
>
> I would try to either use dd on the ubiblock which you are trying to mount,
> or cat on the underlying ubi volume and pipe it into a file.
>
> It shouldn't matter if there's extra garbage at the end. The SquashFS super
> block specifies the exact size of the image.
>
> Regards,
>
> David

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cannot ubiupdatevol squashfs image
  2019-09-12  7:32         ` Boris Stein
@ 2019-09-19 11:54           ` Boris Stein
  2019-09-19 13:08             ` David Oberhollenzer
  0 siblings, 1 reply; 8+ messages in thread
From: Boris Stein @ 2019-09-19 11:54 UTC (permalink / raw)
  To: David Oberhollenzer; +Cc: Richard Weinberger, linux-mtd

Hi,
below are errors of unsquashfs for ubiblock.

Is there anything else that can help debug this?

osboxes@osboxes:~/test$ sudo unsquashfs ubiblock1_0
Parallel unsquashfs: Using 1 processor
4030 inodes (4584 blocks) to write

[=========|

                                              ]  235/4584   5%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

Failed to write squashfs-root/WEBSERVER/www/js/jquery-ui.js, skipping

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[=============|

                                              ]  336/4584   7%
Failed to write squashfs-root/bin/busybox, skipping
[===================================================================================-

                               ] 2064/4584  45%
gzip uncompress failed with error code -3

Failed to write squashfs-root/sbin/route.net-tools, skipping

Failed to write squashfs-root/sbin/routef, skipping

Failed to write squashfs-root/sbin/routel, skipping

Failed to write squashfs-root/sbin/rtmon, skipping

Failed to write squashfs-root/sbin/rtpr, skipping

Failed to write squashfs-root/sbin/runlevel.sysvinit, skipping

Failed to write squashfs-root/sbin/setfiles, skipping

Failed to write squashfs-root/sbin/shutdown.sysvinit, skipping
[============================================================================================-

                      ] 2284/4584  49%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/bin/log2long, skipping

Failed to write squashfs-root/usr/bin/logcat, skipping

Failed to write squashfs-root/usr/bin/logwrapper, skipping
[============================================================================================-

                      ] 2289/4584  49%
Failed to write squashfs-root/usr/bin/maap_daemon, skipping
[=============================================================================================-

                     ] 2307/4584  50%
Failed to write squashfs-root/usr/bin/mcm_data_srv, skipping
[=============================================================================================-

                     ] 2313/4584  50%
Failed to write squashfs-root/usr/bin/mdm_ril_daemon.sh, skipping

Failed to write squashfs-root/usr/bin/mesg.sysvinit, skipping
[================================================================================================-

                  ] 2379/4584  51%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/bin/rmnetcli, skipping

Failed to write squashfs-root/usr/bin/scm, skipping

Failed to write squashfs-root/usr/bin/secon, skipping

Failed to write squashfs-root/usr/bin/sendcal, skipping
[===================================================================================================-

               ] 2448/4584  53%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/bin/time_daemon, skipping

Failed to write squashfs-root/usr/bin/tinycap, skipping

Failed to write squashfs-root/usr/bin/tinymix, skipping

Failed to write squashfs-root/usr/bin/tinyplay, skipping

Failed to write squashfs-root/usr/bin/titan-atp, skipping

Failed to write squashfs-root/usr/bin/trans_loopback_test, skipping
[===================================================================================================-

               ] 2454/4584  53%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/bin/uim_test_client, skipping

Failed to write squashfs-root/usr/bin/update-mime-database, skipping

Failed to write squashfs-root/usr/bin/usb_composition_switch, skipping

Failed to write squashfs-root/usr/bin/utmpdump.sysvinit, skipping

Failed to write squashfs-root/usr/bin/wall.sysvinit, skipping
[===================================================================================================-

               ] 2459/4584  53%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/bin/xmlcatalog, skipping

Failed to write squashfs-root/usr/bin/xmllint, skipping
[====================================================================================================-

              ] 2471/4584  53%
Failed to write squashfs-root/usr/bin/xtwifi-inet-agent, skipping

Failed to write squashfs-root/usr/etc/dhcpcd.conf, skipping
[====================================================================================================-

              ] 2483/4584  54%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libadbd.so.0.0.0, skipping

Failed to write squashfs-root/usr/lib/libadiertac.so.1.0.0, skipping
[====================================================================================================-

              ] 2485/4584  54%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libalsa_intf.so.1.0.0, skipping
[====================================================================================================-

              ] 2486/4584  54%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libasm330sensors.so.1.0.0, skipping
[====================================================================================================-

              ] 2487/4584  54%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libasn1c_cper.so.1.0.0, skipping
[=====================================================================================================-

             ] 2507/4584  54%
Failed to write squashfs-root/usr/lib/libaudioalsa.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/libaudioroute.so.0.0.0, skipping
[=====================================================================================================-

             ] 2508/4584  54%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libaudioutils.so.0.0.0, skipping

Failed to write squashfs-root/usr/lib/libavahi-client.so.3.2.9, skipping

Failed to write squashfs-root/usr/lib/libavahi-common.so.3.5.3, skipping
[=====================================================================================================-

             ] 2513/4584  54%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libavahi-glib.so.1.0.2, skipping

Failed to write squashfs-root/usr/lib/libbacktrace.so.0.0.0, skipping

Failed to write squashfs-root/usr/lib/libbase.so.0.0.0, skipping
[======================================================================================================-

            ] 2516/4584  54%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libbmi160sensors.so.1.0.0, skipping
[======================================================================================================-

            ] 2517/4584  54%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libbz2.so.1.0.6, skipping

Failed to write squashfs-root/usr/lib/libcanwrapper.so.1.0.0, skipping
[======================================================================================================-

            ] 2519/4584  54%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libconfigdb.so.0.0.0, skipping
[======================================================================================================\

            ] 2536/4584  55%
Failed to write squashfs-root/usr/lib/libcutils.so.0.0.0, skipping

Failed to write squashfs-root/usr/lib/libdaemon.so.0.5.0, skipping
[=======================================================================================================\

           ] 2542/4584  55%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[=======================================================================================================\

           ] 2544/4584  55%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libdbus-1.so.3.14.12, skipping
[=======================================================================================================\

           ] 2545/4584  55%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libdiag.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/libdrmfs.so.1.0.0, skipping
[=======================================================================================================\

           ] 2548/4584  55%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libdrmtime.so.1.0.0, skipping
[=======================================================================================================\

           ] 2549/4584  55%
gzip uncompress failed with error code -3
[=======================================================================================================\

           ] 2550/4584  55%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[=======================================================================================================\

           ] 2552/4584  55%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libdsi_netctrl.so.0.0.0, skipping

Failed to write squashfs-root/usr/lib/libdsutils.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/libebt_802_3.so, skipping

Failed to write squashfs-root/usr/lib/libebt_among.so, skipping

Failed to write squashfs-root/usr/lib/libebt_arp.so, skipping

Failed to write squashfs-root/usr/lib/libebt_arpreply.so, skipping

Failed to write squashfs-root/usr/lib/libebt_ip.so, skipping
[=======================================================================================================\

           ] 2559/4584  55%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libebt_ip6.so, skipping

Failed to write squashfs-root/usr/lib/libebt_limit.so, skipping

Failed to write squashfs-root/usr/lib/libebt_log.so, skipping

Failed to write squashfs-root/usr/lib/libebt_mark.so, skipping

Failed to write squashfs-root/usr/lib/libebt_mark_m.so, skipping

Failed to write squashfs-root/usr/lib/libebt_nat.so, skipping

Failed to write squashfs-root/usr/lib/libebt_nflog.so, skipping

Failed to write squashfs-root/usr/lib/libebt_pkttype.so, skipping

Failed to write squashfs-root/usr/lib/libebt_redirect.so, skipping

Failed to write squashfs-root/usr/lib/libebt_standard.so, skipping

Failed to write squashfs-root/usr/lib/libebt_stp.so, skipping

Failed to write squashfs-root/usr/lib/libebt_ulog.so, skipping

Failed to write squashfs-root/usr/lib/libebt_vlan.so, skipping

Failed to write squashfs-root/usr/lib/libebtable_broute.so, skipping

Failed to write squashfs-root/usr/lib/libebtable_filter.so, skipping

Failed to write squashfs-root/usr/lib/libebtable_nat.so, skipping
[========================================================================================================\

          ] 2575/4584  56%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libebtc.so, skipping
[========================================================================================================\

          ] 2576/4584  56%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libecall.so, skipping
[========================================================================================================\

          ] 2578/4584  56%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libengineplugin.so.1.0.0, skipping
[========================================================================================================\

          ] 2579/4584  56%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libepsimulator.so.1.0.0, skipping
[========================================================================================================\

          ] 2580/4584  56%
gzip uncompress failed with error code -3
[========================================================================================================\

          ] 2581/4584  56%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libexpat.so.1.6.5, skipping

Failed to write squashfs-root/usr/lib/libext4_utils.so.0.0.0, skipping
[========================================================================================================\

          ] 2583/4584  56%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libffi.so.6.0.4, skipping

Failed to write squashfs-root/usr/lib/libflp.so, skipping
[========================================================================================================\

          ] 2585/4584  56%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libfs_mgr.so.0.0.0, skipping

Failed to write squashfs-root/usr/lib/libgarden.so, skipping
[========================================================================================================\

          ] 2587/4584  56%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[=========================================================================================================\

         ] 2589/4584  56%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libgarden_haltests_e2e.so, skipping
[=========================================================================================================\

         ] 2591/4584  56%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libgardencasesample.so, skipping
[=========================================================================================================\

         ] 2592/4584  56%
gzip uncompress failed with error code -3
[=========================================================================================================\

         ] 2593/4584  56%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[=========================================================================================================\

         ] 2595/4584  56%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[=========================================================================================================\

         ] 2597/4584  56%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libgcrypt.so.20.2.0, skipping

Failed to write squashfs-root/usr/lib/libgdtap_adapter.so.1.0.0, skipping
[=========================================================================================================\

         ] 2600/4584  56%
gzip uncompress failed with error code -3
[=========================================================================================================\

         ] 2601/4584  56%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libgeofence.so.1.0.0, skipping
[=========================================================================================================\

         ] 2602/4584  56%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[=========================================================================================================\

         ] 2604/4584  56%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[=========================================================================================================\

         ] 2606/4584  56%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[=========================================================================================================\

         ] 2608/4584  56%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[=========================================================================================================\

         ] 2610/4584  56%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[=========================================================================================================\

         ] 2612/4584  56%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libgio-2.0.so.0.5200.3, skipping
[==========================================================================================================\

        ] 2614/4584  57%
gzip uncompress failed with error code -3
[==========================================================================================================\

        ] 2615/4584  57%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[==========================================================================================================\

        ] 2617/4584  57%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[==========================================================================================================\

        ] 2619/4584  57%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[==========================================================================================================\

        ] 2621/4584  57%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libglib-2.0.so.0.5200.3, skipping

Failed to write squashfs-root/usr/lib/libgmodule-2.0.so.0.5200.3, skipping
[==========================================================================================================\

        ] 2624/4584  57%
gzip uncompress failed with error code -3
[==========================================================================================================\

        ] 2625/4584  57%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[==========================================================================================================\

        ] 2627/4584  57%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libgmp.so.10.3.2, skipping
[==========================================================================================================\

        ] 2628/4584  57%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libgnss.so, skipping

Failed to write squashfs-root/usr/lib/libgnsspps.so.1.0.0, skipping
[==========================================================================================================\

        ] 2631/4584  57%
gzip uncompress failed with error code -3
[==========================================================================================================\

        ] 2632/4584  57%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[==========================================================================================================\

        ] 2634/4584  57%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[==========================================================================================================\

        ] 2636/4584  57%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[===========================================================================================================\

       ] 2638/4584  57%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[===========================================================================================================\

       ] 2640/4584  57%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libgnutls.so.30.14.5, skipping
[===========================================================================================================\

       ] 2642/4584  57%
gzip uncompress failed with error code -3
[===========================================================================================================\

       ] 2643/4584  57%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libgobject-2.0.so.0.5200.3, skipping
[===========================================================================================================\

       ] 2645/4584  57%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libgpg-error.so.0.22.0, skipping
[===========================================================================================================\

       ] 2646/4584  57%
gzip uncompress failed with error code -3
[===========================================================================================================\

       ] 2647/4584  57%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libgps.so, skipping
[===========================================================================================================\

       ] 2648/4584  57%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libgps_utils.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/libgthread-2.0.so.0.5200.3, skipping
[===========================================================================================================\

       ] 2650/4584  57%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libhardware.so.0.0.0, skipping

Failed to write squashfs-root/usr/lib/libhdcp1prov.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/libhdcp2p2prov.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/libhistory.so.7.0, skipping
[===========================================================================================================\

       ] 2654/4584  57%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libhogweed.so.4.3, skipping

Failed to write squashfs-root/usr/lib/libiam20680sensors.so.1.0.0, skipping
[===========================================================================================================\

       ] 2657/4584  57%
gzip uncompress failed with error code -3
[===========================================================================================================\

       ] 2658/4584  57%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libidn.so.11.6.16, skipping
[===========================================================================================================\

       ] 2659/4584  58%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libip4tc.so.0.1.0, skipping

Failed to write squashfs-root/usr/lib/libip6tc.so.0.1.0, skipping

Failed to write squashfs-root/usr/lib/libipanat.so.1.0.0, skipping
[============================================================================================================\

      ] 2665/4584  58%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libiperf.so.0.0.0, skipping

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[============================================================================================================\

      ] 2666/4584  58%
Failed to write squashfs-root/usr/lib/libiptc.so.0.0.0, skipping

Failed to write squashfs-root/usr/lib/libizat_client_api.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/libizat_core.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/libjson-c.so.2.0.2, skipping

Failed to write squashfs-root/usr/lib/liblbs_core.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/liblmclient.so, skipping

Failed to write squashfs-root/usr/lib/libloc_api_v02.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/libloc_base_util.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/libloc_core.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/libloc_eng_hub.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/libloc_epDr.so.1.0.0, skipping

Failed to write
squashfs-root/usr/lib/libloc_externalDrcoreqdr2.so.1.0.0, skipping

Failed to write
squashfs-root/usr/lib/libloc_externalDrcoreqdr3.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/libloc_mq_client.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/libloc_net_iface.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/libloc_qsocket.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/liblocation_api.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/liblocation_client_api.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/liblocationservice.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/liblocationservice_glue.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/liblocdiagiface.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/liblog.so.0.0.0, skipping

Failed to write squashfs-root/usr/lib/liblogwrap.so.0.0.0, skipping

Failed to write squashfs-root/usr/lib/liblowi_client.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/liblzo2.so.2.0.0, skipping

Failed to write squashfs-root/usr/lib/libmcm.so.0.0.0, skipping

Failed to write squashfs-root/usr/lib/libmcm_log_util.so.0.0.0, skipping

Failed to write squashfs-root/usr/lib/libmcm_srv_audio.so.0.0.0, skipping

Failed to write squashfs-root/usr/lib/libmcm_ssr_util.so.0.0.0, skipping

Failed to write squashfs-root/usr/lib/libmcmipc.so.0.0.0, skipping

Failed to write squashfs-root/usr/lib/libmincrypt.so.0.0.0, skipping

Failed to write squashfs-root/usr/lib/libmockcutils.so.1.0.0, skipping

Failed to write squashfs-root/usr/lib/libnas.so, skipping

Failed to write squashfs-root/usr/lib/libnetfilter_conntrack.so.3.1.3, skipping

Failed to write squashfs-root/usr/lib/libnettle.so.6.3, skipping

Failed to write squashfs-root/usr/lib/libopenavb.so, skipping

Failed to write squashfs-root/usr/lib/libpcap.so.1.8.1, skipping
[================================================================================================================\

  ] 2768/4584  60%
Failed to write squashfs-root/usr/lib/libperl.so.5.24.1, skipping
[=====================================================================================================================\
                                                                    ]
2899/4584  63%
gzip uncompress failed with error code -3
[=====================================================================================================================\
                                                                    ]
2900/4584  63%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libslimcommon.so.1.0.0, skipping
[=====================================================================================================================\
                                                                    ]
2905/4584  63%
gzip uncompress failed with error code -3
[=====================================================================================================================\
                                                                    ]
2906/4584  63%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[======================================================================================================================\
                                                                   ]
2910/4584  63%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libsqlite3.so.0.8.6, skipping
[======================================================================================================================\
                                                                   ]
2913/4584  63%
gzip uncompress failed with error code -3
[======================================================================================================================\
                                                                   ]
2914/4584  63%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libssl.so.1.0.2, skipping
[======================================================================================================================\
                                                                   ]
2916/4584  63%
gzip uncompress failed with error code -3
[======================================================================================================================\
                                                                   ]
2917/4584  63%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[======================================================================================================================\
                                                                   ]
2919/4584  63%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[======================================================================================================================\
                                                                   ]
2921/4584  63%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[======================================================================================================================\
                                                                   ]
2923/4584  63%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3
[======================================================================================================================\
                                                                   ]
2925/4584  63%
gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libstdc++.so.6.0.22, skipping
[======================================================================================================================\
                                                                   ]
2928/4584  63%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libtelux_audio.so, skipping
[======================================================================================================================\
                                                                   ]
2930/4584  63%
gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

gzip uncompress failed with error code -3

Failed to write squashfs-root/usr/lib/libtelux_common.so, skipping
[==========================================================================================================================================================================================|]
4584/4584 100%
created 2703 files
created 285 directories
created 1262 symlinks
created 62 devices
created 0 fifos

On Thu, Sep 12, 2019 at 10:32 AM Boris Stein <boris.stein@gmail.com> wrote:
>
> I now have similar problem with different image, in our system we have
> rootfs ubi and recovery ubi.
> I created a new recovery ubi and flashed it with "fastboot flash" command.
> Tried to boot into recovery mode and got similar error that i got from
> rootfs ubi:
>
> [    5.890160] ubi0: attaching mtd22
> [    6.046149] ubi0: scanning is finished
> [    6.057618] ubi0: volume 1 ("recoveryfs") re-sized from 47 to 123 LEBs
> [    6.058478] ubi0: attached mtd22 (name "recoveryfs", size 43 MiB)
> [    6.063089] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
> [    6.069193] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
> [    6.075978] ubi0: VID header offset: 4096 (aligned 4096), data offset: 8192
> [    6.082842] ubi0: good PEBs: 172, bad PEBs: 0, corrupted PEBs: 0
> [    6.089591] ubi0: user volume: 2, internal volumes: 1, max. volumes
> count: 128
> [    6.095862] ubi0: max/mean erase counter: 126/67, WL threshold:
> 4096, image sequence number: 1118681957
> [    6.102890] ubi0: available PEBs: 0, total reserved PEBs: 172, PEBs
> reserved for bad PEB handling: 40
> [    6.112542] ubi0: background thread "ubi_bgt0d" started, PID 207
> [    6.121653] qcom,qpnp-rtc
> c440000.qcom,spmi:qcom,pmxpoorwills@0:qcom,pmxpoorwills_rtc: setting
> system clock to 1970-01-09 15:40:59 UTC (747659)
> [    6.121718] cpuidle: enable-method property 'psci' found operations
> [    6.122358] lpm_levels_of: Residency < 0 for LPM
> [    6.122363] lpm_levels_of: idx 1 420
> [    6.122365] lpm_levels_of: Residency < 0 for LPM
> [    6.122368] lpm_levels_of: idx 2 500
> [    6.122371] lpm_levels_of: idx 2 3040
> [    6.122595] lpm_levels: register_cluster_lpm_stats()
> [    6.124767] rmnet_ipa3 started initialization
> [    6.125782] RNDIS_IPA module is loaded.
> [    6.125783] audio_pdr_late_init get_service_location failed ret -19
> [    6.126374] msm_bus_late_init: Remove handoff bw requests
> [    6.140613] emac_phy: disabling
> [    6.140620] rgmii_io_pads: disabling
> [    6.140628] vreg_wlan: disabling
> [    6.140632] ALSA deviã[    6.205886] Freeing unused kernel memory: 1024K
> /etc/mdev/iio.sh: .: line 19: can't open
> '/sys/bus/i2c/devices/*-006*/iio:device?*/uevent'
> /etc/mdev/iio.sh: .: line 19: can't open
> '/sys/bus/i2c/devices/*-006*/iio:device?*/uevent'
> mkdir: can't create directory '/mnt/sdcard/': No such file or directory
> mount: mounting /dev/mmcblk0p1 on /mnt/sdcard/ failed: No such file or directory
> MTD : Detected block device : 22 for recoveryfs
> [    7.062327] ubi: mtd22 is already attached to ubi0ubiattach:
> error!: cannot attach mtd22
>            error 17 (File exists)
> [    7.103812] Waiting for ubinfo for recoveryfs
> [    7.103991] Done ubinfo for recoveryfs, volume ID: 1
> [    7.107239] Waiting for /dev/ubi0_1
> [    7.112617] Done waiting for /dev/ubi0_1
> [    7.121111] block ubiblock0_1: created from ubi0:1(recoveryfs)
> [    7.121735] Waiting for /dev/ubiblock0_1
> [    7.189342] Done waiting for /dev/ubiblock0_1
> [    7.220706] Waiting for ubinfo for md-recoveryfs
> [    7.220894] Done ubinfo for md-recoveryfs, volume ID: 0
> [    7.224486] Waiting for /dev/ubi0_0
> [    7.229447] Done waiting for /dev/ubi0_0
> [    7.238403] block ubiblock0_0: created from ubi0:0(md-recoveryfs)
> [    7.239025] Waiting for /dev/ubiblock0_0
> [    7.305156] Done waiting for /dev/ubiblock0_0
> [    7.436322] 1911 device_is_secure: #########################
> device_is_secure=0
> [    7.453434] mount (277) used greatest stack depth: 6004 bytes left
> mount: mounting /dev on /system/dev failed: Invalid argument
> mount: mounting /dev/pts on /system/dev/pts failed: No such file or directory
> [    7.627410] SQUASHFS error: zlib decompression failed, data probably corrupt
> [    7.627449] SQUASHFS error: squashfs_read_data failed to read block 0x1e97f5
> [    7.645982] SQUASHFS error: zlib decompression failed, data probably corrupt
> [    7.646018] SQUASHFS error: squashfs_read_data failed to read block 0x1e97f5
> [    7.670215] Kernel panic - not syncing: Attempted to kill init!
> exitcode=0x00000007
> [    7.670215]
> [    7.670249] CPU: 0 PID: 1 Comm: init Not tainted 4.9.155 #1
> [    7.678403] Hardware name: Qualcomm Technologies, Inc. SDX
> POORWILLS (Flattened Device Tree)
> [    7.683728] [<c010e784>] (unwind_backtrace) from [<c010bab8>]
> (show_stack+0x10/0x14)
> [    7.692390] [<c010bab8>] (show_stack) from [<c01bf188>] (panic+0x13c/0x340)
> [    7.700115] [<c01bf188>] (panic) from [<c011eb78>] (do_exit+0x4d8/0xa10)
> [    7.706796] [<c011eb78>] (do_exit) from [<c01202e8>]
> (do_group_exit+0xb8/0xbc)
> [    7.713741] [<c01202e8>] (do_group_exit) from [<c012a000>]
> (get_signal+0x538/0x578)
> [    7.720774] [<c012a000>] (get_signal) from [<c010ae4c>]
> (do_signal+0x74/0x3f4)
> [    7.728325] [<c010ae4c>] (do_signal) from [<c010b358>]
> (do_work_pending+0x78/0xbc)
> [    7.735616] [<c010b358>] (do_work_pending) from [<c01078f4>]
> (slow_work_pending+0xc/0x20)
> [    7.943190] ipa ipa3_active_clients_panic_notifier:259
>
>
> I then boot no normal rootfs. and i can ubiattach recovry partition
> and mount recoveryfs volume:
>
> ~ # ubiattach -p /dev/mtd22
> [ 50.903364] ubi2: attaching mtd22
> [ 51.060835] ubi2: scanning is finished
> [ 51.066292] CHRDEV "ubi2" major number 226 goes below the dynamic
> allocation range
> [ 51.067865] ubi2: attached mtd22 (name "recoveryfs", size 43 MiB)
> [ 51.100394] ubi2: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
> [ 51.100427] ubi2: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
> [ 51.106160] ubi2: VID header offset: 4096 (aligned 4096), data offset: 8192
> [ 51.120237] ubi2: good PEBs: 172, bad PEBs: 0, corrupted PEBs: 0
> [ 51.120269] ubi2: user volume: 2, internal volumes: 1, max. volumes count: 128
> [ 51.150477] ubi2: max/mean erase counter: 127/67, WL threshold: 4096,
> image sequence number: 1118681957
> [ 51.150514] ubi2: available PEBs: 0, total reserved PEBs: 172, PEBs
> reserved for bad PEB handling: 40
> [ 51.158691] ubi2: background thread "ubi_bgt2d" started, PID 1607
> UBI device number 2, total 172 LEBs (43679744 bytes, 41.6 MiB),
> available 0 LEBs (0 bytes), LEB size 253952 bytes (248.0 KiB)
> ~ #
> ~ #
>
> ~ # ubiblock --create /dev/ubi2_1
> [ 151.715001] block ubiblock2_1: created from ubi2:1(recoveryfs)
> ~ # mount -t squashfs /dev/ubiblock2_ /tmp/recovery
> ubiblock2_0 ubiblock2_1
> ~ # mount -t squashfs /dev/ubiblock2_1 /tmp/recovery
> ~ # cd /tmp/recovery/
> /var/volatile/tmp/recovery # ls -l
> total 0
> drwxr-xr-x 2 root root 3 Sep 11 2019 app
> drwxr-xr-x 2 root root 3175 Sep 12 2019 bin
> drwxr-xr-x 2 root root 3 Sep 11 2019 boot
> drwxr-xr-x 2 root root 3 Sep 12 2019 cache
> drwxr-xr-x 2 root root 36 Sep 12 2019 data
> drwxr-xr-x 2 root root 826 Sep 12 2019 dev
> drwxr-xr-x 22 root root 971 Sep 12 2019 etc
> drwxr-xr-x 2 root root 3 Sep 11 2019 firmware
> drwxr-xr-x 21 root root 289 Sep 12 2019 home
> drwxr-xr-x 5 root root 1343 Sep 12 2019 lib
> drwxr-xr-x 12 diag diag 134 Sep 11 2019 media
> drwxr-xr-x 2 root root 3 Sep 12 2019 misc
> drwxr-xr-x 4 root root 41 Sep 12 2019 mnt
> drwxr-xr-x 2 root root 3 Sep 11 2019 proc
> drwxr-xr-x 2 root root 45 Sep 12 2019 res
> drwxr-xr-x 2 root root 3 Sep 11 2019 rom
> drwxr-xr-x 2 root root 3 Sep 12 2019 run
> drwxr-xr-x 2 root root 2235 Sep 12 2019 sbin
> lrwxrwxrwx 1 root root 11 Sep 11 2019 sdcard -> /mnt/sdcard
> drwxr-xr-x 3 root root 29 Sep 11 2019 share
> drwxr-xr-x 2 root root 3 Sep 11 2019 sys
> drwxr-xr-x 2 root root 3 Sep 12 2019 system
> drwxr-xr-x 2 root root 3 Sep 11 2019 systemrw
> lrwxrwxrwx 1 root root 8 Sep 11 2019 tmp -> /var/tmp
> drwxr-xr-x 10 root root 140 Sep 12 2019 usr
> drwxr-xr-x 8 root root 141 Sep 11 2019 var
>
>
> I can see files and read them inside /tmp/recovery.
> But if i try to chroot from system root to recovery root , i get:
>
> /var/volatile/tmp/recovery/etc # cd /
> / # chroot /tmp/recovery
> [ 1556.782747] SQUASHFS error: zlib decompression failed, data probably corrupt
> [ 1556.782786] SQUASHFS error: squashfs_read_data failed to read block 0x1e97f5
> [ 1556.801516] SQUASHFS error: zlib decompression failed, data probably corrupt
> [ 1556.801554] SQUASHFS error: squashfs_read_data failed to read block 0x1e97f5
> Bus error
>
>
> Same as when booting "recovery".
> Our squashfs images created with:
> mksquashfs ${IMAGE_ROOTFS} ${OUTPUT_FILE_SYSTEM_SQ} -noappend -b 128K
> -no-fragments -xattrs -noI
> We run Kernel
> [    0.000000] Linux version 4.9.155 (oe-user@oe-host) (gcc version
> 6.4.0 (GCC) ) #1 PREEMPT Wed Sep 11 11:52:26 UTC 2019
>
>
> On Wed, Sep 11, 2019 at 4:24 PM David Oberhollenzer
> <david.oberhollenzer@sigma-star.at> wrote:
> >
> > On 9/11/19 2:41 PM, Boris Stein wrote:
> > > Which tool should I use for dumping squashfs volume?
> > >
> >
> > I would try to either use dd on the ubiblock which you are trying to mount,
> > or cat on the underlying ubi volume and pipe it into a file.
> >
> > It shouldn't matter if there's extra garbage at the end. The SquashFS super
> > block specifies the exact size of the image.
> >
> > Regards,
> >
> > David
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: cannot ubiupdatevol squashfs image
  2019-09-19 11:54           ` Boris Stein
@ 2019-09-19 13:08             ` David Oberhollenzer
  0 siblings, 0 replies; 8+ messages in thread
From: David Oberhollenzer @ 2019-09-19 13:08 UTC (permalink / raw)
  To: Boris Stein; +Cc: Richard Weinberger, linux-mtd

On 9/19/19 1:54 PM, Boris Stein wrote:
> Hi,
> below are errors of unsquashfs for ubiblock.
> 
From your logs you seem to be getting the same errors as for mounting
the image.

> Is there anything else that can help debug this?
> 

Browsing through the last mail, saw that you generate the image with
the -noI option, which means that inodes are uncompressed. So they
could in theory be corrupted but still partially readable, leading to
accessing the data area at off locations or trying to access non existent
fragments.

Can you try it without the -noI option? If the meta data gets corrupted,
you should get an error about that before the kernel tries to access the


Could you try out the following, to check if UBI causes the damages to
your SquashFS image:

 - Create a fresh SquashFS image
 - Verify that you can also unpack the original image again without errors
 - Write it to ubiblock
 - Dump it back from the ubiblock
 - Check again on the dumped image
 - compare checksums of the original and the dumped image


Again, there are a bunch of non-standard messages in your kernel boot log.
Do you use any 3rd party out-of tree modules that could potentially be
interfering?


Regards,

David

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-09-19 13:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-10 13:10 cannot ubiupdatevol squashfs image Boris Stein
2019-09-10 19:31 ` Richard Weinberger
2019-09-10 23:55   ` David Oberhollenzer
2019-09-11 12:41     ` Boris Stein
2019-09-11 13:24       ` David Oberhollenzer
2019-09-12  7:32         ` Boris Stein
2019-09-19 11:54           ` Boris Stein
2019-09-19 13:08             ` David Oberhollenzer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).