From nobody Tue Jun 21 19:45:23 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 CDEED875EC8 for ; Tue, 21 Jun 2022 19:45:37 +0000 (UTC) (envelope-from paul@gromit.dlib.vt.edu) Received: from gromit.dlib.vt.edu (gromit.dlib.ipv6.vt.edu [IPv6:2001:468:c80:a103:2:5000:5555:5555]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 4LSH746GRXz4jf9 for ; Tue, 21 Jun 2022 19:45:36 +0000 (UTC) (envelope-from paul@gromit.dlib.vt.edu) Received: from smtpclient.apple (unknown [IPv6:2001:470:e15b:23::23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gromit.dlib.vt.edu (Postfix) with ESMTPSA id 6BEBC7E60A; Tue, 21 Jun 2022 15:45:25 -0400 (EDT) Content-Type: text/plain; charset=utf-8 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.100.31\)) Subject: Re: Mountroot problems on RPi3/aarch64 From: Paul Mather In-Reply-To: <20220621192448.GA1874@www.zefox.net> Date: Tue, 21 Jun 2022 15:45:23 -0400 Cc: Mark Millard , bob prohaska Content-Transfer-Encoding: quoted-printable Message-Id: <3E37B905-2627-469A-BA20-32FD79F8D12D@gromit.dlib.vt.edu> References: <20220601154142.GA41835@www.zefox.net> <5FA108CF-0973-4A53-A3B7-FA7BE41EB16D@yahoo.com> <20220601214401.GA42494@www.zefox.net> <20220602045202.GA44686@www.zefox.net> <1B845A0C-EDDC-407C-96A8-AAF4E92C2A4D@yahoo.com> <20220613153325.GA12588@www.zefox.net> <50CE21C4-CBE5-4ECB-A27E-42B7AAF71822@yahoo.com> <20220619042225.GA2267@www.zefox.net> <3458F90E-CFC9-4B91-8C4A-DD5788239172@yahoo.com> <20220621192448.GA1874@www.zefox.net> To: Free BSD X-Mailer: Apple Mail (2.3696.100.31) X-Rspamd-Queue-Id: 4LSH746GRXz4jf9 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=vt.edu (policy=none); spf=none (mx1.freebsd.org: domain of paul@gromit.dlib.vt.edu has no SPF policy when checking 2001:468:c80:a103:2:5000:5555:5555) smtp.mailfrom=paul@gromit.dlib.vt.edu X-Spamd-Result: default: False [0.51 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[vt.edu : No valid SPF, No valid DKIM,none]; FREEFALL_USER(0.00)[paul]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MV_CASE(0.50)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_MEDIUM(-0.15)[-0.150]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.84)[-0.836]; NEURAL_SPAM_LONG(1.00)[1.000]; MLMMJ_DEST(0.00)[freebsd-arm]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:1312, ipnet:2001:468:c80::/48, country:US]; FREEMAIL_CC(0.00)[yahoo.com,www.zefox.net]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N On Jun 21, 2022, at 3:24 PM, bob prohaska wrote: > On Sun, Jun 19, 2022 at 02:20:35PM -0700, Mark Millard wrote: >> On 2022-Jun-18, at 21:22, bob prohaska wrote: >>=20 >>> On Sat, Jun 18, 2022 at 03:54:19PM -0700, Mark Millard wrote: >>>> I finally started my round of updates from: >>>>=20 >>>> main-n255745-77649f35a7e5-dirty: Sat May 21 18:48:32 PDT 2022 >>>>=20 >>>> to: >>>>=20 >>>> main-n256189-4014365e4219-dirty: Sat Jun 18 01:47:44 PDT 2022 >>>>=20 >>>> So far all the UFS media that I've tried (older and newer) >>>> have worked fine with the update, including fsck_ffs not >>>> finding any problems. >>>>=20 >>>> It does not appear that I'll end up replicating your problem. >>>>=20 >>>=20 >>> When one invokes fsck at the single-user root prompt what actually >>> gets used on a UFS filesystem? Maybe I've got a name problem..... >>>=20 >>=20 >> The below is for a single-user boot, showing: >>=20 >> A) That / is already read-only at that point >> B) A fsck_ffs that just reports (no repairs) >> C) A fsck_ffs that repairs (and reports) >>=20 >=20 > My question is perhaps more naive than you expected 8-) >=20 > I'm just asking how we get to fsck_ffs (or _whatever) from > fsck. There's no explanation I recognize in the fsck man > page, though fsck_ffs is mentioned in the fsck man page. The fsck man page (at least the one currently on 13-STABLE) says this: If no file systems are specified, fsck reads the table /etc/fstab = to determine which file systems to check. Only partitions in = /etc/fstab that are mounted =E2=80=9Crw=E2=80=9D, =E2=80=9Crq=E2=80=9D or = =E2=80=9Cro=E2=80=9D and that have non-zero pass number are checked. File systems with pass number 1 (normally just the = root file system) are always checked one at a time. and this: If the -t or -T flags are not specified, fsck will attempt to = determine the file system type and call the appropriate file system check = utility. Failure to detect the file system type will cause fsck to fail with = a message that the partition has an unknown file system type. I don't know what precise mechanism fsck uses to determine which = fsck_XXX binary to invoke to check a file system, but I can posit at = least two possibilities: 1) It uses the "FStype" field from /etc/fstab as its guess; 2) More likely, it invokes "fstyp" to detect what file system the device = contains. The fstyp man page includes this description: The fstyp utility is used to determine the filesystem type on a = given device. It can recognize BeFS (BeOS), ISO-9660, exFAT, Ext2, FAT, = NTFS, and UFS filesystems. When the -u flag is specified, fstyp also recognizes certain additional metadata formats that cannot be = handled using mount(8), such as geli(8) providers, and ZFS pools. E.g.: # fstyp /dev/mirror/efi msdosfs # fstyp /dev/mirror/swap fstyp: /dev/mirror/swap: filesystem not recognized # fstyp -u /dev/gpt/zfs0 zfs Cheers, Paul. PS: This guess is worth what you paid for it. :-)=