From owner-freebsd-current@freebsd.org Wed Feb 21 14:12:29 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E365F04FE4 for ; Wed, 21 Feb 2018 14:12:29 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 35C1F7CCAC for ; Wed, 21 Feb 2018 14:12:29 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id EAA05F04FBF; Wed, 21 Feb 2018 14:12:28 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8746F04FBD for ; Wed, 21 Feb 2018 14:12:28 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 540427CCA8; Wed, 21 Feb 2018 14:12:28 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-lf0-f43.google.com with SMTP id v9so2538706lfa.11; Wed, 21 Feb 2018 06:12:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=Db4IogvptC1Cg/6pKiLuoaSCGt+NUKZ9L3/JVoClazM=; b=fqEM1b/GGw61Z6T10EUvkrOh2cxfVQJVoa1KmVP3HtdeDN8xiKDIlfwBMv+C2vYS1/ 8fAiy+1iLSZDVJ0aN/bkQzEqZ6hyxi/2VUdVZH6UZOPnfTGLQdgoK4+6rPDVjk/s35AU ba66wTfHJDNToRLxqGZ5M9b4JbbXkVaREjmeSwb2SvmLGv3P2RM6WSYIEFSJ1dP+t4bg J/KYe2rioiracS/y8RKvcFz1qf2hZAzoA3p0p1yEMoJU6mGyg2htqYXg0shGww+MY/qD ku9R8vHA4lqXJXm2pi/JE3OEvC/10cfSbGb3LaMVVx5JVxkJmj7gZ0EqijeOxnrLoDS8 pBKg== X-Gm-Message-State: APf1xPCw5EAQ9FLBMDtH2kUF3VbrXCcFDszBtfXpVRaSC24JT17V1UXZ OGsnvSd/0jg6pYal8iTaJxXH8Zk+ X-Google-Smtp-Source: AH8x224jjvGNqFs3NSN1hxzQi3hxS+4XrWQGvpVMVjcdBa5hVig/7G3r1xE88sN9y3SW3mFHxzT0eA== X-Received: by 10.46.77.90 with SMTP id a87mr2620465ljb.41.1519222340623; Wed, 21 Feb 2018 06:12:20 -0800 (PST) Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com. [209.85.215.49]) by smtp.gmail.com with ESMTPSA id e27sm2228609lfb.20.2018.02.21.06.12.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Feb 2018 06:12:20 -0800 (PST) Received: by mail-lf0-f49.google.com with SMTP id g72so2546919lfg.5; Wed, 21 Feb 2018 06:12:20 -0800 (PST) X-Received: by 10.25.201.76 with SMTP id z73mr2574121lff.74.1519222340178; Wed, 21 Feb 2018 06:12:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.46.106.8 with HTTP; Wed, 21 Feb 2018 06:11:59 -0800 (PST) In-Reply-To: <20180221123617.GD1212@albert.catwhisker.org> References: <20180221123617.GD1212@albert.catwhisker.org> From: Kyle Evans Date: Wed, 21 Feb 2018 08:11:59 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Kernel selection in Lua loader To: current@freebsd.org, imp@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Feb 2018 14:12:29 -0000 On Wed, Feb 21, 2018 at 6:36 AM, David Wolfskill wrote: > The Lua loader appears to be using a mechanism other than the > "kernels=..." specification in /boot/loader.conf to slect potential > kernels to load. I'm not claiming this is "bad" -- just "different." > > I noticed because I sometimes build a kernel that ... panics, or some > such thing, so I hve had occasion to make use of kernel.old. But in the > process of engaging a developer and trying patches, the default behavior > is that kernel.old gets overwritten next time I build a kernel. > > So I had taken to copying /boot/*.old to /boot/*.save manually as the > occasion warrants; I modified /boot/loader.conf to include: > > kernels="kernel kernel.old kernel.save" > > and the Forth loader presented (precisely) those kernels as the > available options for selecting a kernel to load and boot. > Right, so, we (and by we I mean cem@) actually implemented a form of auto-detection for kernels. Any directory in in /boot with a file named 'kernel' inside will be automatically listed, and that supplemented(*) 'kernels' and 'kernel' specified in loader.conf(5). (*) I use "supplemented" because I changed that in r329709, just a little bit ago, to not do the autodetection if a 'kernels' is explicitly set in loader.conf(5) My reasoning here is that there's probably a reason one has set it explicitly, whether it be to hide bogus kernels or just to slim down the list of kernels they need to cycle through. > [ ... snip ... ]