Message ID | 7dfba7df31dc420bab90708cf81f56c0c3114563.1705239574.git.jan.kiszka@siemens.com |
---|---|
State | Accepted, archived |
Headers | show
Return-Path: <isar-users+bncBCJI7SMNV4NBBG6IR6WQMGQEPX3TJ6Y@googlegroups.com> Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Sun, 14 Jan 2024 14:51:05 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-qv1-f55.google.com (mail-qv1-f55.google.com [209.85.219.55]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 40EDp4PZ017248 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <iupwgm@isar-build.org>; Sun, 14 Jan 2024 14:51:04 +0100 Received: by mail-qv1-f55.google.com with SMTP id 6a1803df08f44-68148956d0fsf35046176d6.3 for <iupwgm@isar-build.org>; Sun, 14 Jan 2024 05:51:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705240258; cv=pass; d=google.com; s=arc-20160816; b=VtuFzz5Bmf642T/AVbtlwnllyJNAhexl9ApbgZPZsp5L7WA3pz5T5yk1PLS2hrbkhX c2ogyZN1crtgYYL9ZCK+SuhuKsbvidYRBn5hckynaLjRyB5HkgXzpjSCER6ghWQS2y2B mUWhO6jSeHWN5qbE/Yro7bjrDu6OqtU7RldKYxCZSEwF8m1se0Rw5Z+S/Qyf9RKfR3U0 QGFwOX9yAbZb7kYKyo1bsm9SFd26biVhNW2VA4S0jnpt7BAMzzx8Ra6BpiJtUK6za9gi 8MVzh7Mg7qrUbctCcK9Q/086QMR29Vat+FE5z/l83CdPUOY4FKCQq0mNNEzo9rMNUwji 6irQ== ARC-Message-Signature: i=2; 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:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qvEqW04rni6Se+spqWZTn/FQfeo6TUdW2lZMpBYbEB8=; fh=IlHmq1Kl6WDqsYIcQXzwFqB72MHx6soicqMlhBagVr4=; b=IVa6yx5+FwEqoAlA/UCpyt+7NgIfLnMroWFMfJhqbtmAV4tPWnAnYXnW743ZOPDBod v+5gYOvObFriNLYKC6Yo+rmIbnynVXVuugjQFcRHQTb/gRpjW+RRAoN94yDagr0Q6/VT q4GshhlTSOjL/VRz/MKnySZrWM+e+6840UnfaXduO5af4DRmClWWOWW+mXvUdrGgzSPh jIuzWI95mUY4UJjd0O2bxh1jALy5Au28CtxxQTzL/hJcgE3FuDF3NCLqMG1b42g4TRfc Fuo7V9LyqKLe1DWeu2mNoJo/DD3qspf+m1ewvS/ysqDzZZjegWMBD8F/DtQnljTT2d11 nXbA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=A5EAafTG; spf=pass (google.com: domain of fm-294854-20240114133937f547f83e5dc83a6a11-m8ve8q@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-294854-20240114133937f547f83e5dc83a6a11-m8Ve8q@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1705240258; x=1705845058; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=qvEqW04rni6Se+spqWZTn/FQfeo6TUdW2lZMpBYbEB8=; b=ZHKPFFEjAqBHF+PrSKzsZOm77LsA6HOHOkFPsk0INo0VuYwXaAcTNTZOERuhJmCrCa 3Gmx5GI6BZZKLIc1BOTXAx626KD59U3sMpHmWc4mnKmRqKNB6xv75CX0o1/aT9sk0kdL 6QtnR0zbEWx2TsQdC3eSyh+b1HYhJOT1NPp/m1mFTlAybAsWJ7Z682ofuYQDEvNSqR80 Ceu1KZwse02vy0iV9gWIVNpcCYk7gY5QKVmpQ0IZa2tFkgAB4yM8/BH6xECSfajdzpu8 JCdIGjNZYQEDlUUoZhPmPhW9YVGLHJuVw1l3IQWc+x6mlo5dgI2PekGJCJlp2hCnQbKl L+eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705240258; x=1705845058; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qvEqW04rni6Se+spqWZTn/FQfeo6TUdW2lZMpBYbEB8=; b=DlxeRjK5xada1tfPHGxtfYESuqgsMNo8GLTsqWlZNCn81g/i/MSTZ1+9hhvn0v7ipX jSRAP/EWpPO7fetDjojuUh2agIvOsDAA2YIyX9WjCUn30wibB6J5KGIp3GK73yfRWQld GJhVE7MEvdA0qJtxBsn2bLJ1BiRRQB4U4ioywozYMkDczugOfHniXJEhkiSxuo80jFjK 9HYt9ECnBV2VuGuRO4YO7gMDbPq0n24Vk7QLegzD2U6z17naoRWIcpQ7KSDZWcCzsTyK QVq6VywbRrU7qyF7VfTUWy5f3633CsM2rKAjXrg+VnHoWKnr7oDlSVFCiCq+VbciXbqx i1xw== X-Gm-Message-State: AOJu0YwocfGMKKMRDDEhKcC4kHj/SpZhMwbMGtxy8yKMxuExJ+oTIXT1 0+z11lPFAjuXL4JH/eVH6Sc= X-Google-Smtp-Source: AGHT+IGEbdWOM9aYlwaZE0zkLpTMA1AQotExuYecZ9EOwzieN2i4njzK0PzYk0VfXWWPky5HFM7P2A== X-Received: by 2002:a05:6871:e007:b0:1fb:23:6feb with SMTP id by7-20020a056871e00700b001fb00236febmr6511829oac.39.1705239580007; Sun, 14 Jan 2024 05:39:40 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6870:1b89:b0:203:d1ed:2a38 with SMTP id hm9-20020a0568701b8900b00203d1ed2a38ls1159611oab.2.-pod-prod-01-us; Sun, 14 Jan 2024 05:39:39 -0800 (PST) X-Received: by 2002:a05:6808:3308:b0:3bd:4cc0:3ba1 with SMTP id ca8-20020a056808330800b003bd4cc03ba1mr5676996oib.16.1705239579332; Sun, 14 Jan 2024 05:39:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705239579; cv=none; d=google.com; s=arc-20160816; b=z7Ju85FtCkF4Qz9DlpfZlKoVQxjaX4Eimjtom07o+fgUzDsfZ3xe97m2WO7Jcg1sH4 DgPrP92vG/X5RjQaLqw+0PVsrKU6zwFaOd/UCZ0dOmEWpBNmZ696MGA5y6hUp5rA2xG+ 7SOo7P1c0lm3wVwQk5kPFZk1DUY2PIVqRZO8MRDsXwdhnuLJHWpsoBI6kFHuNUP21cBk c7PQiz/U82CxPhi5Y+2udiGaYntXJ1Na/rEd4uc76xPsVVNzuCfbXpZ+wTYRG6Qno6lK cp3su0EP5ALJOMVJIu3GcfV/Ajl6/M2rgi4JrUgjXA54qgw0CsDP/EU26Pqi6bC9Er58 IXCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=AP3elxsP1Woa7qcw0PZXatE2eK58nbYv8KHWaCswI1M=; fh=IlHmq1Kl6WDqsYIcQXzwFqB72MHx6soicqMlhBagVr4=; b=uoJmN+8sovCdtJgR+pRqZCNSbOF1mo7YHA0TlAXSisVYJdaBQdwzbJoiewSl7aH6IL t4xFdWmHc8HG081Bv3SBvSxqJZQyu/db8Ded7qCgT6RCD0fUd/IicHAahMBSpDMEvaQF qS3T5hC5MpEC3s3Wmcw5r5Bqj18q48jg427/qhrDUHWdDuCTXZniHLaRqFLyfloE2ayf 0nmI5uc8ZS5WnmT8UnnV3O5hwHvpJDlTE5ASZ0m3KMrIOeg5fNTQG7fbd+2wX+/tKtgO JIpkpe6WhZVBi4Og+fYGmDMODNMzGfMc+O7AreqL7QD91+t1jqm8PCZWQ+n6cG6WoOQp jk2w== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=A5EAafTG; spf=pass (google.com: domain of fm-294854-20240114133937f547f83e5dc83a6a11-m8ve8q@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-294854-20240114133937f547f83e5dc83a6a11-m8Ve8q@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-227.siemens.flowmailer.net (mta-65-227.siemens.flowmailer.net. [185.136.65.227]) by gmr-mx.google.com with ESMTPS id j13-20020a63550d000000b005cdfe3274b9si502681pgb.4.2024.01.14.05.39.39 for <isar-users@googlegroups.com> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Jan 2024 05:39:39 -0800 (PST) Received-SPF: pass (google.com: domain of fm-294854-20240114133937f547f83e5dc83a6a11-m8ve8q@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) client-ip=185.136.65.227; Received: by mta-65-227.siemens.flowmailer.net with ESMTPSA id 20240114133937f547f83e5dc83a6a11 for <isar-users@googlegroups.com>; Sun, 14 Jan 2024 14:39:37 +0100 From: "'Jan Kiszka' via isar-users" <isar-users@googlegroups.com> To: isar-users <isar-users@googlegroups.com> Cc: Nishanth Menon <nm@ti.com> Subject: [PATCH v2 09/11] expand-on-first-boot: Preserve MBR on expansion of GPT disks Date: Sun, 14 Jan 2024 14:39:32 +0100 Message-Id: <7dfba7df31dc420bab90708cf81f56c0c3114563.1705239574.git.jan.kiszka@siemens.com> In-Reply-To: <cover.1705239574.git.jan.kiszka@siemens.com> References: <cover.1705239574.git.jan.kiszka@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer X-Original-Sender: jan.kiszka@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=A5EAafTG; spf=pass (google.com: domain of fm-294854-20240114133937f547f83e5dc83a6a11-m8ve8q@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-294854-20240114133937f547f83e5dc83a6a11-m8Ve8q@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Jan Kiszka <jan.kiszka@siemens.com> Reply-To: Jan Kiszka <jan.kiszka@siemens.com> Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: <isar-users.googlegroups.com> X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: <https://groups.google.com/group/isar-users/post>, <mailto:isar-users@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:isar-users+help@googlegroups.com> List-Archive: <https://groups.google.com/group/isar-users List-Subscribe: <https://groups.google.com/group/isar-users/subscribe>, <mailto:isar-users+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+914930254986+unsubscribe@googlegroups.com>, <https://groups.google.com/group/isar-users/subscribe> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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?= |
Series |
Add support for BeaglePlay
|
expand
|
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 7d658864..e6dbd62e 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 @@ -38,6 +38,11 @@ if [ "$DISK_SIZE" -lt "$MINIMAL_SIZE" ]; then exit 0 fi +IS_GPT="$(sfdisk -d "${BOOT_DEV}" 2>/dev/null | grep -q "label: gpt" && echo 1)" +if [ "$IS_GPT" = "1" ]; then + dd if="${BOOT_DEV}" of=/dev/shm/__mbr__.bak count=1 +fi + LAST_PART="$(sfdisk -d "${BOOT_DEV}" 2>/dev/null | tail -1 | cut -d ' ' -f 1)" # Transform the partition table as follows: @@ -54,6 +59,11 @@ sfdisk -d "${BOOT_DEV}" 2>/dev/null | \ sed 's|^\('"${LAST_PART}"' .*, \)size=[^,]*, |\1|' | \ sfdisk --force "${BOOT_DEV}" +if [ "$IS_GPT" = "1" ]; then + dd if=/dev/shm/__mbr__.bak of="${BOOT_DEV}" + rm /dev/shm/__mbr__.bak +fi + # Inform the kernel about the partitioning change partx -u "${LAST_PART}"