From nobody Mon Oct 17 19:59:08 2022 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MrnrP22fkz4fKNt for ; Mon, 17 Oct 2022 19:59:17 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-20.consmr.mail.gq1.yahoo.com (sonic305-20.consmr.mail.gq1.yahoo.com [98.137.64.83]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4MrnrN2Fzxz42Gy for ; Mon, 17 Oct 2022 19:59:16 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666036754; bh=PeES3TIX73F2byIurF1P3PkyFXcpP6/fYxuObvjyCLM=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=Lp5KG7Fv1hit8WdfmM7fxMP3cOuo04RgaS29yHMqArmiR6w5yghKQv1qiVoLuFBFvGTT0kTeGKWTi+iD4Y+TbbDpd7W0+3bvLh8/jx6NqutHpyIXvcv3pN53DmG9RAcYqKw+kvHVschego6Y+h7+fBiGqECpdL1HbWgE0UCb9k5yRoPRW9szquM8Q+oH7+SGziM1Undab/svrjLLMXytiwPIpVCwzzCeOv3yELP+mDgNVogRWlOjFhOtDyl4ZgSdoryxi+vUIwjf/OxH8RwrjtaIBDYhuekCihtv0kWOyZKZ10WKSTuRBXOizKPiuZ6jBq1xe6BogOUgdOqsujkJmQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666036754; bh=e6uo8wuTMpCQES6f7mcarm1BnGXUpZdIJrRNDZ97AO1=; h=X-Sonic-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YEmbPymWrE2J.xyBk_UU1OmhukR50o20MtwklVFJ 9m1n0SbdPMT7qU7g39_B5NefE26L9JNe9G0zzb2ESTVRTBXSi6WFZao92AnAw0qSPb2piLJRKVcc e.PSKwJACzRc.coKAPwpayuyfBe7Bx4kdRyXEJ6a0pAvXlEccdR065JZKzU5NQAzbM3Q4bZE5LC8 rY.ebeAR66SU7vMn7dmtApzG49o20kQNjdbIyDgGr3MCsWhS.lUr9CRJb.0IkEzOF8Jli5wd6o63 lWDMRiIDSztD6tUVFTX3LbTJS.FSdpuaIb.gQqeDwrYUJVGXFQVF3nrOqmAXjF53RZzllxMO7IsT 6DbzvYhsIP7Il2U_fX9a8fuaLyFJChGhN1zqGRZZG_M3R0Te83NG0Ak8nob87Af0aW8VGaDU5cwe sgAEoYGH7DKrbxfgHLNaF2AwhQLMNobJvExJ_0vMUPu1OQeeRJa2khFIybEVcdyIM5U9tRpt_WI4 Y8w.JibWaABmdvjtQm_8.q8obvKYESskmS2Wd8sXjBAwV3xdWZUcq7Y7F7U71NGtjGe2JzjPvCuX DKc8- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Mon, 17 Oct 2022 19:59:14 +0000 Received: by hermes--production-ne1-5db649d989-tklgr (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID e5a9ba90d7ac906a70a62797b6c50c30; Mon, 17 Oct 2022 19:59:10 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: Snapshot stable/13-n252734-56533712694 first boot "gpart: arg0 'ufs/rootfs': Invalid argument"; also, an alignment question . . . From: Mark Millard In-Reply-To: <3DA3BC90-D234-4B37-9125-E7A70F16DD08@yahoo.com> Date: Mon, 17 Oct 2022 12:59:08 -0700 Cc: freebsd-arm , Warner Losh Content-Transfer-Encoding: quoted-printable Message-Id: <2287A7D8-8866-4481-A8C7-072B2C380B0C@yahoo.com> References: <3DA3BC90-D234-4B37-9125-E7A70F16DD08@yahoo.com> To: Glen Barber X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4MrnrN2Fzxz42Gy X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=Lp5KG7Fv; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.83 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.49 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.987]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.83:from]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org] X-ThisMailContainsUnwantedMimeParts: N On 2022-Oct-17, at 12:30, Mark Millard wrote: > [While the example is an aarch64 context, the issue should be > more general.] The above was for issue #0. > Issue #0: >=20 > After dd'ing: >=20 > FreeBSD-13.1-STABLE-arm64-aarch64-RPI-20221014-56533712694-252734.img >=20 > to the USB3 media booting got a notice: >=20 > gpart: arg0 'ufs/rootfs': Invalid argument >=20 > Showing some context: >=20 > . . . > Setting hostuuid: 30303031-3030-3030-3265-373238346338. > Setting hostid: 0xd2f9b0de. > Starting file system checks: > /dev/ufs/rootfs: FILE SYSTEM CLEAN; SKIPPING CHECKS > /dev/ufs/rootfs: clean, 498385 free (1281 frags, 62138 blocks, 0.1% = fragmentation) > Growing root partition to fill device > random: randomdev_wait_until_seeded unblock wait > random: randomdev_wait_until_seeded unblock wait > random: unblocking device. > GEOM_PART: da0s2 was automatically resized. > Use `gpart commit da0s2` to save changes or `gpart undo da0s2` to = revert them. > da0s2 resized > da0s2a resized > gpart: arg0 'ufs/rootfs': Invalid argument Looks like main [so: 14] has this fixed in: libexec/rc/rc.d/growfs so it probably needs an MFC. Not a snapshot handling specific issue, as it turns out. [Glen might have been the wrong choice.] > super-block backups (for fsck_ffs -b #) at: > . . .=20 >=20 > It looks like the line in question in /etc/rc.d/growfs is: >=20 > gpart commit "$rootdev" >=20 > where the prior code: >=20 > FSTYPE=3D$(mount -p | awk '{ if ( $2 =3D=3D "/") { print $3 = }}') > FSDEV=3D$(mount -p | awk '{ if ( $2 =3D=3D "/") { print $1 }}') > case "$FSTYPE" in > ufs) > rootdev=3D${FSDEV#/dev/} > ;; >=20 > assigned rootdev based on: >=20 > For FSTYPE: > # mount -p | awk '{ if ( $2 =3D=3D "/") { print $3 }}' > ufs >=20 > For FSDEV: > # mount -p | awk '{ if ( $2 =3D=3D "/") { print $1 }}' > /dev/ufs/rootfs >=20 > So: ufs/rootfs >=20 > I'd guess that the problem is that after the gpart resize -i . . . > activities the label ufs/rootfs is no longer effective for > gpart (until the growfs -y completes?). >=20 > Whatever the cause, gpart is rejecting the ufs/rootfs > notation. >=20 >=20 >=20 > Issue #1 (unsure of the intent, so checking): >=20 > # gpart show > =3D> 63 468862065 da0 MBR (224G) > 63 1985 - free - (993K) > 2048 102400 1 fat32lba [active] (50M) > 104448 468757680 2 freebsd (224G) >=20 > =3D> 0 468757680 da0s2 BSD (224G) > 0 128 - free - (64K) > 128 468757552 1 freebsd-ufs (224G) >=20 > Reviewing the alignments (one is differently > aligned than the others): >=20 > The first is good: >=20 > 2048 102400 1 fat32lba [active] (50M) >=20 > aligns to 512*2048 =3D=3D 1 MiByte. >=20 > The second is likely good: >=20 > 104448 468757680 2 freebsd (224G) >=20 > aligns to 512*104448 =3D=3D 51 MiByte, so a 1 MiByte multiple > as the alignment. >=20 > But the 3rd is less aligned (the freebsd-ufs line): >=20 > 104448 468757680 2 freebsd (224G) >=20 > =3D> 0 468757680 da0s2 BSD (224G) > 0 128 - free - (64K) > 128 468757552 1 freebsd-ufs (224G) >=20 > aligns to 512*104448 + 512*128 but 512*128 is a > 64 KiByte offset, so: 51 MiByte + 64 KiByte. >=20 > This is not 1 MiByte aligned but is 64 KiByte aligned. > Is that the intended alignment for the freebsd-ufs > area? I guess, a different way of going at the overall issue #1 question is: If 64 KiByte alignment is okay for the freebsd-ufs area, should the other two also be using 64 KiByte alignment instead of 1 MiByte alignment? What I'm checking on is the lack of uniformity. I'm not really trying to be the one picking among the various uniform alternatives if uniformity is appropriate. [Why I did not notice this lack of uniformity back during the alignment investigation, I do not know.] =3D=3D=3D Mark Millard marklmi at yahoo.com