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

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Kyle Evans <kevans@freebsd.org> writes:

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

Leaving it this way is fine with me.

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

This is a new installation of 12.2-RELEASE from the memstick image, so
it only has the standard files and directories now.  That looks like 3
empty directories (modules, firmware, and dtb), and the kernel, lua,
zfs, and defaults directories.  Then there are about 55 other files in
/boot itself.

It has an EFI partition, so it appears to be an EFI install.

> 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}

I would definitely be in that vast majority.

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

Thanks again Kyle.

-- 
Carl Johnson		carlj@peak.org




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