From owner-freebsd-questions@freebsd.org Thu Dec 10 05:10:10 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0499C474C2F for ; Thu, 10 Dec 2020 05:10:10 +0000 (UTC) (envelope-from carlj@peak.org) Received: from smtp.email-protect.gosecure.net (smtp.email-protect.gosecure.net [208.80.203.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.email-protect.gosecure.net", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cs26N3d2Zz4v0W for ; Thu, 10 Dec 2020 05:10:03 +0000 (UTC) (envelope-from carlj@peak.org) Received: from envoy14.neonova.net ([137.118.58.100]) by smtp.email-protect.gosecure.net ({aee01390-a207-11ea-99e5-29e82b11708d}) via TCP (outbound) with ESMTP id 20201210051001781_00001147 for ; Wed, 09 Dec 2020 21:10:01 -0800 X-RC-FROM: X-RC-RCPT: Received: from elm.localnet (unknown [199.58.99.76]) (Authenticated sender: carlj@peak.org) by envoy14.neonova.net (Postfix) with ESMTPA id 4Cs26F4d9Rz9tKd for ; Thu, 10 Dec 2020 00:09:57 -0500 (EST) Received: from localhost.localnet ([127.0.0.1] helo=elm.localnet) by elm.localnet with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94 (FreeBSD)) (envelope-from ) id 1knEDE-000BUf-Aa for freebsd-questions@freebsd.org; Wed, 09 Dec 2020 21:09:56 -0800 Received: (from carlj@localhost) by elm.localnet (8.16.1/8.16.1/Submit) id 0BA59tkZ044184; Wed, 9 Dec 2020 21:09:55 -0800 (PST) (envelope-from carlj@elm.localnet) From: Carl Johnson To: freebsd-questions@freebsd.org Subject: Re: Boot problems with a new system References: <86y2i6mrbh.fsf@elm.localnet> <86tusumjym.fsf@elm.localnet> Date: Wed, 09 Dec 2020 21:09:55 -0800 In-Reply-To: (Kyle Evans's message of "Wed, 9 Dec 2020 22:05:51 -0600") Message-ID: <86lfe6mel8.fsf@elm.localnet> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-MAG-OUTBOUND: greymail.email-protect.gosecure.net@137.118.58.100/32 X-Rspamd-Queue-Id: 4Cs26N3d2Zz4v0W X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=peak.org; spf=pass (mx1.freebsd.org: domain of carlj@peak.org designates 208.80.203.1 as permitted sender) smtp.mailfrom=carlj@peak.org X-Spamd-Result: default: False [-3.80 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[208.80.203.1:from]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:208.80.200.0/21]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[208.80.203.1:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[peak.org,none]; RCVD_IN_DNSWL_NONE(0.00)[208.80.203.1:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:14618, ipnet:208.80.202.0/23, country:US]; RCVD_TLS_LAST(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 05:10:10 -0000 Kyle Evans writes: > On Wed, Dec 9, 2020 at 9:14 PM Carl Johnson wrote: >> >> Kyle Evans writes: >> >> > On Wed, Dec 9, 2020 at 6:35 PM Carl Johnson 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