Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Aug 2022 14:06:14 -0400
From:      Ed Maste <emaste@freebsd.org>
To:        Glen Barber <gjb@freebsd.org>
Cc:        Mark Millard <marklmi@yahoo.com>, Warner Losh <imp@bsdimp.com>,  "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>,  FreeBSD Hackers <freebsd-hackers@freebsd.org>, freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: Looks like the arm 20220805 snapshots are still odd, so probably kern.geom.part.mbr.enforce_chs=0 was still in use
Message-ID:  <CAPyFy2AfGxgND-2KaPUy8RnS6MYaxQBnGDPBkz9vDhLekNN%2BbQ@mail.gmail.com>
In-Reply-To: <0E0083BD-A749-4112-8FDA-62326EA95F8A@freebsd.org>
References:  <6AF28022-A8E7-46B3-B64E-99D217E9B6AC@yahoo.com> <0E0083BD-A749-4112-8FDA-62326EA95F8A@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 7 Aug 2022 at 18:43, Glen Barber <gjb@freebsd.org> wrote:
>
> Will do.  I=E2=80=99ll commit the suggested change to main tomorrow.
>
> Thank you for your vigilant investigation.

Shall I commit the enforce_chs check now?
---
commit 6ee7d69e6b526f35789b23ba570025f1c3b39c1a
Author: Ed Maste <emaste@FreeBSD.org>
Date:   Tue Jul 19 16:47:49 2022 -0400

    release: ensure enforce_chs sysctl is 0

    We do not want CHS-based alignment for VM or SD card release images.

    Sponsored by:   The FreeBSD Foundation

diff --git a/release/tools/arm.subr b/release/tools/arm.subr
index 6e4ae731a0b9..01c5303cd4e1 100644
--- a/release/tools/arm.subr
+++ b/release/tools/arm.subr
@@ -62,6 +62,10 @@ umount_loop() {
 }

 arm_create_disk() {
+       if [ $(sysctl -n kern.geom.part.mbr.enforce_chs) !=3D 0 ]; then
+               return 1
+       fi
+
        # Create the target raw file and temporary work directory.
        chroot ${CHROOTDIR} gpart create -s ${PART_SCHEME} ${mddev}
        if [ "${PART_SCHEME}" =3D "GPT" ]; then



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2AfGxgND-2KaPUy8RnS6MYaxQBnGDPBkz9vDhLekNN%2BbQ>