From patchwork Tue Oct 25 13:47:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henning Schild X-Patchwork-Id: 2187 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Tue, 25 Oct 2022 15:47:54 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lj1-f188.google.com (mail-lj1-f188.google.com [209.85.208.188]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 29PDlr27019326 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Oct 2022 15:47:54 +0200 Received: by mail-lj1-f188.google.com with SMTP id y13-20020a05651c220d00b002770461394esf3350376ljq.22; Tue, 25 Oct 2022 06:47:54 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1666705668; cv=pass; d=google.com; s=arc-20160816; b=Of1SDCk/eRucZpLn4ZdfLfX656FNgHSVzpyyFfY/r3vX7LX2rqP+gIKChjedmcXs21 re/ReJPOoBQ/1XF1wLbl3asRUYuCmgSgSkrT5IzYMC5bm5DX05OFsgwiVBSxT55DNLH5 2mrXRVHWszyXVTqTYLCc/f35vmCdUdNtKMef5w4APXS2CzzvT8FeHZMrUcLiUELVyhPz fNqIBLoZlRn7FS2CkTxo4sOCoguZd6v+hMylnGRh12vvGXXWZqGLqvqfI5n0/G++ANOr elLRF3BjZfFIY1OJalve86OKlABE2nEcP8Wz31lgmeBM6gQ+gIFX8Z0ASL4z3uaJJwfx 40dQ== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=D95YMcsBNXaQ3ucTZp4fYge8jJ4RQ6ziga69MoGKhbU=; b=Z120NhVbD3oV0ZQBnKnieSkGUVb9xDE/7tef27Dleh4jzlDFclG2tDsPIMCx2DTWo9 yqsqdCH0fAm9TlQ1Su9rmZe2fJm2mT2XIz6sH+WDuzxSXbywro6+v9FeNHmqukGt7Bzt 6OYm1/KsZVJKG2aT4rkDcpB5nkx10BrPbi8zjfeZkB4kl7Hjm9Btmn6bqGcaMrC3zXUE mny83obQEZ1MWHFhDrRIARQxo+xpvkxaWb1mC9YNhfEwb6lpj3irX2e2iOf//Lmhq4Ff CJdEmFl0u8Zd23iwWdYGZSehgNUGuFJQ567sd6qt5lYTHQ3u5YPM7ea6wUmt3VQYJrDx xE7g== ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=vlS8YVQ+; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of henning.schild@siemens.com designates 40.107.22.62 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=D95YMcsBNXaQ3ucTZp4fYge8jJ4RQ6ziga69MoGKhbU=; b=tp+gElvUPfR9UWQf4vPbZ5YNwpp0uYilAyIb2Afcy8Hh1H4JpaLhxdzj62bt4o3j4c J6Nv3RPRGXMIkxMF5cn6nrSyHSvY5iVefnsEJkjlJN91ylmHMQCKfsN1iTdowJewFLOu 6JjC+4XXwuWbEiOOoo7jsxIKAZ1jZpnQHnDXd1I31VQEvJgOPlkMJB7XU/PTnnFpz0OI t7SbOAdBI6MxF0Gc/LGZIoUqgpYpMlVk+2HaxMbWmdv8lIeY2fyrUdVMt5uHPSpFVujr qf1hO2+cQwAMB7jnOd6Kdk1RokOtDw5fsUH9KY1ybHl4VaNa5s2fJnzP5OukuBMR+RRS VzzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=D95YMcsBNXaQ3ucTZp4fYge8jJ4RQ6ziga69MoGKhbU=; b=eDSVzF8xDiiokHSWzYi/EomyF90ICkS2Ou26GEWNmTZNFo+MdsD8lawuGgTcvYUOxj Is2eRsnPV5QU44DEj7i/OSmY17hJnH0RulYnOeS93InxdhY3PqOBQFtP/jvUrTVh4H26 /tT7IaJr14s1llyFVdPhc7l2UmqpiCho5eWiY6H9zFaGsJLsjMYrhBnqef3lEjqhh+d5 S45e7BVz6nm6gWGeaRg47Sy5cpUw1SkcueYHIxFssEMH2cLFEIgHwUzi4tSe/e3UfdGs s9i6sPj58IHJWejbBS7WYr5fbS0dUvoEqGzWV4lT/5/iiH/jvJuctvoG6gLyO4R9caL/ RpfQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: ACrzQf1mDomG24V5IDVegwmJzr/Ko54MUxQ+olNcTjnKsm0NRFe8Ac1N +FqYwNtGsghYAs+yh56b6F8= X-Google-Smtp-Source: AMsMyM7ta+iolShOwTtgNiIrkVVZdkCFhgpM3ggRAeXyUzrw2/oDDrAeB4gqR6dhAcf5WBulYRHTjA== X-Received: by 2002:a05:6512:3f10:b0:4a1:fa44:6690 with SMTP id y16-20020a0565123f1000b004a1fa446690mr15670636lfa.152.1666705668263; Tue, 25 Oct 2022 06:47:48 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6512:2151:b0:494:6c7d:cf65 with SMTP id s17-20020a056512215100b004946c7dcf65ls3971788lfr.2.-pod-prod-gmail; Tue, 25 Oct 2022 06:47:47 -0700 (PDT) X-Received: by 2002:a05:6512:2350:b0:4a2:2447:9c42 with SMTP id p16-20020a056512235000b004a224479c42mr12669670lfu.260.1666705667171; Tue, 25 Oct 2022 06:47:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666705667; cv=pass; d=google.com; s=arc-20160816; b=v31Y2cH63uVMWR/vO3lgyckWNHBfO8gDaZOBiN5DUhpy3dSt0qQMwpzTUbS4F2J+2Q anCOSwZgi+n9aA6ZxH+K6rSQPgfk2bvTTBsCpJSrW6EB/5+VgUxQVTgjR46/7i/Rrxpo 9Lk+y17BGkNgXPvMAuYByqaL4GDPb8GNXqfWr0nu/WEFiag7xxt7p570PEtTFWEjz3is Rs40F5VDKw+lzxb3/PWKufKFbKzgPwa48nl2PwrfY3k0rviSrJu1XU843h5jBBM8sz3F hs3oY84Vg8lSbPT5xtTPad6kAOJDgZPHCjsZeBD9W4ecid1IF+tXjKeeZ32Dv/wyU1nO Z8kw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=aYmZnTFamIGDRqwJGMrIcsCE3e6ON1Ye22HLTqth8dw=; b=EcQonAqzQVNurKA+xGLcdE2NQPHIXMZKshbiYO7mBJR4m3R5GBR4bAhY32M5r4wQnH SQpnNpE62+iD3RpbSbo1ZP0bSb57EMnjX8zP6SO7/qoZH5STcLZ63nCfGRBgPMg3Pxbn zzPwwTGFc7Jdk2nSEqEYBc/whSxil6deo6/i4fjujOui4O6muwgD0/iKe5qHrIXjSad8 Rr8B6PlmAijMfqwBMx8/gNuPLHPETQQhSrwCt9eTw8PSHAobIPK6cCqIW1tmj6eHBwqB Z3DiMWx1whkbaYOv7I3SDL4zv0F9wqcrYvTY+oRQrNXi5r7LzlVZ8Vj44CQRW8vQXK85 LAJA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=vlS8YVQ+; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of henning.schild@siemens.com designates 40.107.22.62 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2062.outbound.protection.outlook.com. [40.107.22.62]) by gmr-mx.google.com with ESMTPS id bd9-20020a05651c168900b00277139e52fasi121042ljb.0.2022.10.25.06.47.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Oct 2022 06:47:47 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 40.107.22.62 as permitted sender) client-ip=40.107.22.62; ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cBAzjCgyKCFd/EVxF8Y5bzn3RSzleGCQh3McCR8XXA3xu1L0v8MkR6fP54Bg2pjyAotp9WBO/l4iItmST02cb/ItYM6b5e9VNpohjd5v0h/ABI/p+In8W98rQsqHYLAt05IdisiPYZkJBgo1gHy/Y1tGKllBaFkTdjP+D+4FNGphpJSq6I8Jd+mXzWZ3sxRc6EwfkLKZj/g3yqHgXwBg4rP9Yv5i9wZvNP+KgboQbnWwuIixLDHTGp7Dxtx9QLJpQAse7X3blAS//C+q/nLA9fLKyD+OyTrkNu66vdKFr+MbRL2VAq6Cmh1sW6rF5/Ir2Ip/hP7SoEO7be826mVNYw== 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=aYmZnTFamIGDRqwJGMrIcsCE3e6ON1Ye22HLTqth8dw=; b=B47g+x7a1VykY1A5GO4y9jKYnivuS3wzbsA8X9EANfEBQZKc46XZVhqvLgyUV54lcd4sZ+OU5V9HtZlgpSAHQMGc2YqvCV7h2Ajl817z5Gk92JoD9aQ8KrfzOvh/Rkq1Is/V51WQ1mgQuteAHtjZZ/ZagrbSRPmq/zFNkNEagsPUYdKEcOUOvA0GSmbQpzStw5R/rya3y1+P7jvvcQ6i5R2yVYqZg60ChLy8m+u5DPHe8ZtLuRUqwoObACjS0yNDrD+y5HG0TwVlgnjPxbKr7sgWwtn3eiiktYtBfIUrI0rsH4b+WE72ulcbd6p3u7CYeJjR02mEV6ul66ggpFSYWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 194.138.21.76) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=siemens.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=siemens.com; dkim=none (message not signed); arc=none Received: from OS6P279CA0067.NORP279.PROD.OUTLOOK.COM (2603:10a6:e10:3f::20) by AM7PR10MB3271.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:10d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Tue, 25 Oct 2022 13:47:45 +0000 Received: from HE1EUR01FT062.eop-EUR01.prod.protection.outlook.com (2603:10a6:e10:3f:cafe::94) by OS6P279CA0067.outlook.office365.com (2603:10a6:e10:3f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.23 via Frontend Transport; Tue, 25 Oct 2022 13:47:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 194.138.21.76) smtp.mailfrom=siemens.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=siemens.com; Received-SPF: Pass (protection.outlook.com: domain of siemens.com designates 194.138.21.76 as permitted sender) receiver=protection.outlook.com; client-ip=194.138.21.76; helo=hybrid.siemens.com; pr=C Received: from hybrid.siemens.com (194.138.21.76) by HE1EUR01FT062.mail.protection.outlook.com (10.152.1.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.16 via Frontend Transport; Tue, 25 Oct 2022 13:47:45 +0000 Received: from DEMCHDC89XA.ad011.siemens.net (139.25.226.103) by DEMCHDC8VSA.ad011.siemens.net (194.138.21.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.15; Tue, 25 Oct 2022 15:47:44 +0200 Received: from md1za8fc.ad001.siemens.net (139.25.68.172) by DEMCHDC89XA.ad011.siemens.net (139.25.226.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.13; Tue, 25 Oct 2022 15:47:44 +0200 From: Henning Schild To: CC: Joe MacDonald , Tobias Schmidl , Henning Schild Subject: [PATCH v6 1/1] expand-on-first-boot: Switch from resize2fs to systemd-growfs Date: Tue, 25 Oct 2022 15:47:20 +0200 Message-ID: <20221025134720.22571-2-henning.schild@siemens.com> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221025134720.22571-1-henning.schild@siemens.com> References: <20221025134720.22571-1-henning.schild@siemens.com> MIME-Version: 1.0 X-Originating-IP: [139.25.68.172] X-ClientProxiedBy: DEMCHDC8WBA.ad011.siemens.net (139.25.226.105) To DEMCHDC89XA.ad011.siemens.net (139.25.226.103) X-TM-AS-Product-Ver: SMEX-14.0.0.3080-8.6.1018-26680.007 X-TM-AS-Result: No-10--13.611100-8.000000 X-TMASE-MatchedRID: wQxUrVl4KyMSoMXQbDenYUXpV/9Io3LGB81uozkhVupbUzvsaHW6Bl7p 8gUj+w2231GU/N5W5BDQuFk58ttaPO5V0cRQF/C9SOba+wbbMuBC/Vt0kP9SGj8Ckw9b/GFeezL 9LaXXx8LcRlVxRCnt1mLpIIQT+xImV2ZpK5FDUXFAT9LVwDQdswd1O2DSI1kj/OM51yupOiKNY/ pqxovzxZGPHiE2kiT4NnFzONef5K4rzzBwyc2R+HN/mdby/J1vO5k/PxBAvv7XhgtJf8lgil3HH pZF/7mw+S/AYNeku+QzA0M2Rcsg54PpGT9EK5RDYQVLwZ4rohCi6AI6qvlKDZ4CIKY/Hg3AGdQn QSTrKGPEQdG7H66TyH4gKq42LRYkfQJpzbD1iTzYZiKQ4Lq1MkeWxUY4AlLJGcrcrOY5quR+3Bn dfXUhXQ== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--13.611100-8.000000 X-TMASE-Version: SMEX-14.0.0.3080-8.6.1018-26680.007 X-TM-SNTS-SMTP: C97EE2486428A566E6752317653C167383956F8DF7E9349392A1F06431C916DC2000:8 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1EUR01FT062:EE_|AM7PR10MB3271:EE_ X-MS-Office365-Filtering-Correlation-Id: ca7f3faa-d4fa-4ccd-6849-08dab68f7f1d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rc9kweR/RVEVg6fZQufjV9GIafpA2QcwLnj4EqikEVZChSXqcuxvNgPZ0sg1+NsZxcRH4FzyeI7ptcDTeU/10UUexm3M4I2JvA81R5zPe6gx7Jfi7s/r3ZCWCkEmpcbUKgjJOWEZ9hu014It1ch+iprWf6pRIxbsAZXPoA9GyULshfPh/yRFFC2I03HHwvHQEVFM7ynegmjcK2YVJTQL597GQUdY+qHCFMhHeth2OhoMbYDAVFhyL1vfzg/od2dD0E/nXLJb+ZVn6Lh5Oq5XbMfAORGBWXjghWnLFnfKunnUCXfZbgMvPXH7GdkOnQbPIcyjRpeFr2V591lLRUiUJJ2yh5ZDIHFI4CoypF33O7MjI1hGIIwF72qij93a7oaXJMZHDvef7H2GQmIap4MvS1jv+6+fWtcNqyQYhy5oBSeFFOLDmBz2euURk1d/CUKMRG/glHHwBKG83pApcCWKNMWFQgFsBcvpI/sQy5U/LCng9kip5g1pt0dYapTrpHdGGTAGbS14ITQr/q3/7vkIUI1BqjiDEUsXaOSgRTFcXdrtgpyyoJgTwm5eIqx0h5AiUJ1rSJ3/N1nXAgr7DkXtDSkJRW45UH2gJmA6zoAuMWLcDwMtfrlR9NEqBr5NzJUbNkile9GqEMIuViroOfC8hu0DNvnsEtZ/lAaYkOAvQZKUfpUHS9WqWQ/eTgt58kssivAoooG51tu0FiyUtBdt1Ad/s6HVDqXzkmUjhrB/vkCbEjpuUWBHKbNs5t68F0Q5bJHOJKW6JeVTthm9Alg4JP+XHjwtGYVAWi8E/0J5vSK3ncdwGXTxwXEs0Ibq1On/ X-Forefront-Antispam-Report: CIP:194.138.21.76;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:hybrid.siemens.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(396003)(346002)(376002)(136003)(39860400002)(451199015)(46966006)(40470700004)(36840700001)(70586007)(4326008)(8676002)(70206006)(36756003)(86362001)(6916009)(40460700003)(54906003)(316002)(356005)(478600001)(83380400001)(47076005)(82960400001)(36860700001)(26005)(40480700001)(107886003)(1076003)(81166007)(186003)(16526019)(82310400005)(82740400003)(6666004)(2616005)(956004)(336012)(41300700001)(8936002)(44832011)(5660300002)(2906002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2022 13:47:45.4465 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ca7f3faa-d4fa-4ccd-6849-08dab68f7f1d X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=38ae3bcd-9579-4fd4-adda-b42e1495d55a;Ip=[194.138.21.76];Helo=[hybrid.siemens.com] X-MS-Exchange-CrossTenant-AuthSource: HE1EUR01FT062.eop-EUR01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR10MB3271 X-Original-Sender: henning.schild@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=vlS8YVQ+; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of henning.schild@siemens.com designates 40.107.22.62 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Tobias Schmidl We want to be more versatile in our approach of resizing the last partition. Therefore we switch from resize2fs to systemd-growfs. This allows for ext4, btrfs, xfs, and dm-crypt partitions to be resized. Signed-off-by: Tobias Schmidl Signed-off-by: Henning Schild --- ...oot_1.1.bb => expand-on-first-boot_1.2.bb} | 3 +- .../files/expand-last-partition.sh | 31 ++++++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-) rename meta/recipes-support/expand-on-first-boot/{expand-on-first-boot_1.1.bb => expand-on-first-boot_1.2.bb} (88%) diff --git a/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.1.bb b/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.2.bb similarity index 88% rename from meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.1.bb rename to meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.2.bb index 1703a648ca27..8d11aef00927 100644 --- a/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.1.bb +++ b/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.2.bb @@ -1,13 +1,14 @@ # Resize last partition to full medium size on fist boot # # This software is a part of ISAR. -# Copyright (c) Siemens AG, 2018 +# Copyright (c) Siemens AG, 2018-2022 # # SPDX-License-Identifier: MIT inherit dpkg-raw DESCRIPTION = "This service grows the last partition to the full medium during first boot" +MAINTAINER = "isar-users " DEBIAN_DEPENDS = "systemd, sed, grep, coreutils, mount, e2fsprogs, fdisk, util-linux" diff --git a/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh b/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh index 759ff8b61ccd..046a1394d213 100755 --- a/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh +++ b/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh @@ -3,7 +3,7 @@ # Resize last partition to full medium size # # This software is a part of ISAR. -# Copyright (c) Siemens AG, 2018 +# Copyright (c) Siemens AG, 2018-2022 # # SPDX-License-Identifier: MIT @@ -57,8 +57,29 @@ sfdisk -d "${BOOT_DEV}" 2>/dev/null | \ # Inform the kernel about the partitioning change partx -u "${LAST_PART}" -# Do not fail resize2fs if no mtab entry is found, e.g., -# when using systemd mount units. -export EXT2FS_NO_MTAB_OK=1 +# this is for debian stretch or systemd < 236 +if [ ! -x /lib/systemd/systemd-growfs ]; then + # Do not fail resize2fs if no mtab entry is found, e.g., + # when using systemd mount units. + export EXT2FS_NO_MTAB_OK=1 -resize2fs "${LAST_PART}" + resize2fs "${LAST_PART}" + exit 0 +if + +if grep -q x-systemd.growfs /etc/fstab; then + echo "Found x-systemd.growfs option in /etc/fstab, won't call it explicitly." >&2 + exit 0 +fi + +# mount $LAST_PART out of tree, so we won't conflict with other mounts +MOUNT_POINT=$(mktemp -d -p /mnt "$(basename "$0").XXXXXXXXXX") +if [ ! -d "${MOUNT_POINT}" ]; then + echo "Cannot create temporary mount point ${MOUNT_POINT}." >&2 + exit 1 +fi + +mount "${LAST_PART}" "${MOUNT_POINT}" +/lib/systemd/systemd-growfs "${MOUNT_POINT}" +umount "${MOUNT_POINT}" +rmdir "${MOUNT_POINT}"