From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7149079772069363712 X-Received: by 2002:a17:90b:1bd2:b0:202:56b2:4f35 with SMTP id oa18-20020a17090b1bd200b0020256b24f35mr20611354pjb.65.1664524844810; Fri, 30 Sep 2022 01:00:44 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a63:6cc4:0:b0:43c:2618:9c3f with SMTP id h187-20020a636cc4000000b0043c26189c3fls2270935pgc.9.-pod-prod-gmail; Fri, 30 Sep 2022 01:00:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5gwkNURWFXB0wHnF6faGYHqDfyowL2znpghIPdfRa7i19AuekNL3XaxYcYEd2W9vLvUB2K X-Received: by 2002:a65:6bca:0:b0:420:712f:ab98 with SMTP id e10-20020a656bca000000b00420712fab98mr6484013pgw.350.1664524842997; Fri, 30 Sep 2022 01:00:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664524842; cv=none; d=google.com; s=arc-20160816; b=slD4pEoY16Upd/8NnHABoz23Q6rz88ur0jYnICeiIuQl/iC6fQEohJucfwji/jR4BA XFADzKI7PJ7NZ9hmqBQgo7/GFMgUBiJF00AqAnFIn+SnICdO7stlqoypERXmJVGDBvAX pISRpQdNCDDJ7Rn6/I1UmKph+0NAjoWVpFXX5yGwUNLcHm0cZ9gsTw2DGBRRXiu3H0/3 m3UVG1oewZHbPDyfHfTaODn31A7ia/e1UKdcCfXQ89uDfW0CQXgvUQ52eSdzD+5hvagi QbKYggz2eo56lyd4QrUygjT4omvyqhNrg1F/gt+aXCz46yfiBVUDAMqsVq5ViKrZ4tGv y0mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=4lTlOWv+8tHZd5Y6dKWvBrW0YEB/7DSMVXMuyYZTukM=; b=Y9Pn37O80hh6BGqS7HWPDq26o/IkmyeZnkwdInbvfpSvscOepfi+cYXKA2q5BN5TeD alpC9QRSXh23EYnAT6DmWQDrseE8EzXIakHNPxTE2kk2FZbnQHlH1Q8Wgx/7FAaDDbjn T6C7zSu71Au7nrhfCMKpBkltZwMKY/GYRp/IBM/+anJ7uOW61p1fGKLfHPr7WRMUSYGI vIfxSymID3NcnQVnKUMmulBN773goWFKf7MOb3psiIz4fTqVRqnyrQ+wMxsoT1mhpZpQ eJaqyGgD/cjbmqVpXBVJSmwqiu9k7cN/5BadL0GI4myQpCVZdsk/05PXxwr3DzPhunz+ EnVA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hwoTgdJr; spf=pass (google.com: domain of roberto.foglietta@gmail.com designates 2607:f8b0:4864:20::d30 as permitted sender) smtp.mailfrom=roberto.foglietta@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com. [2607:f8b0:4864:20::d30]) by gmr-mx.google.com with ESMTPS id k5-20020a170902c40500b00176c0254bc2si86455plk.8.2022.09.30.01.00.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Sep 2022 01:00:42 -0700 (PDT) Received-SPF: pass (google.com: domain of roberto.foglietta@gmail.com designates 2607:f8b0:4864:20::d30 as permitted sender) client-ip=2607:f8b0:4864:20::d30; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hwoTgdJr; spf=pass (google.com: domain of roberto.foglietta@gmail.com designates 2607:f8b0:4864:20::d30 as permitted sender) smtp.mailfrom=roberto.foglietta@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-io1-xd30.google.com with SMTP id p202so2701913iod.6 for ; Fri, 30 Sep 2022 01:00:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=4lTlOWv+8tHZd5Y6dKWvBrW0YEB/7DSMVXMuyYZTukM=; b=hwoTgdJrDwO/2SiL3EG+64fFdYXdkDiru5AtanFlLTrrTJQlj9jeW4jo3PZWo0b/GT jqAUgdZrFJmQllUyQReaUokJsYikbUIgjtjuLiwxirInlpvJTS+NA5AJhDXd6V83Q/5D qaRyBySZMNajmXSB5CTNNbfNVJiSRE42vzT9uqeHiwZkY7RsCNlVqkk+BLyS6S+oy8ZA Mxo/hlZGYd9jdN5WZbpoHnU0CIiSp0irYijoOQlT81mv0329ERy2rBLsuAUeE7sSzfwq r8GJum8fPgJEFHmYVZx4OxBtxKuxzIuM59SjsOSu0kJUD5svBHu3DLTgYt7XoIGpmw1P t5qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=4lTlOWv+8tHZd5Y6dKWvBrW0YEB/7DSMVXMuyYZTukM=; b=GiF5sM362GN4yQIvfW3wCBML2LMmuQzQNxuzluLuPSOD7e5G5wJDsvLV8KZ1NuGS3g pmZdvCn60G24ljG0bskzDE0XplLCCK6IA/Gm0Ebua11eIQIGSksQgKTB/YvTLHK/11vU ot1CXAcbX3yweGsQmn6lhpJYcDf4WGcGApeVgHHN6DrZrrnKYM+re+Ib4GqACjMEy9gl dkL4ptdHQPLu1xYb7JZm4KJYshF+UbbOn73TP9NMi+IhIi2nHYyB+Jn+COB/5wVdf0Ta 2r61PtWkIjRSyz+c7ijXLlOrL0RBL2vN71YYanRH42WF7aBPyJzf3vUX1DZD/y7eCn6L m/lQ== X-Gm-Message-State: ACrzQf1j4iuPrEKAgRPhvuYwBoMazlltUOeNRzdqarOVbKzqnUVcorG2 eS1MuY8cm7yNlcieZLzQVa2Yr3RyrXfZSKJdOJt944r0qg== X-Received: by 2002:a05:6602:2b84:b0:6a3:211a:4782 with SMTP id r4-20020a0566022b8400b006a3211a4782mr3527005iov.208.1664524842348; Fri, 30 Sep 2022 01:00:42 -0700 (PDT) MIME-Version: 1.0 From: "Roberto A. Foglietta" Date: Fri, 30 Sep 2022 10:00:31 +0200 Message-ID: Subject: Re: [PATCH 1/1] expand last partition supports btrfs (inline test) To: isar-users@googlegroups.com Content-Type: multipart/alternative; boundary="000000000000f2b77c05e9e06329" X-TUID: jj+PpIyFxQxc --000000000000f2b77c05e9e06329 Content-Type: text/plain; charset="UTF-8" >>From 67c4ea67ac96276c5ec0e6b15d035543b99b8e04 Mon Sep 17 00:00:00 2001 From: "Roberto A. Foglietta" Date: Thu, 29 Sep 2022 15:36:48 +0000 Subject: [PATCH] expand last partition btrfs support added improvement, expand-on-first-boot: support for btrfs added Signed-off-by: Roberto A. Foglietta --- .../expand-on-first-boot/expand-on-first-boot_1.1.bb | 2 +- .../expand-on-first-boot/files/expand-last-partition.sh | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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.1.bb index 1703a64..d41dd83 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.1.bb @@ -9,7 +9,7 @@ inherit dpkg-raw DESCRIPTION = "This service grows the last partition to the full medium during first boot" -DEBIAN_DEPENDS = "systemd, sed, grep, coreutils, mount, e2fsprogs, fdisk, util-linux" +DEBIAN_DEPENDS = "systemd, sed, grep, coreutils, mount, e2fsprogs, fdisk, util-linux, btrfs-progs" SRC_URI = " \ file://expand-on-first-boot.service \ 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 759ff8b..5b73dc4 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 @@ -61,4 +61,9 @@ partx -u "${LAST_PART}" # when using systemd mount units. export EXT2FS_NO_MTAB_OK=1 -resize2fs "${LAST_PART}" +if ! resize2fs "${LAST_PART}"; then + mkdir -p /tmp/btrfs + mount "${LAST_PART}" /tmp/btrfs + btrfs filesystem resize max /tmp/btrfs + umount /tmp/btrfs +fi -- 2.30.2 --000000000000f2b77c05e9e06329 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
From 67c4ea67ac96276c= 5ec0e6b15d035543b99b8e04 Mon Sep 17 00:00:00 2001
Fr= om: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Dat= e: Thu, 29 Sep 2022 15:36:48 +0000
Subject: [PATCH] = expand last partition btrfs support added

