From nobody Sun Aug 24 14:45:38 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 4c8xYr1hvfz65YqN for ; Sun, 24 Aug 2025 14:45:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c8xYq4Mk1z3bgc for ; Sun, 24 Aug 2025 14:45:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-324eb9cc40aso2630295a91.0 for ; Sun, 24 Aug 2025 07:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1756046748; x=1756651548; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=dx2VkrCyywtmc2/CRihO5/Sx8jeijT7TAuN0BBQLaJk=; b=r6O2jmWDepdvqiK9n6nJV+QnpN/iijTXczNF6Xmc0xzSfW8lCAgGb5+6FArIxmK7iF Ww6ItS+uQynoqEVANRqTFKMfV2/MEolr4m86Ge4eAtX5Zf4eBe802oAr8D8Z0r30WIgV xXDkQ66nsWL60/yafgEQUrF2yDoODBJLCpc9gY3t+KQpOq/RkBQfsNTYAGDiKlUh032l K934N/qSlMWZPmFq6dTC6t7MTIpqHFUQ5Jto2lA3kpfLue7SHHlY51dNEtDAT7P8+Yia qD1+UOGv1qPCUDfbtkfkNd4GSs7h86e1IBdlnjIttWJX9fdYVJeZXqDIlO9u20ctUIZ4 1Tsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756046748; x=1756651548; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dx2VkrCyywtmc2/CRihO5/Sx8jeijT7TAuN0BBQLaJk=; b=mVaXDHtIlQX8gpC5cjiLlUo3PvGPamrqI1jOV3sLROBHuVH0dV3ZEujsFjeWcOsPwX hYH/6Iah2YeLx+LFQ7H5JefQ2r/s9TE3IBdN0798d0LCshkch2I8O2zwscA5eN2OzDLf RnoG2aC1YQWDrX5NbZA0BuLBn5A4yAs7uua3YKFn7zjd/lRT4YBnx9L3Z+o//nB/pbY9 KCo5mR8eTu/+EcPc1+CKXK6FwpDKSqJx8Yn/4JrJgracErk2LmSmkBoqkHAhRaKUj0jV Yk71silV9n3AYMfFBtL1PoGiwO82LwDJKyLdKOP4glt+DpHatGfn69pdM+Zlg8Zansd4 cZag== X-Gm-Message-State: AOJu0Yz9kIhLme3w2twalWIEO4Kk5etpNixDDw7BKwttf1lZAt7a9RVT O+b7YuH6kOnN+Ke1N7FShDDJSL1oi6gVY2wMqw8SoKbkj7K8iWJEi38Od1KkCK/Hdi3uv5fh+Ro 0UhVtssrPcY1P+FmVC841X/ySNGn/Kb4wBoXZMOkx3q5JP1hWLdWe45Y= X-Gm-Gg: ASbGncss/m96odrquxIipkoRE+2M84IVcm7VGLrm1HNxzARlOm4cxNjeLUhq8zgXahL ZnWNLTjVmye4oZIOl7NYs0hsNKnv0T6TEvL06Oya4GMRaT2WVzN43RLTpXMHWjN+Yub3fHEh1R9 IHM+2EAxJZDEYjPuecihhzRJTUlAzA1LNLlgDRXK2V43XfWxvYzUNZn8RLmzYj/fezSXb8aQDbl Ylm6Oj5I/iQkYPp52t2nFZA+AlsYd5Mhpyp/88= X-Google-Smtp-Source: AGHT+IFoYMFY/3XcoSFWkiWdOVpcyKhFyGF5VdGEJPhh0XSADimbcAYBst7aFf9It3gmQp+d7cyYlRAv3ZpNn4SF8Wc= X-Received: by 2002:a17:90b:2892:b0:31c:39c2:b027 with SMTP id 98e67ed59e1d1-3251d496bd7mr12511483a91.7.1756046748396; Sun, 24 Aug 2025 07:45:48 -0700 (PDT) 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 References: In-Reply-To: From: Warner Losh Date: Sun, 24 Aug 2025 08:45:38 -0600 X-Gm-Features: Ac12FXz8db12DgKfyOfPs2PwEE4pqx2vKTf5dSqRW7Vt7ybe9ZFDFaN1xZyEqsg Message-ID: Subject: Re: No longer single-user on unclean fs? To: "Bjoern A. Zeeb" Cc: current@freebsd.org Content-Type: multipart/alternative; boundary="000000000000a5c90c063d1d7e8e" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4c8xYq4Mk1z3bgc --000000000000a5c90c063d1d7e8e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Aug 24, 2025 at 8:32=E2=80=AFAM 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. 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. Warner > > ... > isa_probe_children: disabling PnP devices > atkbdc: atkbdc0 already exists; skipping it > atrtc: atrtc0 already exists; skipping it > attimer: attimer0 already exists; skipping it > sc: sc0 already exists; skipping it > isa_probe_children: probing non-PnP devices > sc0 failed to probe on isa0 > vga0: at port 0x3b0-0x3bb iomem 0xb0000-0xb7fff pnpid > PNP0900 on isa0 > pcib0: allocated type 4 (0x3b0-0x3bb) for rid 0 of vga0 > isa_probe_children: probing PnP devices > Device configuration finished. > procfs registered > Statistical TSC calibration took 18310 us and 4437 data points > Timecounter "TSC" frequency 1895998951 Hz quality 1000 > Statistical lapic calibration took 11276 us and 699 data points > lapic: Divisor 2, Frequency 67108868 Hz > Timecounters tick every 10.000 msec > lo0: bpf attached > vlan: initialized, using hash tables with chaining > IPsec: Initialized Security Association Processing. > tcp_init: net.inet.tcp.tcbhashsize auto tuned to 131072 > usb_needs_explore_all: no devclass > ahcich0: AHCI reset... > pci0: driver added > found-> vendor=3D0x8086, dev=3D0x2725, revid=3D0x1a > domain=3D0, bus=3D0, slot=3D5, func=3D0 > class=3D02-80-00, hdrtype=3D0x00, mfdev=3D0 > cmdreg=3D0x0007, statreg=3D0x0010, cachelnsz=3D0 (dwords) > lattimer=3D0x00 (0 ns), mingnt=3D0x00 (0 ns), maxlat=3D0x00 (0 n= s) > powerspec 3 supports D0 D3 current D0 > MSI supports 1 message, 64 bit > MSI-X supports 16 messages in map 0x10 > pci0:0:5:0: reprobing on driver added > ahcich0: SATA connect time=3D0us status=3D00000133 > ahcich0: AHCI reset: device found > ahcich0: AHCI reset: device ready after 0ms > ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 > ada0: ACS-2 ATA SATA 3.x device > ada0: Serial Number BHYVE-DEEE-91F5-8E77 > ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) > ada0: Command Queueing enabled > ada0: 16384MB (33554432 512 byte sectors) > pass0 at ahcich0 bus 0 scbus0 target 0 lun 0 > pass0: ACS-2 ATA SATA 3.x device > pass0: Serial Number BHYVE-GEOM: new disk ada0 > DEEE-91F5-8E77 > pass0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) > pass0: Command Queueing enabled > Trying to mount root from ufs:/dev/ada0p4 [rw]... > WARNING: WITNESS option enabled, expect reduced performance. > WARNING: / was not properly dismounted > WARNING: /: mount pending error: blocks 177952 files 3815 > efirtc0: providing initial system time > Dual Console: Serial Primary, Video Secondary > start_init: trying /sbin/init > > FreeBSD/amd64 (Amnesiac) (ttyu0) > > login: > > > -- > Bjoern A. Zeeb r15:7 > > --000000000000a5c90c063d1d7e8e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, Aug 24,= 2025 at 8:32=E2=80=AFAM Bjoern A. Zeeb <bzeeb-lists@lists.zabbadoz.net> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">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 ...


