Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Aug 2025 17:15:59 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        polyduekes@proton.me
Cc:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>, FreeBSD Current <current@freebsd.org>
Subject:   Re: No longer single-user on unclean fs?
Message-ID:  <CANCZdfrSH_zJ4BeG8WGDNivBTBBFttn4AeW7zTKiUVMg3L4=Rw@mail.gmail.com>
In-Reply-To: <VxCjc2ydCzxF9Ot-UxKTxhjOVX5AkiJFEPC_Y16pJFxJ9BxbxpuL_NvxK766MUc3MthAOZ1ywzq2HoxlRZ3z8dxb1-WPT3M1HgDMl4OCEmU=@proton.me>
References:  <s5rn1qp6-14p2-7o76-6q8r-rr5po3o5os57@yvfgf.mnoonqbm.arg> <CANCZdfrk-OV14g1h645EY3XvJNp_%2BFzcTt=0RvcV-ZNx2zKbOQ@mail.gmail.com> <VxCjc2ydCzxF9Ot-UxKTxhjOVX5AkiJFEPC_Y16pJFxJ9BxbxpuL_NvxK766MUc3MthAOZ1ywzq2HoxlRZ3z8dxb1-WPT3M1HgDMl4OCEmU=@proton.me>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Sun, Aug 24, 2025, 10:37 AM <polyduekes@proton.me> wrote:

>
>
> On Sunday, August 24th, 2025 at 2:46 PM, Warner Losh <imp@bsdimp.com>
> 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.
>
> 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.
>
> i agree with bz, there have been numerous times where i was dropped to
> single user for unclean shutdown which could be fixed with fsck
>
>
I've had thousands of panics recover by the automatic fsck -p we do. The
very definition of and unclean shutdown. About 1% fail to do so and throw
me into single user to fix. Which I do with fsck -y...

So the unclean message by itself does not necessarily mean single user.  It
can, but often doesn't

The weirder thing is his no output thing...

Warner

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: <Generic ISA VGA> 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=0x8086, dev=0x2725, revid=0x1a
>> domain=0, bus=0, slot=5, func=0
>> class=02-80-00, hdrtype=0x00, mfdev=0
>> cmdreg=0x0007, statreg=0x0010, cachelnsz=0 (dwords)
>> lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
>> 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=0us status=00000133
>> 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 r15:7
>>
>>
>

