From nobody Sun Aug 24 15:03:37 2025 X-Original-To: current@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 4c8xyR58CYz65Zms for ; Sun, 24 Aug 2025 15:03:43 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (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-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E6" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c8xyR2lcWz3glj for ; Sun, 24 Aug 2025 15:03:43 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Authentication-Results: mx1.freebsd.org; none Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id BD0F9A64805; Sun, 24 Aug 2025 15:03:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zabbadoz.net; s=20240622; t=1756047812; bh=TwAAC7TTICPw5Wr8+VX3bbgp4t9qxofc9VUrQ9fhCEg=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=RgjmEmi4uPOIolFRe1S/O9aCTSTC8KFRB4UQG3n/2gJetjFv/dGyrBlFILj0wlPq8 HKk1J4/qRHqLKkK60F1xOjF8vGsZtNOErF2U2K2Jhht9Cx9Fj+x3TChn3j51T4ent7 JeRbwPZl1IqMkVjEKsKCMezAZC+Y6cc+F1THLYEzDCPY022nHjKPGMc4LZzKj0Gvx/ VOt6f2vwXdsT1sio+uTxnI7a+7LrgRkB1wnye+cZw5pneNjduOGnylt5kIbn99SuAm oJiiy7eMti+969HBO/4ez3ypwi4Td/46RQDg9eFUhWimwwWz28wyhv5nkdqr6TLFkA gvSSMWK9huqzyP73AhWr9Kj5xi5xBE5Wz+odcBmwzBW1wfxouzVfJ2sk7Zndw00Laf dbQZ2ZkEuL9j8LmRzi4y0Oa+fVN7O35OZIFzlize/MMSXX5tFbul4YL/J6ZOz8zPT3 W5h0EfHcsegqPbsLtW+Fa7eJZ2RhhSpG9ttDFWvOahpGm4tGg0/jRiNvBIX4IDySUk 4Y9KzNGx8CDNHkJzRDKQyPR5949zvTkDH5LkJiOlN9kk2f2R6LUKcqeRev/iZhlwim fLHoookxlqgGJFTZc7RWW4+mLBqCV3p1e29pgwTFRRTvbhn/KPGzS7BC7wGQSsOeke W9gj7FY3dpt0zhmQ1PMwR09I= Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (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) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 82A4D2D029E3; Sun, 24 Aug 2025 15:03:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id OHMXvPbvxoYf; Sun, 24 Aug 2025 15:03:38 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:a66b:b6ff:fe40:39a9]) (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) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id C840B2D029D8; Sun, 24 Aug 2025 15:03:37 +0000 (UTC) Date: Sun, 24 Aug 2025 15:03:37 +0000 (UTC) From: "Bjoern A. Zeeb" To: Warner Losh cc: current@freebsd.org Subject: Re: No longer single-user on unclean fs? In-Reply-To: Message-ID: References: X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1098556516-1408938364-1756047817=:4619" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:3320, ipnet:2003::/19, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4c8xyR2lcWz3glj This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1098556516-1408938364-1756047817=:4619 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Sun, 24 Aug 2025, Warner Losh wrote: > On Sun, Aug 24, 2025 at 8:32 AM Bjoern A. Zeeb < > bzeeb-lists@lists.zabbadoz.net> wrote: > >> Hi, >> >> I just updated a bhyve file system and forgot to unmount it on the host; >> starting the guest I am surprised to see Login: and not press enter for >> /bin/sh from init ... >> > > > There's two issues. First, /etc/rc output only goes to the primary console. > It wouldn't have prompted you or shown you a single user shell here anyway. This was on the primary (serial) console. On a clean shutdown I do see the rc output here and did again so after stopping bhyve, umounting, starting bhyve again. > Second, we've never dropped to single user mode solely for unclean > shutdown. Only for filesystems that couldn't be fixed. These could be fixed > with fsck, so no single user. > > Unclean shutdown only prevents read-write > mounting of a filesystem. It's cleared when the filesystem checks out a > good with fsck (or fsck is able to fix safe to fix things). You'll only > drop to single user if fsck can't fix it in 'preen' mode. Is your behaviour described by background fsck on or a ZFS thing? I've gone through this certainly 15 times this year before and every time I got the prompt to /bin/sh so I could run fsck myself. And the same applied for about the past 3-4 years. I just shutdown bhyve again, made a copy of the FS image, and mounted the original, and then started bhyve again and this time it worked as I would expect it; the only difference to the one before is that I had just done a full installworld/installkernel, while now it was a clean shutdown before and the r/w mount to make it "dirsty": ... pass0: Command Queueing enabled GEOM: new disk ada0 Trying to mount root from ufs:/dev/ada0p4 [rw]... WARNING: WITNESS option enabled, expect reduced performance. WARNING: / was not properly dismounted efirtc0: providing initial system time Dual Console: Serial Primary, Video Secondary start_init: trying /sbin/init Setting hostuuid: bb5124b5-ee6c-9a36-8f93-dc96714d32c4. Setting hostid: 0xb390e5ed. Starting file system checks: mount: /dev/ada0p4: R/W mount of / denied. Filesystem is not clean - run fsck. Forced mount will invalidate journal contents: Operation not permitted Mounting root filesystem rw failed, startup aborted ERROR: ABORTING BOOT (sending SIGTERM to parent)! 2025-08-24T14:59:43.859965+00:00 - init 1 - - /bin/sh on /etc/rc terminated abnormally, going to single user mode Enter full pathname of shell or RETURN for /bin/sh: Whatever happend before is not what should have... which concerns me... -- Bjoern A. Zeeb r15:7 --1098556516-1408938364-1756047817=:4619--