=
improvement, expand-on-first-boot: support for btrfs adde= d

Signed-off-by: Roberto= A. Foglietta <roberto.fo= glietta@gmail.com>
---
=C2=A0.../expand-on-first-boot/expand-on-first-boot_1.1.bb=C2=A0 =C2=A0 =C2=A0 =C2=A0| 2 +-
<= div dir=3D"auto">=C2=A0.../expand-on-first-boot/files/expand-last-partition= .sh=C2=A0 =C2=A0 | 7 ++++++-
=C2=A02 files changed, = 7 insertions(+), 2 deletions(-)

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.1.bb
index 1703= a64..d41dd83 100644
--- a/meta/recipes-support/expan= d-on-first-boot/expand-on-fi= rst-boot_1.1.bb
+++ b/meta/recipes-support/expan= d-on-first-boot/expand-on-fi= rst-boot_1.1.bb
@@ -9,7 +9,7 @@ inherit dpkg-raw=
=C2=A0
=C2=A0DESCRIPTION =3D= "This service grows the last partition to the full medium during firs= t boot"
=C2=A0
-DEBIAN_D= EPENDS =3D "systemd, sed, grep, coreutils, mount, e2fsprogs, fdisk, ut= il-linux"
+DEBIAN_DEPENDS =3D "systemd, se= d, grep, coreutils, mount, e2fsprogs, fdisk, util-linux, btrfs-progs"<= /div>
=C2=A0
=C2=A0SRC_URI =3D &quo= t; \
=C2=A0 =C2=A0 =C2=A0file://expand-on-first-boot= .service \
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 7= 59ff8b..5b73dc4 100755
--- a/meta/recipes-support/ex= pand-on-first-boot/files/expand-last-partition.sh
++= + b/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.s= h
@@ -61,4 +61,9 @@ partx -u "${LAST_PART}"= ;
=C2=A0# when using systemd mount units.
=C2=A0export EXT2FS_NO_MTAB_OK=3D1
=C2= =A0
-resize2fs "${LAST_PART}"
+if ! resize2fs "${LAST_PART}"; then
+ mkdir -p /tmp/btrfs
+ mount "${LAST_= PART}" /tmp/btrfs
+ btrfs filesystem resize max /tmp/btrfs
+= umount /tmp/btrfs
+fi
--=C2=A0
2.30.2

--000000000000f2b77c05e9e06329--