From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7149079772069363712 X-Received: by 2002:a81:a606:0:b0:350:eac3:757f with SMTP id i6-20020a81a606000000b00350eac3757fmr7979652ywa.231.1664537686497; Fri, 30 Sep 2022 04:34:46 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a81:9153:0:b0:356:2493:fb2b with SMTP id i80-20020a819153000000b003562493fb2bls815294ywg.1.-pod-prod-gmail; Fri, 30 Sep 2022 04:34:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7VdECS1ACOTJuu/EZwsJkvzpAO3iYP9NjT9GlKbteNYtUpzMaQbihzRDcSTSS+WhRVLcjc X-Received: by 2002:a0d:f685:0:b0:343:bd3d:80b2 with SMTP id g127-20020a0df685000000b00343bd3d80b2mr7835306ywf.485.1664537685786; Fri, 30 Sep 2022 04:34:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664537685; cv=none; d=google.com; s=arc-20160816; b=wEnRF/BErhfyuvwfSByIiQR+BkGyfVZYskRnXtYG8e2KyjMj5HH8VhUTglW5wpd7tM egdHmHAFU70G9Mblpe5gFwx1/8sv32WhXPo8qtI2Xj+54cyO7uona63GYW8SHR83sQdT ArHThaMiTklo2EBTIwd2FfDv30F9nqecyehSMnTiQmZ5xb4D6hdTabjMqHBdU/Q5wBce cdWhBwwHK4mHgv0SU8479hbs65SpoG1KmOB5GpdZjj5LG0E1kbA4DhgJYgm7mXTS4L1D xjFhybX4ASV6F8q6rsPG1WzSBhFuiDr8Uq8VAVKP9KZmt8uVRECocK5A8xU5dlU+CAuD f+hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=8CMWPwX2JMZqWWs/w9a2UWFIsZQfVRTjB50Y4tItFiw=; b=y2BF/jQAZFJUB+J4DDxK/+vLipVJcRU9x9R7bmkOwrffo3iIAGnW5dDBwHR+qdsvON /ivCdvo0Ei8Y9cbo76Kjuz0bBLDDPDNeIU4AIHoFiue7onvjjqi+vYrRQY+kEuThnQ4h HOHftACP4Hmr03jjqgWAX5tGoqMOtFSjDavAY3uR3kxS94ILqoVuQoPXiPnNHsxy9grz cGEJAbzVq/gXtfIBnHirCn7LqGgzqmnTw3cXI2CBCze3kdiwGqWkfsTWlrmgHbE5Qmpt 9ER9wcaykFEFX+tNHQzMs7WB0opiY95qKk2Lrgdin5dBhj97FiWWkdX1Pqapteqnc8+X O+og== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kj93SAz1; spf=pass (google.com: domain of roberto.foglietta@gmail.com designates 2607:f8b0:4864:20::12a 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-il1-x12a.google.com (mail-il1-x12a.google.com. [2607:f8b0:4864:20::12a]) by gmr-mx.google.com with ESMTPS id i136-20020a81918e000000b003531377378fsi156895ywg.1.2022.09.30.04.34.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Sep 2022 04:34:45 -0700 (PDT) Received-SPF: pass (google.com: domain of roberto.foglietta@gmail.com designates 2607:f8b0:4864:20::12a as permitted sender) client-ip=2607:f8b0:4864:20::12a; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kj93SAz1; spf=pass (google.com: domain of roberto.foglietta@gmail.com designates 2607:f8b0:4864:20::12a as permitted sender) smtp.mailfrom=roberto.foglietta@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-il1-x12a.google.com with SMTP id i9so1796665ilv.9 for ; Fri, 30 Sep 2022 04:34:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date; bh=8CMWPwX2JMZqWWs/w9a2UWFIsZQfVRTjB50Y4tItFiw=; b=kj93SAz1gmIckjg16JMP5y2fEmSXL4xKBQhpiKg0yp9hQvmjmocq4P3p/tVqbyCRl9 oa7VVN5vohE5qbvqof3264kUd53dDo7FNTQnZvlFsKCdf7Nr6R+0G7RE7n5btuLCzVAW +3XMbr7UD0+U5z3KqYe05QeOuHn2W4qPmg+p2sa86HoG6P+bDPCgMtstZ5orSHVlYY7V fmbfLnxPhLPUiljhSavodc9jOK1menFtMYWFRRYTqEDLSU6hrP6ocbNvOH+wUWO6TzaK qYRSIkLcYTVC8S6Rej2nIEBpmFpsAdg0idPTBYGzQjcn4iopgz3ic1YhnhYp1f067R/y aVsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date; bh=8CMWPwX2JMZqWWs/w9a2UWFIsZQfVRTjB50Y4tItFiw=; b=VvAcgMxyWflJNeGgnkxDxVeJGSg4JDPkbqvjQeYXhR5ycQBQaURdVZpsKDQ3EW+KJL k7W02sVTSb69lRJ99PJvy3F1Vblt7XuSkeRBhFUz779YD4l6FT4KyGdtdWcs2bb+9o5C rWgZE9OxhEcCLVWB9PoLih48Qyox8GNMxaJRfg6j0spj3+LNdZP1mt7IpWTHg/t0TYfu Tk127rpcyG9OiCVdHXXxZh4pM4oe1NgaHCu6AMGfbuZMyAOk6KcXBHhJAUwWymxdmoYk ZUwX1fK/G+mxRJm0QD5dDywmP2R4dESERzv/fv+Go+A/5d4qn8MC5a7L1VouZhHrp4GQ mfwA== X-Gm-Message-State: ACrzQf3L8I1mgwlG17zkrukpuI+2GojbgtJp4bpcdkcPtqAf8ICvtgpY TfDTsLItAKaU1jq408zsTUOgE7VDYHEg4U5OjCntmTTB1g== X-Received: by 2002:a92:ca4d:0:b0:2f9:3e9e:e566 with SMTP id q13-20020a92ca4d000000b002f93e9ee566mr3178547ilo.165.1664537685151; Fri, 30 Sep 2022 04:34:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Roberto A. Foglietta" Date: Fri, 30 Sep 2022 13:34:33 +0200 Message-ID: Subject: Fwd: [PATCH 1/1] expand last partition supports btrfs (inline 2nd version) To: isar-users@googlegroups.com Content-Type: multipart/alternative; boundary="0000000000007053f405e9e36147" X-TUID: muRocluyyCL+ --0000000000007053f405e9e36147 Content-Type: text/plain; charset="UTF-8" Change before the first version: rmdir /tmp/btrfs added to avoid polluting /tmp here hand edited. >>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 && rmdir /tmp/btrfs +fi -- 2.30.2 --0000000000007053f405e9e36147 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Change before the first version: rmdir /tmp/btrfs adde= d to avoid polluting /tmp here hand edited.

From 67c4ea67ac= 96276c5ec0e6b15d035543b99b8e04 Mon Sep 17 00:00:00 2001
From: "Roberto A. Foglie= tta" <roberto.foglietta@gmail.com>
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-b= y: Roberto A. Foglietta <roberto.foglietta@gmail.com>
---
=C2=A0.../expand-on-first-b= oot/expand-on-first-boot_1.1.bb=C2=A0 =C2=A0 =C2=A0 =C2=A0| 2 = +-
=C2=A0.../expand-on-first-boot/files/expand-last-= partition.sh=C2=A0 =C2=A0 | 7 ++++++-
=C2=A02 files = changed, 7 insertions(+), 2 deletions(-)

<= div dir=3D"auto">diff --git a/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.1.bb b/meta/recipes-support/expand-on-firs= t-boot/expand-on-first-boot_1.1.bb
inde= x 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 dpk= g-raw
=C2=A0
=C2=A0DESCRIPTIO= N =3D "This service grows the last partition to the full medium during= first boot"
=C2=A0
-DEB= IAN_DEPENDS =3D "systemd, sed, grep, coreutils, mount, e2fsprogs, fdis= k, util-linux"
+DEBIAN_DEPENDS =3D "system= d, sed, grep, coreutils, mount, e2fsprogs, fdisk, util-linux, btrfs-progs&q= uot;
=C2=A0
=C2=A0SRC_URI =3D= " \
=C2=A0 =C2=A0 =C2=A0file://expand-on-first= -boot.service \
diff --git a/meta/recipes-support/ex= pand-on-first-boot/files/expand-last-partition.sh b/meta/recipes-support/ex= pand-on-first-boot/files/expand-last-partition.sh
in= dex 759ff8b..5b73dc4 100755
--- a/meta/recipes-suppo= rt/expand-on-first-boot/files/expand-last-partition.sh
+++ b/meta/recipes-support/expand-on-first-boot/files/expand-last-partit= ion.sh
@@ -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 && rmdir /tmp/btrfs
+fi
--=C2=A0
2.30.2

--0000000000007053f405e9e36147--