From patchwork Fri Jul 28 14:33:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Koch X-Patchwork-Id: 13332008 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B48E7C001E0 for ; Fri, 28 Jul 2023 14:33:57 +0000 (UTC) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (EUR01-HE1-obe.outbound.protection.outlook.com [40.107.13.47]) by mx.groups.io with SMTP id smtpd.web10.33541.1690554831169870021 for ; Fri, 28 Jul 2023 07:33:52 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@siemens.com header.s=selector2 header.b=FzyJ1Plp; spf=pass (domain: siemens.com, ip: 40.107.13.47, mailfrom: stefan-koch@siemens.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c+gvrjqv3pltOzjyrC+FqiHUTS5rETteKsxVlJoRNSfGpaDTiGchtot/0AXnm61WajEyzQxKVX7PkIdrKREHmPPTqwquydynnslB3XhguQltyRTqPHpYp2jGo1KOEkBokZZ9IY5CHfGVs8FnV86hFy+GCfcxSWeEi7p0Q95QMbkpS2XVJ/wylSvVeUpRNQRjPx9mAww/guL+FKbOs64ds3vFRK7YtRaB9uQrF5Qzu1swu4EXk6ujuw5lXb5BqxkBwLODgXFvqQxtGciLPBToGasS3iRhqncFhuE4yVcMGCurrbsH6dOs0MD0qDduHfI63GaqVXWtKmMxsO9zI4FwZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JXWO8n74CtrSAEi2frAhiTsr6xYYzxXS1cb7ZFGEeCs=; b=O9nvfYZd7KRFgArQEdM2GdO351Wrl1OjtqR7J+7a0rvI/ae4QSh+pulaCP1MWxSNCwW2cCVKoQjBB+MkzNlp3Q1WDxsGtF3j4Xt/2AJR/aWL9gzjj5qcKKtSj0VGSSYdxZfENEe3jSuAdu3pmUriPhNFZc+6QTUiy5m2Koaiiq+rphaqLYQbksILmLDeXBuBXdlpE6jfNJNAI/RHMe9ufSFgyDJT7BTTJe/SrF3w+UtKw8eV0HXD5WbXyE6gNfzIVzkjRDw5TLP2CWiWYthAAG2waa03TLosUzIHJOb8w2uMZkH7lQLI0GrAIdJf4hiG1pqRyODGirohjzQYoJrhdQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JXWO8n74CtrSAEi2frAhiTsr6xYYzxXS1cb7ZFGEeCs=; b=FzyJ1Plpkm6OBgLo+DzfOAFFhm9fszBFxAzhFON3LdIBW67yq5pZ/YjgL1rVK1znO4rS2FVReCRjbYM1BvFYesl8XhyRtrtPBuri31Lm4OR6a5ck2l41E6IkgiNfSRzK+UORCUikD4bHDd5Eslge8QjT8u9sPyphRAg0+Otww11M+wrBuWISWjdr+2Cpck38GmWbHQ+ficEPE3wxflua3N0/yQ855jSeHhHJUI4mYS5cnQizAd2/etYAXIGSuiioJinNfD67RGlfhYVbQxDb4hUDvstRcOYBiHkrUn33Q43NxSChE69k2MPY30gV8GZnZ5FXVuux9AyKtkUo520jwA== Received: from AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:41e::11) by VI1PR10MB3151.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:135::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Fri, 28 Jul 2023 14:33:47 +0000 Received: from AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM ([fe80::b214:c3bf:bdd4:fd7a]) by AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM ([fe80::b214:c3bf:bdd4:fd7a%7]) with mapi id 15.20.6631.026; Fri, 28 Jul 2023 14:33:47 +0000 From: "Koch, Stefan" To: "cip-dev@lists.cip-project.org" CC: "Kiszka, Jan" , "Storm, Christian" , "Adler, Michael" , "Sudler, Simon" , "Koch, Stefan" Subject: [isar-cip-core][PATCH 1/4] initramfs-crypt-hook: Avoid data loss in case of resize2fs failure Thread-Topic: [isar-cip-core][PATCH 1/4] initramfs-crypt-hook: Avoid data loss in case of resize2fs failure Thread-Index: AQHZwWCEoWvlLDxJ60qh5tlm3HfV7Q== Date: Fri, 28 Jul 2023 14:33:47 +0000 Message-ID: <20230728143320.3891194-2-stefan-koch@siemens.com> References: <20230728143320.3891194-1-stefan-koch@siemens.com> In-Reply-To: <20230728143320.3891194-1-stefan-koch@siemens.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.39.2 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM9PR10MB4959:EE_|VI1PR10MB3151:EE_ x-ms-office365-filtering-correlation-id: 3e157dd5-22f5-4976-369b-08db8f77a777 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0iPJfAI/jbyzSsO6TAJpRDGfYUD8xk3PfXVkeCX1HTcF9o9BPgBsubCr3Kz/sHK8z+btK60wRsa6w4JKm4l+l6nSsT1IWDEfmzXG/jcWbhOPhYlM/o2rOrEP4c9veRUereBOfSe5CzgDR6olmCUrY/Meqape/gUMUU9kRd3KfJTsDnRvkV0C2Uecc+Qpea7ZtGMrqlAvXtwYFwJRHvglk4SucuU3L+6baeIYyv9a3HthA14VxXM2hOUNcP+9bgmhpVsmf2INMrkdlkkK15U1jBAGC/fLZpeQ561STheityxNAXAYcN2nlfC5LxSosCoiXIwp4l7V+zlc59covgL0Gl/YzuDPIFYudRog6JWQaTlSVMDwQ3uv0jsTkGlwPjY+PYZL+f1+OPqUbH13gHgK4Krh6JMKQxQpPRIe4ef+Qoihi3uZwz914PQvEe1F6sDOVbgSB+RYFtpemreiYNsdM0v+/caBU1DNNLj9Qev4bht8MGgE+1bCugJxR0eE8jD4R/CKL0843J6pf/OFzkcxGAMDEeF1lybWIm9KRPSxWBtR2QoXfyP/NjlQNzVpZaZxa4L3HkDZUXxnPbXavQv+W+NUVdrDvEPAaxZBUQ2fVBzpWmEqt7XKSN06atWSuZ/a x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(396003)(376002)(366004)(346002)(136003)(451199021)(1076003)(82960400001)(26005)(6506007)(478600001)(54906003)(186003)(107886003)(71200400001)(122000001)(6486002)(64756008)(66476007)(66446008)(4326008)(6916009)(2616005)(83380400001)(6512007)(38100700002)(66556008)(91956017)(76116006)(66946007)(5660300002)(41300700001)(38070700005)(316002)(2906002)(8936002)(8676002)(86362001)(36756003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?OZPYfjc/zjilEI8d53KVcLN?= =?iso-8859-1?q?9jcm6ZO3+rysEyRqlYYeNVPpannckkjDusRFIPdnvvZ7Zb76LVX2DUWQaH8O?= =?iso-8859-1?q?JKJXDKTx9xr2lhqYKOLNutck3X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0oX3eq6lfuck?= =?iso-8859-1?q?OI0b9w8igx/d8we7/qT7zSpg/QScbMIiZdG+sFhL0Y7HcMvqs3BxSsG29UJj?= =?iso-8859-1?q?sKHv5vdAVcvnib6Ppzivqyl2UZqMDg5XGoKKj8jArzKboup+rjYimob5LGMc?= =?iso-8859-1?q?LiMdpQVdwi4z7mSWAkK5zHkpkdSO3fdLRneCxtfpwHr+yw8MOGAZklX7BCN0?= =?iso-8859-1?q?H+uzBX6THghMccps08zStHtbN+CErLBB+JQzEpV1uruqdwnQayBRpUhXbN6L?= =?iso-8859-1?q?g9f/TkEy0LBsMY+6B9Nln5q9Z5L2dDWgagEYC2cKBd2BUWsz4SN8qVhJ8yQe?= =?iso-8859-1?q?7SUtuZ4N5+Z1mE9wegmkrg9eAEj2w06rXSkE4on2J10SV/XC8A7vq/x/OWIF?= =?iso-8859-1?q?JZLC8DpfIhXgvwbDFYj/RQ9C6sVCt3oJsu8flD3PYJGiUAnUpYjCkp+tm0R2?= =?iso-8859-1?q?wfmm12MVBJU+WxiCID64tzlqXQ4SuQuYlR0D/rNmQXPI4CeERhKH5MI7+lXO?= =?iso-8859-1?q?x81tkFajkXsGhVH9qsbPoFih1c1lav7/MOMcNieQasumrczij4v+mDkQSBs1?= =?iso-8859-1?q?sY+RQ6hUAkueFFMr8vRbWqroEREMVSK5a2q/EyBrvFboqG/MjHcrIdt0jKAr?= =?iso-8859-1?q?8i7v4D42gxn8kz6gsbsrmNtfEpl/biNGS/FWiqg=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 3e157dd5-22f5-4976-369b-08db8f77a777 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jul 2023 14:33:47.4965 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: qLEP5VrUM3CIAUZSZCe6yS7s2ScuS/QBMe02sA3rfJ2WoJGoxcrzR+LoQL+x21wIeB7i2gQLNESsPiKK1TKXPA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB3151 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 28 Jul 2023 14:33:57 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/12518 This prevents writing random data at reencryption after resize2fs had already failed. Signed-off-by: Stefan Koch --- .../files/encrypt_partition.systemd.script | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script index 330188a..83c3238 100644 --- a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script +++ b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script @@ -87,7 +87,9 @@ reencrypt_existing_partition() { reduced_size="$(expr "$part_size_blocks" - 65536 )" reduced_size_in_byte="$(expr "$reduced_size" \* 512)" reduced_size_in_kb="$(expr "$reduced_size_in_byte" / 1024)K" - resize2fs "$1" "${reduced_size_in_kb}" + if ! resize2fs "$1" "${reduced_size_in_kb}"; then + panic "reencryption of filesystem $1 cannot continue!" + fi if [ -x /usr/sbin/cryptsetup-reencrypt ]; then /usr/sbin/cryptsetup-reencrypt --new --reduce-device-size "$reduce_device_size"k "$1" < "$2" else From patchwork Fri Jul 28 14:33:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Koch X-Patchwork-Id: 13332006 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B490EC04E69 for ; Fri, 28 Jul 2023 14:33:57 +0000 (UTC) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (EUR01-HE1-obe.outbound.protection.outlook.com [40.107.13.47]) by mx.groups.io with SMTP id smtpd.web10.33541.1690554831169870021 for ; Fri, 28 Jul 2023 07:33:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@siemens.com header.s=selector2 header.b=TMWLgusa; spf=pass (domain: siemens.com, ip: 40.107.13.47, mailfrom: stefan-koch@siemens.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D7Ykwbtc+6z8T3G4/uzfX98J87tcwlRXQ8qTFyGvtAAbpMJ1PRgbZByioEUdjXsnVRfgkO0bl0yED2qlPe4B4GRMsoYvSM4N7KTPz17m+gg2rkPT4paI+ua7hGo7AtX8M5yf5eGe/vVxHIL0iRcfo2j+0cSdwZC7/mAx9ZnK/LJvzLCrfWqqd6cOwG7AeOqeciPyzR5UaiOJpxKhkxM7Px2SnD21NjmOypTO0RoN84Ab98HzyF1XUy28/heueCBriLgSK8jpi1fRnTKILEgkyvQcocyHHGWYv2nOC98izX3bRiHI1mPtWZbPxC71buoHOkRoYGWjCHBxMot2Z4rJqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pH34JxZTKpx0KBsI6L9ANHK8pNvV0CiA4QdsdqVS6/s=; b=MqMRZ34s2O3xXSLtjyWrkf3/lP/lGF/IwoCfnF/mB4kjqLSJMzg5T3IHEsLdC2akvxkqPsnxWE1cBX5Gvgr1LTNqMYGnxf/9vgteIgxM32AVZW49mynboMloQrhiddql+WfrGV+j7yYj1+H1DPWaXG8JykmbfAJ8ZtqlgjysWaX6cz1lvYUsWiGQ3yRUdqoK32Qnpie+8BOdFt6yP937x9fwYrFB6umAmcl0bauitR6hJSb9g4L0s2XbJqICZwTWWM3oOnd0U+4lM66pDRn+cD06FEXPpRqtyGqMelg7HmevbzYWxTu2VsXOIG7l+vIajbXOaL/7nzfVemSv2PqwjQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pH34JxZTKpx0KBsI6L9ANHK8pNvV0CiA4QdsdqVS6/s=; b=TMWLgusa+T5SsUfCO0lxy332b5Iay7xmX8EksRfHXkCLxRMmrEzLevsABXKwcg01YeOmLPe4MSF+evqbDpJYXoTwNXPhJop0LHjK/p4/KCz7SL3Hj7F0Ulnbom4BDvU6mkOhrppiEcynl/7JYrEpkqsmf39MjMwcvVhiSxCPzOw1XYew+dOsrkbfL4ttcNDUn0j3hGIg7TXp4um3gF79Xtp3dgsK18jQKCkptOuu+5BsuTOmR9rZcMdcA0fGvoCCGW6HC5aMhT7cHUSAjNheTYSlpCmprWkd6CT0Bw/dW7Es0YTgYRmtT5TarNaKRZJIR/9NtB8SyIjXp16gcSei4g== Received: from AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:41e::11) by VI1PR10MB3151.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:135::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Fri, 28 Jul 2023 14:33:49 +0000 Received: from AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM ([fe80::b214:c3bf:bdd4:fd7a]) by AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM ([fe80::b214:c3bf:bdd4:fd7a%7]) with mapi id 15.20.6631.026; Fri, 28 Jul 2023 14:33:49 +0000 From: "Koch, Stefan" To: "cip-dev@lists.cip-project.org" CC: "Kiszka, Jan" , "Storm, Christian" , "Adler, Michael" , "Sudler, Simon" , "Koch, Stefan" Subject: [isar-cip-core][PATCH 2/4] initramfs-crypt-hook: Check and repair filesystem to prevent resize2fs failure Thread-Topic: [isar-cip-core][PATCH 2/4] initramfs-crypt-hook: Check and repair filesystem to prevent resize2fs failure Thread-Index: AQHZwWCFfF8H8bWo9Um6DxiEYrEscw== Date: Fri, 28 Jul 2023 14:33:48 +0000 Message-ID: <20230728143320.3891194-3-stefan-koch@siemens.com> References: <20230728143320.3891194-1-stefan-koch@siemens.com> In-Reply-To: <20230728143320.3891194-1-stefan-koch@siemens.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.39.2 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM9PR10MB4959:EE_|VI1PR10MB3151:EE_ x-ms-office365-filtering-correlation-id: 99ec6704-d2ec-4d3e-fd85-08db8f77a848 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HaEl00rxUShjSzPh/GYViJg+KN+DTE2qDbb8Z2QON7Ai2iy2AIqH+Hu3qEiVK/GlwL174DvysGIXkAsvICg2Gj9xp/wT0838zKg+U1u26zW4dt7FHAmoljcV30wCMgHml5F9ixYiqbg2/nN2rXI6p1/R/OT+jQsUVS1lBbSlGOsRLhk53EeRu+EqrozYzd48HUoGrJ0OrgQvPlZWElZdnzEhgiHbZGZ9dwwGdOGhdJ0JxzZRvAD2djHyHsfaXoysQRwdicPkq3GUQAFUHUMBJC8w835rUxb6PS32tsAw8Kr7pX/gKL6IZMP759a8hR2hEovVWZX6mn5ZKdhtwzTndi6nCL7cCXQQbDapuBv3qekb/yXrWZaI8wYMnGlUXHKWLiglqISm5jcMTgEexdTIUz1s+tPPwQEHct25IRFj0BiZd1SVuNXSM9WXfjs1jD/zIE/vg584KqjXifqLy1zWlYVKEtkjRcX+LV/cnovKB34/dO9gDZze7sP4gAZvFvAOdxeo9NxWEjle2NBYNqBdJMtp45OsmHt6H85wzGwKi/Ud6rfwQfP/xVvaUNQa+61rq15jWzGsBQqgC+Hy38xLeeuX9bhDR3ZKvRn9R9ioY723+DWSkWD2i3NAUp39yE8G x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(396003)(376002)(366004)(346002)(136003)(451199021)(1076003)(82960400001)(26005)(6506007)(478600001)(54906003)(186003)(107886003)(71200400001)(122000001)(6486002)(64756008)(66476007)(66446008)(4326008)(6916009)(2616005)(83380400001)(6512007)(38100700002)(66556008)(91956017)(76116006)(66946007)(5660300002)(41300700001)(4744005)(38070700005)(316002)(2906002)(8936002)(8676002)(86362001)(36756003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?LKjWrK5YSJ7/ExSHpasN94u?= =?iso-8859-1?q?owrTbhMS/TptcW79ive9ZRJDRf2AJ35vuWUFFao2hA95jExstpOTqYgwloCX?= =?iso-8859-1?q?Q8rcxFbaQPLem/Pe60x89VFuRibprTSWF3NoAf0TDC+509TKdRE0Vv39b7xS?= =?iso-8859-1?q?P6XE6jyAnS03vCgj4K7YcAZ0WR17dM7UMcflcV82VzsFMRbjG5c/FZo4PXE2?= =?iso-8859-1?q?Hp8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B8Xo59nCEG2cYVdZaEL8sUhrYtF3DJ?= =?iso-8859-1?q?jDR6C9A0Y72+w1y6ijqsxoYZlw+5A7H7YWBWlNP5sVtT8y30+p1sJPTVeVDW?= =?iso-8859-1?q?N3B7uXzoch9Alucd9tEr9/eHsteBHCy/B3uoqK/geekfeFHIq92iLVI4Gq5H?= =?iso-8859-1?q?whdc3s6K6BXF95yYy8fg806bdIGEyJalbBROzXUDihNWRaEgv9+Ynq9mz2/t?= =?iso-8859-1?q?FD4ILFayk5KgktczU2s8Lznm/1uKWbOg6qOR9wE7vU8d1guexsYyQZTznpPl?= =?iso-8859-1?q?8wXloHITD90TLiAsBT7TDIGQ2MKJmjyFSpHHyMTjM6djWPsfxYzjcr4Rv6qg?= =?iso-8859-1?q?AMeH3mIEjHXoivjfffpa/uHDs68eS9ame5pdKBQnA5+ENvC9NDQKXYQu84SD?= =?iso-8859-1?q?VfZUe4jvH9i4590y8N6nRoquIv/H6cdwgyu0GruGOimLNbrEm+P8pgFtJO7Y?= =?iso-8859-1?q?xvkwX/Km3286buswTzKGN/IZ5tuGq5Z+4B6RXkyAOxQ0iaLPrAKzSxPzw6Op?= =?iso-8859-1?q?9Q1ZME45aJFoqQsOXKiBa7NhiNu2AMlE3uzsFQA=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 99ec6704-d2ec-4d3e-fd85-08db8f77a848 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jul 2023 14:33:48.9712 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: SlOuWiikE2fmsr9GuOdi5e6CRTQrbxhwgUXMr0WNzGyBXPCkzFP1/8mmsjzxBA/VkC7zPadU4X7FpIrKbwh8vA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB3151 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 28 Jul 2023 14:33:57 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/12519 This checks and repairs the filesystem first to ensure that resize2fs will succeed. Signed-off-by: Stefan Koch --- .../initramfs-crypt-hook/files/encrypt_partition.systemd.script | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script index 83c3238..b32b2f2 100644 --- a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script +++ b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script @@ -87,6 +87,7 @@ reencrypt_existing_partition() { reduced_size="$(expr "$part_size_blocks" - 65536 )" reduced_size_in_byte="$(expr "$reduced_size" \* 512)" reduced_size_in_kb="$(expr "$reduced_size_in_byte" / 1024)K" + e2fsck -y -f "$1" if ! resize2fs "$1" "${reduced_size_in_kb}"; then panic "reencryption of filesystem $1 cannot continue!" fi From patchwork Fri Jul 28 14:33:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Koch X-Patchwork-Id: 13332004 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B52CC001DF for ; Fri, 28 Jul 2023 14:33:57 +0000 (UTC) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (EUR01-HE1-obe.outbound.protection.outlook.com [40.107.13.47]) by mx.groups.io with SMTP id smtpd.web10.33541.1690554831169870021 for ; Fri, 28 Jul 2023 07:33:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@siemens.com header.s=selector2 header.b=DMNCZwHA; spf=pass (domain: siemens.com, ip: 40.107.13.47, mailfrom: stefan-koch@siemens.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IYZvy9vAn1tZPYpxABr56tJHilneTLGe4upqbQf4R9Wzbmb/Dt/YtjJYnOoPl5z67Fe36493rghXZj3Jz2vR6gZ/9ucGHUEcDP7GMS8GePbLo5Ek4mNDwh8mMK/VfmdZvcEmJAkHPU3lnaMTve+ZZo3ZV6yAngndr03Dfa7J9QZh5qZz++8eZxZTehVdermHHBpL2KF0HTZOjFuKjMFTlqJRrTuJmv5jQKKMj7rPZ+1z7em80vtN2Asw33a0vUWuWSPOIVlJecKP44VfnhLd1Bl8DpBCAg6n2j0AB/behM6e3JVkLkqesQip0QSMQwd3TKedSBrJFs2BBsQFDrcsWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bdMYUzxGQZNvQ+hC5bfVf44/tDwKuwW7sif0LlzmiLg=; b=guNVjdiOyUAdy9HiWbaPNnlaWAKgWuKaPtCdyy8p671PGbIGs6pSoogA2RxNavOl5koAqfjsqk6IH/DnCrD+Bf5AsDVZEkn21QS9pKtMR5QbCX5oEFewIDxg9qT0fDHzTAwCLvYEVslFv1cYtEv1wSfrIkNN/xymMhWa1o4u2nMlMdpt7chXSYOtHpLbOrfRDPTP0Cgjed6yucbNL02j2R/OnNjO0RKcWaNO0i+ieSI5ajS3JHBBU5DzqRbtflu+9ED7YdmpbA7xqHfKlCGXDCVlFhNVV05pZzhP+JhZQm+5xWXNY1rhZk73R930tao+OwgLkY+NS18pZXx89YmFiQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bdMYUzxGQZNvQ+hC5bfVf44/tDwKuwW7sif0LlzmiLg=; b=DMNCZwHA9yO0/7SR6eQUpOwUqCZKS8r3Tc17KLWSAgCIfSSSBYQgGpPa2esiILEOTP10SgIQUqX9kcymXgckPUjrxQs2mk4eH7l79vM4oWbn9cz/V/w+emkiX112PTT6NX0EcDSRaQ7gadhFYTbaHIZ7xoC1gs/pSjF+HMROXfqFFrJtT/OvOqeGrhZE+aMQhuvwtsJ0ESGPTfZ8u+W/pj904WyB21HAGsD73EtCgieLzCFvwBPnDHIDMzmkKVAP1E1dO1/GxOeDqJ8nQtw2TXp5jPIcDLmfB0M+58JtlGtktMEELRsRqTCPMdP65oz9dVRYnbGZm0ZkN293VB4+Kw== Received: from AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:41e::11) by VI1PR10MB3151.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:135::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Fri, 28 Jul 2023 14:33:51 +0000 Received: from AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM ([fe80::b214:c3bf:bdd4:fd7a]) by AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM ([fe80::b214:c3bf:bdd4:fd7a%7]) with mapi id 15.20.6631.026; Fri, 28 Jul 2023 14:33:51 +0000 From: "Koch, Stefan" To: "cip-dev@lists.cip-project.org" CC: "Kiszka, Jan" , "Storm, Christian" , "Adler, Michael" , "Sudler, Simon" , "Koch, Stefan" Subject: [isar-cip-core][PATCH 3/4] initramfs-crypt-hook: Avoid calling of tiny mke2fs from busybox Thread-Topic: [isar-cip-core][PATCH 3/4] initramfs-crypt-hook: Avoid calling of tiny mke2fs from busybox Thread-Index: AQHZwWCHFkOweebVN0+CPtd6o803+Q== Date: Fri, 28 Jul 2023 14:33:51 +0000 Message-ID: <20230728143320.3891194-4-stefan-koch@siemens.com> References: <20230728143320.3891194-1-stefan-koch@siemens.com> In-Reply-To: <20230728143320.3891194-1-stefan-koch@siemens.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.39.2 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM9PR10MB4959:EE_|VI1PR10MB3151:EE_ x-ms-office365-filtering-correlation-id: 3cc43f16-4d87-4f52-866e-08db8f77a9ec x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Ub+PC3MAiNP6+eKvx24dqfDVyHAQcqOBdP6J1xdzNORhthWmBaQPz2h5snnlwx/URBy/qgGyIYMNEiGgJjMrAJSLo4ILA9w5BlDPM4kC0S5X/7Ws29xWH/P7USwfODz4t2AVtySx02/5MwkBFMPFBXgizF2VV1lTuogvOzaGhcIZjjzajNvzk+ttTGMW7tKYOO1npw7Uh5vK//wKsc/vjJogABtoROUhtKoPXIM06g5fYsIrCodQBOmIRSJQy89kvRpnO4PW4DO9ZqawL8ZS1SQljfUlcKhx35h6mlD4f0sii6TJo1sfOeycUfY+sta9oc11L8FGnNMXMhAekfL13zZZmwZe3BZu4JfYX/AyT9v4aVpC2Vt23ES+hPE+3poMdFPiTMs4/WStcYQ4FMQ5d6p19qGmtJ4J+Fnr+EXOciHUP67xlsg6IZjYRA8yFrgEe5KvvBx8nTAo11bv4ZTIShydpr+It05geyEoPksyrp49lgXY6QcXE6DYrazxr1epWHVRZ55A4IkN8CghhkaMQ73l/SjsmBorHtWGuql8ABXObx15uiwAckTnczZyqOLfa15oH3ETX4s2HQjtFffQTbzdux+5W8YVAuqiEw3Onu9uhZ1+goGUol+uFyqutBzl x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(396003)(376002)(366004)(346002)(136003)(451199021)(1076003)(82960400001)(26005)(6506007)(478600001)(54906003)(186003)(107886003)(71200400001)(122000001)(6486002)(64756008)(66476007)(66446008)(4326008)(6916009)(2616005)(83380400001)(6512007)(38100700002)(66556008)(91956017)(76116006)(66946007)(5660300002)(41300700001)(38070700005)(316002)(2906002)(8936002)(8676002)(86362001)(36756003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?qGGX1TrQjtVIRSomKT29cvY?= =?iso-8859-1?q?ob50SEeTmrFVehumVwyHPLXmGWrv3F3/0dGRbR3ZNBMqQ2L9t2OC0hr4fN7x?= =?iso-8859-1?q?GSqVaIZb/CX8KSxBQ0D+Cid6FtgDQWnDw1uzLI5D8D4t6W6+ALxObMOvc4S6?= =?iso-8859-1?q?ZDqtgyU5IMuvqxNgQ8+uHLJxY17UjZ0pafvESBUFo868YtBl3XnblSsZHcDP?= =?iso-8859-1?q?S5gHt5I5NdkglOlON1D4bPXuBkSgQF9tupSLbYWc7bQj8Xre+D8Iaq9/dJNa?= =?iso-8859-1?q?cJp/ksf2RrINWsqcSAqV/yXxDvSrOhFBq6B6U2Zdjtf+YBsgzHOqDTMLjqCz?= =?iso-8859-1?q?GEAAseixJ3ZbARrX7E7P2za+mhD2n66fTJpN6nC+Kbu7fPN5lJJMS6YwlR4L?= =?iso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yYyTyv1OSBJtMAKnvHUFkk0VaG90d91ZuaKSpf1rR?= =?iso-8859-1?q?aZBohLKETEdKH3VpR3W6H7yO/ZmbzzdFO54LXyy+pB0k0QiCTN5upx6LEliB?= =?iso-8859-1?q?TbK3hKPLpyWi7z9DSyVJ5ZuW9k1prcG3hWIY0tPw03YlpZDW3JmIkeOqAnyo?= =?iso-8859-1?q?oCTyr6Zf4jlg5I/Cpq/9tinjohq0UL7M4HwMEVbCXNHpZq3Xkl1aec4svID6?= =?iso-8859-1?q?9ZZyRxTYJRQF/oEpCPd5/Z58jKdbx6wPAa7GJlKDTLFoNa7LH7Hg47PpDEEe?= =?iso-8859-1?q?/FK25tOFOsZWS30CxDx2jQtN7hTs+IAQWa8+pB2u5EgxZcx9WqrKk1pkKM6M?= =?iso-8859-1?q?+5EmBP2ltWd1i4xe/cBrPNMNung630KAZS/ZmdQ=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 3cc43f16-4d87-4f52-866e-08db8f77a9ec X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jul 2023 14:33:51.7193 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: EktD3wU5A5TLDlTglTeM4Lb03TD8vSWFX/sDWw0HbDHSnJJO03sNvB4btZsZdp3XYQVjAdDbLEpk81Ttx+grxw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB3151 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 28 Jul 2023 14:33:57 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/12520 The tiny mke2fs does not support the used -t option. Signed-off-by: Stefan Koch --- .../initramfs-crypt-hook/files/encrypt_partition.systemd.script | 2 +- .../initramfs-crypt-hook/initramfs-crypt-hook_0.1.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script index b32b2f2..4e04d37 100644 --- a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script +++ b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script @@ -42,7 +42,7 @@ partition_sets="$PARTITIONS" create_file_system_cmd="$CREATE_FILE_SYSTEM_CMD" if [ -z "${create_file_system_cmd}" ]; then - create_file_system_cmd="mke2fs -t ext4" + create_file_system_cmd="/usr/sbin/mke2fs" fi service_watchdog() { diff --git a/recipes-initramfs/initramfs-crypt-hook/initramfs-crypt-hook_0.1.bb b/recipes-initramfs/initramfs-crypt-hook/initramfs-crypt-hook_0.1.bb index 1c1bf3d..3c3f6bb 100644 --- a/recipes-initramfs/initramfs-crypt-hook/initramfs-crypt-hook_0.1.bb +++ b/recipes-initramfs/initramfs-crypt-hook/initramfs-crypt-hook_0.1.bb @@ -32,7 +32,7 @@ SRC_URI += "file://encrypt_partition.env.tmpl \ CRYPT_PARTITIONS ??= "home:/home:reencrypt var:/var:reencrypt" # CRYPT_CREATE_FILE_SYSTEM_CMD contains the shell command to create the filesystem # in a newly formatted LUKS Partition -CRYPT_CREATE_FILE_SYSTEM_CMD ??= "mke2fs -t ext4" +CRYPT_CREATE_FILE_SYSTEM_CMD ??= "/usr/sbin/mke2fs -t ext4" # Timeout for creating / re-encrypting partitions on first boot CRYPT_SETUP_TIMEOUT ??= "600" # Watchdog to service during the initial setup of the crypto partitions From patchwork Fri Jul 28 14:33:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Koch X-Patchwork-Id: 13332005 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A243C41513 for ; Fri, 28 Jul 2023 14:33:57 +0000 (UTC) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (EUR01-HE1-obe.outbound.protection.outlook.com [40.107.13.47]) by mx.groups.io with SMTP id smtpd.web10.33541.1690554831169870021 for ; Fri, 28 Jul 2023 07:33:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@siemens.com header.s=selector2 header.b=VwOfRJuT; spf=pass (domain: siemens.com, ip: 40.107.13.47, mailfrom: stefan-koch@siemens.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UyD5cRxB3l1Dgm1jDM4QZGPYsXptXxO281O9m/VcIu9k4LbwCp9y+6mVrXnk34LQwVP2T6Xcsr2uAIEOxI3DYlV+riCALApWDNLUqLQ3+rQUL2F7IceFy+Oe6urNpdwkorREorwS/yuy5T2dhgwEgjbC/kmAePm0/Y7O2dmo56CF+JbRi1VCk5cFOdmiScqw9kxVRCKJCFNx+6YbWozVXqKLqI25YxSBuoth+ymy8ri/abjd6WA4PSHVKBGyFVZDLUy7TizIzq2Pe12R0BIMLQSSqCTmfaKSRQWhBYZhzSFE+Uc/8tH8esotpsruNJzN/0JNNaDFY9Yj+04z0aIOZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QuCkQ15HwMnw8lPNEzUGQAX5S+qoVS36kX/1WQeI3HE=; b=EQSAVnaGIeqCEGfwMD7iBnKR5uCrkRYwhb1GfPNPfskItknfjdMXi3kd7V2kih03Xvkzxx7YA1riFmIX16LBaAhNdT/pnLFuEyMHIdk/jjkYwAT3kSr+bsBC0XCr0pdBXcFp+kiFa+UHUolwhDPNJ0EcUu6U7JtQApuOFmzyGjtWc/NT73F6b3O7o7cECKNqc2iwdb+/pCGJrgS6Uq1le4qVDXrKrXAaD5ryWPzfY0Sv0gI0XVTClqF42I1nfcKzMyzlksFRQOVPIT6lwRHxCzMx4+oKEtsR5zdRgUdJQJmb1Yd0aibHj3439693LUMZD0Kp3bV+WzzfS0R1Canguw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QuCkQ15HwMnw8lPNEzUGQAX5S+qoVS36kX/1WQeI3HE=; b=VwOfRJuTfdtII9YLVrhG+zucGz9IK+EEH6dkkOdE/sBYF2JyFeOdYWOmXJ12gMr5koc61Y7gI6blX0Tidvc55eJD7EyARUG/2Sg85dD5Nj5XgjP0CrkYDMrFJ6iSXO9mAUZFGzRMSQoKujSwJzDeWYmvlaob+Htif8UpK/Uh+nt36+gJ7Eey7A/0EOQWpFjUHe62GBmVl77RALVLZoJppEwdL/2KZBLFPsJHjHQ8aEn7rXbglnD8Rj2ofKk91wkPzV819PL1GAulwy8OBhFEoFSQaTRDgZU2G8EEwL8pfkQSzgk+foYVaYU30POZ7+kse4+OuMKZFIE9iDhDFkfNwg== Received: from AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:41e::11) by VI1PR10MB3151.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:135::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Fri, 28 Jul 2023 14:33:53 +0000 Received: from AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM ([fe80::b214:c3bf:bdd4:fd7a]) by AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM ([fe80::b214:c3bf:bdd4:fd7a%7]) with mapi id 15.20.6631.026; Fri, 28 Jul 2023 14:33:52 +0000 From: "Koch, Stefan" To: "cip-dev@lists.cip-project.org" CC: "Kiszka, Jan" , "Storm, Christian" , "Adler, Michael" , "Sudler, Simon" , "Koch, Stefan" Subject: [isar-cip-core][PATCH 4/4] initramfs-crypt-hook: Fix error with libcryptsetup-token-systemd-tpm2.so Thread-Topic: [isar-cip-core][PATCH 4/4] initramfs-crypt-hook: Fix error with libcryptsetup-token-systemd-tpm2.so Thread-Index: AQHZwWCIucUwe+JW4U2oTka2ScHWOw== Date: Fri, 28 Jul 2023 14:33:52 +0000 Message-ID: <20230728143320.3891194-5-stefan-koch@siemens.com> References: <20230728143320.3891194-1-stefan-koch@siemens.com> In-Reply-To: <20230728143320.3891194-1-stefan-koch@siemens.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.39.2 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM9PR10MB4959:EE_|VI1PR10MB3151:EE_ x-ms-office365-filtering-correlation-id: 67640c02-835b-484d-b0bc-08db8f77aaa1 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: AV9WMapkjEGeG9bVpolaBgD/ynnB0cZ735hGoEak3E/hbSJ1ta8EiiwYCdG7A9OtMzvMubjJalSc9cj7z5Om3V1j3kcfMIc7drI81zA977U3uDpmE7SdQEi4OpENdNCKnS1srnuEFUh3sEu+BM/wE12Z8BWCIqMuLq9TSRgL6xRD/37EdTAkuii3+9kfT9SmXqyJFQPJ5vkVqfE9icX/3muOxa6reHL8+XUXhGV2NdAbQgI9mjx0fdgaoNq8iD2ng7Nm/YYYIaSYY7h/8NAL9bnVpGzs08dVVOM74PMRhUFzualSLtTXSnFaQwsL/EZERL7cHTDEr4NBSn1IHRgPdQ153Py4gnJn9URrpPefqUb50XuHQWTCps0KhJcRoIEUgmPDZoxsQbGBgib9o1zF9B/UVopLX6Avoc36mcCoNFLzr0akXK6JrJ8WkUWVtrlFgbOXkGjK6Cw/nqaz2gYrh2sOwN5cXLgUhUWBmNKM+Ykxp7oJaEYnUORev/UJRqrdb21kmAlRC08IZ7RPl4+mA6qgPcFa3ufkzjBu4/O8Nh5fTsuR8CMANnoZbKTRbIB0muBr4bxybDRbaGDed6hu8GB5YrT0atj+Z7LCFA+Wn1bSB6ZAcuJczQcYopaGYixU x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(396003)(376002)(366004)(346002)(136003)(451199021)(1076003)(82960400001)(26005)(6506007)(478600001)(54906003)(186003)(107886003)(71200400001)(122000001)(6486002)(64756008)(66476007)(66446008)(4326008)(6916009)(2616005)(83380400001)(6512007)(38100700002)(66556008)(91956017)(76116006)(66946007)(5660300002)(41300700001)(38070700005)(316002)(2906002)(8936002)(8676002)(86362001)(36756003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?Jo5LUcgcIHIwOrQ+P0m5v0m?= =?iso-8859-1?q?54OzLxoMxVQr5EdHyPey2ynISG+1wcw+CPqoQrdN19Ig6PY6loMsEKYE1hXA?= =?iso-8859-1?q?/amRkw0SKmcQo/1OYIcaUNYgs4i8JafCnCtB6GFgBriu5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iso-8859-1?q?GTTrRlUVuMQ4DOY1GZ/UikezfNgaBL57AUyS4/A0s5IonLPI0SfQLeWduGTD?= =?iso-8859-1?q?Oyuwo7FhPIHF5YxK4x3grjfTkleESlqu7GP4xfM/BX8i7tRLpxSjvtDH6Hqt?= =?iso-8859-1?q?oQOB28HDIHjXsR8DpGLyhjQ4S+HJfQIl1psTe8GMtMZSn6o8SodS1XbIoG1q?= =?iso-8859-1?q?WtVufhJLwK02II+S1Xmzh5AS/QSnXlFwds84AH6Hhl+EbwyNPAffS7eCAaZp?= =?iso-8859-1?q?xr97pk7n9PPU2Q1J7yWRPmkRrx8hymTjtNStMl/XztE+mT0UtTM3A2Oljfeg?= =?iso-8859-1?q?JaZfxfUILNX3AuaaY07hvLNmQQx2b2gU+ipX7Y51pSezePlXNaR2jrtqyT8M?= =?iso-8859-1?q?UpQqGO9+c/m2tYb+XeI8BT8wYZV+6Rt6XT08J2laqfxrudK+DvFvgFJgLv0A?= =?iso-8859-1?q?Qk05DP7EqRPaq9l6XJtN5ocxsSskFhobr05oKjsorhGuKvqxNoAyTWK2ywKt?= =?iso-8859-1?q?LQKdDLSxe9/6znSjV2qEZff35xQHdR4b5xc92xQQEKVdmON3dhma7vEM9ki5?= =?iso-8859-1?q?Fvh78TlkFX5P7TuoE9dCWve1DUu1Y4SyBlS3lGRomgGAWs6iJor7lmqKu0mK?= =?iso-8859-1?q?Xn+KxOoJ6QUZikY8MO5OUNmjn6yEGw1n53A/1wQ=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM9PR10MB4959.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 67640c02-835b-484d-b0bc-08db8f77aaa1 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jul 2023 14:33:52.9487 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: TaYqTrbg5Zstl8TbyPVYEMWSeKu4zKxom2fuHyVPPyyfPz8RUKbG/cOYs1B0j5xyya5XeiJhdx+oJbLg4c9n+Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB3151 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 28 Jul 2023 14:33:57 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/12521 The library is missing and is not needed for systemd from bullseye-backports. Signed-off-by: Stefan Koch --- .../initramfs-crypt-hook/files/encrypt_partition.systemd.hook | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.hook b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.hook index 08ea631..dac60e0 100755 --- a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.hook +++ b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.hook @@ -44,7 +44,7 @@ copy_exec /usr/sbin/cryptsetup || hook_error "/usr/sbin/cryptsetup not found" copy_exec /usr/bin/systemd-cryptenroll || hook_error "/usr/bin/systemd-cryptenroll not found" copy_exec /usr/lib/systemd/systemd-cryptsetup || hook_error "/usr/lib/systemd/systemd-cryptsetup not found" -copy_exec /usr/lib/*/cryptsetup/libcryptsetup-token-systemd-tpm2.so || hook_error "/usr/lib/*/cryptsetup/libcryptsetup-token-systemd-tpm2.so not found" +copy_exec /usr/lib/*/cryptsetup/libcryptsetup-token-systemd-tpm2.so || true if [ -x /usr/sbin/cryptsetup-reencrypt ]; then copy_exec /usr/sbin/cryptsetup-reencrypt fi