[-- Attachment #2 --]
<div dir="auto"><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Sun, Aug 24, 2025, 10:37 AM  &lt;<a href="mailto:polyduekes@proton.me" target="_blank" rel="noreferrer">polyduekes@proton.me</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><div style="font-family:Arial,sans-serif;font-size:14px"><br><div>
        On Sunday, August 24th, 2025 at 2:46 PM, Warner Losh &lt;<a href="mailto:imp@bsdimp.com" rel="noreferrer noreferrer" target="_blank">imp@bsdimp.com</a>&gt; wrote:<br>
        <blockquote type="cite">
            <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 24, 2025 at 8:32 AM Bjoern A. Zeeb &lt;<a href="mailto:bzeeb-lists@lists.zabbadoz.net" rel="noreferrer nofollow noopener noreferrer noreferrer" target="_blank">bzeeb-lists@lists.zabbadoz.net</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I just updated a bhyve file system and forgot to unmount it on the host;<br>
starting the guest I am surprised to see Login: and not press enter for<br>
/bin/sh from init ...<br></blockquote><div><br></div><div><br></div><div>There&#39;s two issues. First, /etc/rc output only goes to the primary console. It wouldn&#39;t have prompted you or shown you a single user shell here anyway.</div><div><br></div><div>Second, we&#39;ve never dropped to single user mode solely for unclean shutdown. Only for filesystems that couldn&#39;t be fixed. These could be fixed with fsck, so no single user.</div><div><br></div><div>i agree with bz, there have been numerous times where i was dropped to single user for unclean shutdown which could be fixed with fsck</div></div></div></blockquote></div></div></blockquote></div><div dir="auto"><br></div><div dir="auto">I&#39;ve had thousands of panics recover by the automatic fsck -p we do. The very definition of and unclean shutdown. About 1% fail to do so and throw me into single user to fix. Which I do with fsck -y...</div><div dir="auto"><br></div><div dir="auto">So the unclean message by itself does not necessarily mean single user.  It can, but often doesn&#39;t  </div><div dir="auto"><br></div><div dir="auto">The weirder thing is his no output thing...</div><div dir="auto"><br></div><div dir="auto">Warner</div><div dir="auto"><br></div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-family:Arial,sans-serif;font-size:14px"><div><blockquote type="cite"><div dir="ltr"><div class="gmail_quote"><div>Unclean shutdown only prevents read-write mounting of a filesystem. It&#39;s cleared when the filesystem checks out a good with fsck (or fsck is able to fix safe to fix things). You&#39;ll only drop to single user if fsck can&#39;t fix it in &#39;preen&#39; mode.</div><div><br></div><div>Warner</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
...<br>
isa_probe_children: disabling PnP devices<br>
atkbdc: atkbdc0 already exists; skipping it<br>
atrtc: atrtc0 already exists; skipping it<br>
attimer: attimer0 already exists; skipping it<br>
sc: sc0 already exists; skipping it<br>
isa_probe_children: probing non-PnP devices<br>
sc0 failed to probe on isa0<br>
vga0: &lt;Generic ISA VGA&gt; at port 0x3b0-0x3bb iomem 0xb0000-0xb7fff pnpid PNP0900 on isa0<br>
pcib0: allocated type 4 (0x3b0-0x3bb) for rid 0 of vga0<br>
isa_probe_children: probing PnP devices<br>
Device configuration finished.<br>
procfs registered<br>
Statistical TSC calibration took 18310 us and 4437 data points<br>
Timecounter &quot;TSC&quot; frequency 1895998951 Hz quality 1000<br>
Statistical lapic calibration took 11276 us and 699 data points<br>
lapic: Divisor 2, Frequency 67108868 Hz<br>
Timecounters tick every 10.000 msec<br>
lo0: bpf attached<br>
vlan: initialized, using hash tables with chaining<br>
IPsec: Initialized Security Association Processing.<br>
tcp_init: net.inet.tcp.tcbhashsize auto tuned to 131072<br>
usb_needs_explore_all: no devclass<br>
ahcich0: AHCI reset...<br>
pci0: driver added<br>
found-&gt; vendor=0x8086, dev=0x2725, revid=0x1a<br>
         domain=0, bus=0, slot=5, func=0<br>
         class=02-80-00, hdrtype=0x00, mfdev=0<br>
         cmdreg=0x0007, statreg=0x0010, cachelnsz=0 (dwords)<br>
         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)<br>
         powerspec 3  supports D0 D3  current D0<br>
         MSI supports 1 message, 64 bit<br>
         MSI-X supports 16 messages in map 0x10<br>
pci0:0:5:0: reprobing on driver added<br>
ahcich0: SATA connect time=0us status=00000133<br>
ahcich0: AHCI reset: device found<br>
ahcich0: AHCI reset: device ready after 0ms<br>
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0<br>
ada0: &lt;BHYVE SATA DISK 001&gt; ACS-2 ATA SATA 3.x device<br>
ada0: Serial Number BHYVE-DEEE-91F5-8E77<br>
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)<br>
ada0: Command Queueing enabled<br>
ada0: 16384MB (33554432 512 byte sectors)<br>
pass0 at ahcich0 bus 0 scbus0 target 0 lun 0<br>
pass0: &lt;BHYVE SATA DISK 001&gt; ACS-2 ATA SATA 3.x device<br>
pass0: Serial Number BHYVE-GEOM: new disk ada0<br>
DEEE-91F5-8E77<br>
pass0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)<br>
pass0: Command Queueing enabled<br>
Trying to mount root from ufs:/dev/ada0p4 [rw]...<br>
WARNING: WITNESS option enabled, expect reduced performance.<br>
WARNING: / was not properly dismounted<br>
WARNING: /: mount pending error: blocks 177952 files 3815<br>
efirtc0: providing initial system time<br>
Dual Console: Serial Primary, Video Secondary<br>
start_init: trying /sbin/init<br>
<br>
FreeBSD/amd64 (Amnesiac) (ttyu0)<br>
<br>
login:<br>
<br>
<br>
-- <br>
Bjoern A. Zeeb                                                     r15:7<br>
<br>
</blockquote></div></div>

        </blockquote><br>
    </div></div></blockquote></div></div>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrSH_zJ4BeG8WGDNivBTBBFttn4AeW7zTKiUVMg3L4=Rw>