Th= ere's two issues. First, /etc/rc output only goes to the primary consol= e. It wouldn't have prompted you or shown you a single user shell here = anyway.

Second, we've never dropped to single = user mode solely for unclean shutdown. Only for filesystems=C2=A0that could= n't be fixed. These could be fixed with fsck, so no single user. Unclea= n shutdown only prevents read-write mounting of a filesystem. It's clea= red when the filesystem checks out a good=C2=A0with fsck (or fsck is able t= o fix safe to fix things). You'll only drop to single user if fsck can&= #39;t fix it in 'preen' mode.

Warner
=
=C2=A0

...
isa_probe_children: disabling PnP devices
atkbdc: atkbdc0 already exists; skipping it
atrtc: atrtc0 already exists; skipping it
attimer: attimer0 already exists; skipping it
sc: sc0 already exists; skipping it
isa_probe_children: probing non-PnP devices
sc0 failed to probe on isa0
vga0: <Generic ISA VGA> at port 0x3b0-0x3bb iomem 0xb0000-0xb7fff pnp= id PNP0900 on isa0
pcib0: allocated type 4 (0x3b0-0x3bb) for rid 0 of vga0
isa_probe_children: probing PnP devices
Device configuration finished.
procfs registered
Statistical TSC calibration took 18310 us and 4437 data points
Timecounter "TSC" frequency 1895998951 Hz quality 1000
Statistical lapic calibration took 11276 us and 699 data points
lapic: Divisor 2, Frequency 67108868 Hz
Timecounters tick every 10.000 msec
lo0: bpf attached
vlan: initialized, using hash tables with chaining
IPsec: Initialized Security Association Processing.
tcp_init: net.inet.tcp.tcbhashsize auto tuned to 131072
usb_needs_explore_all: no devclass
ahcich0: AHCI reset...
pci0: driver added
found-> vendor=3D0x8086, dev=3D0x2725, revid=3D0x1a
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0domain=3D0, bus=3D0, slot=3D5, func=3D0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0class=3D02-80-00, hdrtype=3D0x00, mfdev= =3D0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cmdreg=3D0x0007, statreg=3D0x0010, cachel= nsz=3D0 (dwords)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0lattimer=3D0x00 (0 ns), mingnt=3D0x00 (0 = ns), maxlat=3D0x00 (0 ns)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0powerspec 3=C2=A0 supports D0 D3=C2=A0 cu= rrent D0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0MSI supports 1 message, 64 bit
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0MSI-X supports 16 messages in map 0x10 pci0:0:5:0: reprobing on driver added
ahcich0: SATA connect time=3D0us status=3D00000133
ahcich0: AHCI reset: device found
ahcich0: AHCI reset: device ready after 0ms
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <BHYVE SATA DISK 001> ACS-2 ATA SATA 3.x device
ada0: Serial Number BHYVE-DEEE-91F5-8E77
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 16384MB (33554432 512 byte sectors)
pass0 at ahcich0 bus 0 scbus0 target 0 lun 0
pass0: <BHYVE SATA DISK 001> ACS-2 ATA SATA 3.x device
pass0: Serial Number BHYVE-GEOM: new disk ada0
DEEE-91F5-8E77
pass0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
pass0: Command Queueing enabled
Trying to mount root from ufs:/dev/ada0p4 [rw]...
WARNING: WITNESS option enabled, expect reduced performance.
WARNING: / was not properly dismounted
WARNING: /: mount pending error: blocks 177952 files 3815
efirtc0: providing initial system time
Dual Console: Serial Primary, Video Secondary
start_init: trying /sbin/init

FreeBSD/amd64 (Amnesiac) (ttyu0)

login:


--
Bjoern A. Zeeb=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r15:7

--000000000000a5c90c063d1d7e8e--