Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp27295pxb; Mon, 8 Nov 2021 09:11:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJxF+HJtzfTXjPNDq6kJYJRvZh41yt4m/PnXk9Q2Xx2C5EQWz/iYDiHiJOpmHGmbhcNZYYIx X-Received: by 2002:a6b:7705:: with SMTP id n5mr444616iom.173.1636391512703; Mon, 08 Nov 2021 09:11:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636391512; cv=none; d=google.com; s=arc-20160816; b=FIT4+DywudkjG6m/+DAfuJWA0Cq7j+XaTir8wHaNlRfiMIyhXFwjNknru5PakyXnjG VVxyr9HXLIs6STmbJHXM5aTRYZmZl1PIeqLknyS2KyzEBtWuAO446q6kLbe/i1OYBT/F GHq5/SFfBrOS3LRmXJ69rZ1hMsEmRC+6J0z+aA+n/q8qq7NE0itKkijH/c+XWxtir49W a7c6JVWRSygCYBjo+VC0WTvSMchU+aTc60pIVkt7hCB9wmdAOGPyhcWTR/8vHcOHAuc9 p9j4cQUpmsUmKIEWmu9AnFdUwpVm4qai9G65O0cy4Gq/YAArtvpGZdrHG6nP0gVFQ22H E0RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:subject:message-id:date:from:mime-version :dkim-signature; bh=w24kyLgv/+tRpo8I42SDBKmopyeaJ4ePm0P/HuK8v0E=; b=Lmk6ggjBhKT/msEddhO45oR/97k3rWTAO9X/aJpxNj2112ZK5n3p3qm4PL1BDXWu0C +MZH7MezVVLKm/c70U3tgqYcsD1zsxfx8SWDNjyiNYXjru/5PdfxYlDT1SJzNjLcVDM1 O0uaR9V2DG4LwZ8QB3x5xJOZlj3ELPK36kjvMttEZSGA3cby7O8OF9OPN5yt5tv1qEK6 7OEZ+ZxHwOzrdkAFY9uHEpFltOwY6iBZ/tGyHoteevpyScxk4akofc2bkHMnKCCf+DOO 6DN9zzWqHWoTijVkW7T3vXwGraD1uhVFzGJFefIW+vWhcMZAAYEL6ohAJwQqnQOKeORp M8KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="l53/lifR"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l4si33918989jad.89.2021.11.08.09.11.39; Mon, 08 Nov 2021 09:11:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="l53/lifR"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239564AbhKHOd6 (ORCPT + 99 others); Mon, 8 Nov 2021 09:33:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239345AbhKHOd4 (ORCPT ); Mon, 8 Nov 2021 09:33:56 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D812FC061570; Mon, 8 Nov 2021 06:31:11 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id m14so62605320edd.0; Mon, 08 Nov 2021 06:31:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=w24kyLgv/+tRpo8I42SDBKmopyeaJ4ePm0P/HuK8v0E=; b=l53/lifRs1L0mG2kiETTRBZoz7tuhX3GfAlMA83P6/EM9J/SfWiCyNxfD0vjjMjRql nnMiiXKVxw9GzR5vOB5day8YfYg2RUJ7Bz6oNgahsA01Y3FoBKgdFvG+mEhFJEbTwnUD 4zixvM+wmiM9SSJ4zEqFtwRoyCqTD12Ul5q7ZV3Rf2GcxBMKe7t57/gqG5jZViiNa9FZ XrW/j0WrpqNw/6jTHj9yeN5JG4pELl6o4tVANMEVPlg+1Y+inYSinG0UuhtubJ85nlMW /7Oh5ZEWltTX/VBTo0qVamuiuee7e1Sq2P1S0sCRJQ7x28GX2MQMc9TlGuVrwI6X13xO YXOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=w24kyLgv/+tRpo8I42SDBKmopyeaJ4ePm0P/HuK8v0E=; b=4DOrQwtOBfMPSef9/ksbBKfYj2gIssZCzqRFZzV2PmurAN2BTp0igqKOzqlD0OrUe+ gBP+578LYKWcYr7c44TNRuz+ZoREBEl+qm6UOI9egb5nPDAbtOXGAQgF3pwF7hpkyMLv XY8JKEsYvKddubWc9P8uWj1JckD1HLMLEFJoM9U8wdyzm8EpZWnyNJf4uMHpoXRQjpDK TDEHRpHFq1Vyzz/tx/ENKScs/JBbxzFZq3DXapGWEO9Lg3OqHh/M2BLNM3Me76tipXnt HyL0Yl4xxCazdxr4SvoPbPRynP0AYeWEbTeTEO75skJ63CbfMqw7TyznAwR5o0bPEliM cCVw== X-Gm-Message-State: AOAM5322JHqVCoAKv829tHJgOCTKWMtC8EsHOYgsJEmCDTTi8lSuYzJu lnsMEqfev2obXyRde36+iKMHJ3UVDBekywrWko5x3tTLYw2mfw== X-Received: by 2002:a17:906:2ad2:: with SMTP id m18mr384079eje.64.1636381865427; Mon, 08 Nov 2021 06:31:05 -0800 (PST) MIME-Version: 1.0 From: Pintu Agarwal Date: Mon, 8 Nov 2021 20:00:54 +0530 Message-ID: Subject: Kernel-4.14: With ubuntu-18.04 building rootfs images and booting gives SQUASHFS error: xz decompression failed, data probably corrupt To: open list , linux-mtd , linux-fsdevel , dm-devel@redhat.com, Phillip Lougher , Mikulas Patocka , Richard Weinberger , Florian Fainelli Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Here are few details. * Linux Kernel: 4.14 * Processor: Qualcomm Arm32 Cortex-A7 * Storage: NAND 512MB * Platform: Simple busybox * Filesystem: UBIFS, Squashfs * Build system: Linux Ubuntu 18.04 with Yocto build system * Consists of nand raw partitions, squashfs ubi volumes. What we are trying to do: We are trying to boot dm-verity enabled rootfs on our system. The images for rootfs were generated on Ubuntu 18.04 machine using Yocto build system. Issue: Earlier, when we were using Ubuntu 16.04 to generate our images, the system was booting fine even with dm-verity enabled. Recently we switched to Ubuntu 18.04 build machine, and now with the same changes we are seeing the below squashfs error, just after the mount. Note: with 18.04 also our rootfs is mounting successfully and dm-verity is also working fine. We only get these squashfs errors flooded in the boot logs: {{{ .... [ 5.153479] device-mapper: init: dm-0 is ready [ 5.334282] VFS: Mounted root (squashfs filesystem) readonly on device 253:0. .... [ 8.954120] SQUASHFS error: xz decompression failed, data probably corrupt [ 8.954153] SQUASHFS error: squashfs_read_data failed to read block 0x1106 [ 8.970316] SQUASHFS error: Unable to read data cache entry [1106] [ 8.970349] SQUASHFS error: Unable to read page, block 1106, size 776c [ 8.980298] SQUASHFS error: Unable to read data cache entry [1106] [ 8.981911] SQUASHFS error: Unable to read page, block 1106, size 776c [ 8.988280] SQUASHFS error: Unable to read data cache entry [1106] .... }}} Note: For dm-verity wwe are trying to append the verity-metadata as part of our rootfs image like this: ... 218 + with open(verity_md_img, "rb") as input_file: 219 + with open(sparse_img, "ab") as out_file: 220 + for line in input_file: 221 + out_file.write(line) .... These changes work fine when we build it with Ubuntu 16.04. So, we are wondering what could be the issue with Ubuntu 18.04 build ? If there is any history about it please let us know. Regards, Pintu