Boot problems with a new system

Kyle Evans kevans at
Thu Dec 10 04:06:03 UTC 2020

On Wed, Dec 9, 2020 at 9:14 PM Carl Johnson <carlj at> wrote:
> Kyle Evans <kevans at> writes:
> > On Wed, Dec 9, 2020 at 6:35 PM Carl Johnson <carlj at> wrote:
> >>
> >> Hello,
> >>
> >> I have a new system that I have installed FreeBSD 12.2-RELEASE (amd64)
> >> onto, but it won't boot back from the disk.  It installed properly and
> >> it has booted a couple of times, but lately it always hangs in the
> >> middle of the boot loader menu.  It always prints the first five menu
> >> entries, but then hangs when it should print out the kernels that are
> >> available.  I can still boot with the memstick and "zfs import" the
> >> pool, and the pool appears fine.  I have tried searching the web, but
> >> haven't found anything that helps.
> >>
> >> These are all loader.conf settings I have tried that don't help:
> >> vfs.zfs.cache_flush_disable="1"
> >>"0"
> >>"5000"
> >> loader_delay="3"
> >> boot_verbose="YES"
> >> verbose_loading="YES"
> >>
> >
> > Try adding:
> >
> > kernels_autodetect="NO"
> >
> > Thanks,
> >
> > Kyle Evans
> Thanks Kyle,
> It boots perfectly with that line present.  I commented out the other
> test lines and it still boots consistently, but still hangs without the
> autodetect line.  Is there something else I should be doing, or just
> leave it like this?

Excellent! You're likely not getting any value out of the feature, so
just leaving it there is fine -- I do have some follow-up questions,

1.) How many files and directories do you have directly in /boot?
2.) UEFI or BIOS?

Looking at the code for this again, the best we can likely do to
improve the default behavior is to add a "strict" option for
kernels_autodetect that only checks directories starting with 'kernel'
for kernels and default to that. This would drastically lower the
number of stat calls we do by default and works for the vast majority
of people that probably only have kernels in /boot/kernel,
/boot/kernel.old, and maybe /boot/kernel.${kernconf}

FWIW- it's also been relatively slow on some of my systems, but I
assumed I was the only one. :-)


Kyle Evans

More information about the freebsd-questions mailing list