Message ID | beff349aa8453fab1e13d87fb1bf5367bed41df2.1704632056.git.jan.kiszka@siemens.com |
---|---|
State | Superseded, archived |
Headers | show
Return-Path: <isar-users+bncBCJI7SMNV4NBB7V55KWAMGQEBKQCVYQ@googlegroups.com> Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Sun, 07 Jan 2024 13:54:30 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-il1-f185.google.com (mail-il1-f185.google.com [209.85.166.185]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 407CsS9N011583 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <iupwgm@isar-build.org>; Sun, 7 Jan 2024 13:54:29 +0100 Received: by mail-il1-f185.google.com with SMTP id e9e14a558f8ab-35ff20816f7sf11687815ab.1 for <iupwgm@isar-build.org>; Sun, 07 Jan 2024 04:54:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704632062; cv=pass; d=google.com; s=arc-20160816; b=MRqbsySn+3G+B14HQZxAG6YcKMs5KPTxl2kDfqtM/OyKaU2IE4dRaXF2CaxBbuHLSO uXLtdKMjKdMY02SLa81+wQfTWDXXvrH/NEyFBuEPDeMP0RCfuTrI3PP3SV4pf6SRoO30 60eSWWh6exUdBhQZS1qIzsMX8Y+TpgrGnYZwaXR1Q83i6/ETGJ7znXTuS4NQM221KKp8 jQGH4OHEszuhVlOXnzp7TN9qkRdjjFjZiR2YnwnPFOm30cIWYnbJtM1fnPv91t5kPIlQ 7qUYHrGKRLgJ2E8SFEwIgxPutD9n7AMIvS/GEYqGAlyusSFZLqBj9/HN0caMo+ZtWxBc 3Muw== 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=Q15Eu+EE0IniHw9kMqiN9D+j8r0WICnXwd2OpRjroVo=; fh=IlHmq1Kl6WDqsYIcQXzwFqB72MHx6soicqMlhBagVr4=; b=aSLbgh4si3x1Vy/6pMzOF3oQZHW57Qi967FgZ1lJifpBCL0gutNWeQ5aSUqo7KkbcK NFb7m6ZFHn/OGjO7mbV3jm9SrCNbfrP6BcZ1Tvxd9WpuC/dOQmT+tX1ngv/+482l31Vz uNvT2R8SoCseTNGqcFPr9NkLGASi10aWgTgELTEOHWtFFeTuntZP4kTgkjPsvdodPthh TmbJAU9i1E8x7d5ZflcUOIjhHWt+dTBHXhIdbmmbnEbwQ7dN4Z2vsGCCzg2RSvtJ26ky EeNrGPXi2RotqzpJCza94Zqr2BgG00AaFneuYQtQehJTpMjPMjgTtzRjKMqjh8gJpLgZ HmrQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=LeKKX2g9; spf=pass (google.com: domain of fm-294854-20240107125419e0aed98e6d7911eb56-njnvsw@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-294854-20240107125419e0aed98e6d7911eb56-NJnVsW@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=1704632062; x=1705236862; 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=Q15Eu+EE0IniHw9kMqiN9D+j8r0WICnXwd2OpRjroVo=; b=sFc+f6IgBB/EvwUqC1zxZgu+R6apoN+O78BfedfUTn/kavHMgtQO6ZSJ5a59g7TeUL Dv1Bms2wAEMak09HfwS4/VIGXbgmzDrND4qG/JeQfO5Jzj6yBk63deiIF1wyEENSAq/m PMqxxn/ykNzg/aBQbJnjJaAa6df87RCGuK3kYqiOWHAyh5SQfHYyWQ0C0+phvyuCBKIZ NIF+wSLxDYlSIjdRKuoIJB3CdDkKQFSBrxtl7mMf0bjgNU1+RCEhHOA9CcxO4x51FnIJ 4t5b2BkmMJii+9N/rPGQyDyMcJQwhpN/2isynQjV/FIjxrr87Bx2vX4il2EJjRJ+0iwg udVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704632062; x=1705236862; 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=Q15Eu+EE0IniHw9kMqiN9D+j8r0WICnXwd2OpRjroVo=; b=nzxXFLieHbJfVyijojGK9KGdx7Bpr6/yyM02XkRIKuuP6ZRJObTklhvkhZIeEZaFfA IMeWOzmgHG/WtKQ2m21LGBee8UENHaRsLElEc74gCE87kBt8qDpZKHrZYTh8EL+RsFIa gHiZeUToOOatYtAVSTTE7SKSTegnXF62Cp3JKzUTfw0CZh+HWcsbILNLnl9qrtOYYmlf RbFDyLHld6xgx1URZ802sn/wcVi9TFWaDgqm6ghV2pd4KOh8HMYHCMTkAIwCkYt79VPy +FV33DjClnw5QggZFHSVOVZbK1xUxfVCawUyKaoSyK6Rdcrc5tJaE21787v3T4cnNYFQ WzPQ== X-Gm-Message-State: AOJu0YzKrnXJw6SrId539e3VnlsKF2iIyDsquunbBHuvjXe+QQomZc8b YE6KYxLhJdRAnqYRyqenlNE= X-Google-Smtp-Source: AGHT+IF14fHbkweqbWfn1KKjWkulICxJYzs6LiEP/bP91KyQLKHad0KGnsb6I/OyQtkxZLGb6JyNqw== X-Received: by 2002:a05:6e02:164c:b0:35f:75df:5310 with SMTP id v12-20020a056e02164c00b0035f75df5310mr4397354ilu.21.1704632062142; Sun, 07 Jan 2024 04:54:22 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a92:b752:0:b0:35f:95c1:96a5 with SMTP id c18-20020a92b752000000b0035f95c196a5ls405235ilm.2.-pod-prod-04-us; Sun, 07 Jan 2024 04:54:21 -0800 (PST) X-Received: by 2002:a05:6602:3812:b0:7bc:b59:a593 with SMTP id bb18-20020a056602381200b007bc0b59a593mr3855948iob.21.1704632061458; Sun, 07 Jan 2024 04:54:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704632061; cv=none; d=google.com; s=arc-20160816; b=yHkOK0MyctFzlwIsT5UlFmvNCEwJOt9woeoQPSq52NxLorf8/lyu8iBe/86KtkoUaU I1kFbUTMek3oydOMWR9ltyI2aF8k9m1YbOJr6AMq9Kj8jrp+OC3HQCINexmxmN2tpryJ SUunNGvBtixvKHmNSUQLETxQ36lqEKrjjuYZSsfPlT3ud2lTXcJUoyQZNzVPsi1FOOXh nuMh9NxqNcbrpfX4VWHgIuKxOptt1yuN+KSH0TMmG/RLF/CM2IYKhJtseXavBEnJLduq QdUzUZPez9J3/uVb+IC690RTGn1FC7VGBm17+2Xuw5+GjOe/4SjBycyS0PihB9Xsz6L4 /eQg== 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=qN6MsepT48aN3CvWoJt5tBH3KT0scf+fVshys0iOrPStRS3tlOaLFNShkGHRmiTm1J QtDWtj7bEaTklmjgn+uasZ454bq7wOBiQxLKEW64zYLdh+8iNdxunILoBsfUzy6iILT9 y374mCcyD3SgKOgkYLt7lEpJA7ao/wpQ/0dV6mgn1cNJ+9nInr034xWcA0s52YFQzZ25 Y/nMFKOn9UInOO2ZCTJZeOrE58iRknv+rI8Q14F3EV7ffSBv1AKtvxRZHBPOf17dYnjD +jf9uH6S9eOp1o4Br3TdLaOqTFZlAiJK3LoYoNGeupkZ9WLebMMUx2GtAk+/GDy6mBDJ Vung== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=LeKKX2g9; spf=pass (google.com: domain of fm-294854-20240107125419e0aed98e6d7911eb56-njnvsw@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-294854-20240107125419e0aed98e6d7911eb56-NJnVsW@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net. [185.136.64.228]) by gmr-mx.google.com with ESMTPS id z20-20020a056638241400b0046e0a7d5fffsi261198jat.2.2024.01.07.04.54.20 for <isar-users@googlegroups.com> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Jan 2024 04:54:21 -0800 (PST) Received-SPF: pass (google.com: domain of fm-294854-20240107125419e0aed98e6d7911eb56-njnvsw@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) client-ip=185.136.64.228; Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 20240107125419e0aed98e6d7911eb56 for <isar-users@googlegroups.com>; Sun, 07 Jan 2024 13:54:19 +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 9/9] expand-on-first-boot: Preserve MBR on expansion of GPT disks Date: Sun, 7 Jan 2024 13:54:16 +0100 Message-Id: <beff349aa8453fab1e13d87fb1bf5367bed41df2.1704632056.git.jan.kiszka@siemens.com> In-Reply-To: <cover.1704632056.git.jan.kiszka@siemens.com> References: <cover.1704632056.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=LeKKX2g9; spf=pass (google.com: domain of fm-294854-20240107125419e0aed98e6d7911eb56-njnvsw@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-294854-20240107125419e0aed98e6d7911eb56-NJnVsW@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}"