Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Dec 2020 22:05:51 -0600
From:      Kyle Evans <kevans@freebsd.org>
To:        Carl Johnson <carlj@peak.org>
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: Boot problems with a new system
Message-ID:  <CACNAnaFMGtXUHhk5SrKaHJ9Z69kVuonL5Jh_CXRQiBVaRbM8jQ@mail.gmail.com>
In-Reply-To: <86tusumjym.fsf@elm.localnet>
References:  <86y2i6mrbh.fsf@elm.localnet> <CACNAnaH5BRQJHni4p2Anc4a8aJGs9d87tmPwrbsQRL_dj=KhvQ@mail.gmail.com> <86tusumjym.fsf@elm.localnet>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Wed, Dec 9, 2020 at 9:14 PM Carl Johnson <carlj@peak.org> wrote:
>
> Kyle Evans <kevans@freebsd.org> writes:
>
> > On Wed, Dec 9, 2020 at 6:35 PM Carl Johnson <carlj@peak.org> 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"
> >> kern.cam.ada.write_cache="0"
> >> kern.cam.boot_delay="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,
though:

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. :-)

Thanks,

Kyle Evans



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?CACNAnaFMGtXUHhk5SrKaHJ9Z69kVuonL5Jh_CXRQiBVaRbM8jQ>