From owner-freebsd-current@freebsd.org Fri Dec 15 09:59:12 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C693EA144D for ; Fri, 15 Dec 2017 09:59:12 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ipmail06.adl6.internode.on.net (ipmail06.adl6.internode.on.net [150.101.137.145]) by mx1.freebsd.org (Postfix) with ESMTP id A384D6F32F; Fri, 15 Dec 2017 09:59:11 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ppp121-45-66-21.bras1.adl6.internode.on.net (HELO leader.local) ([121.45.66.21]) by ipmail06.adl6.internode.on.net with ESMTP; 15 Dec 2017 20:29:09 +1030 Subject: Re: kernel names To: Allan Jude , freebsd-current@freebsd.org References: <2f54bb9d-b7e0-9f4a-b894-6d72c7470b24@freebsd.org> From: Shane Ambler Message-ID: Date: Fri, 15 Dec 2017 20:29:07 +1030 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <2f54bb9d-b7e0-9f4a-b894-6d72c7470b24@freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-AU Content-Transfer-Encoding: 7bit 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: Fri, 15 Dec 2017 09:59:12 -0000 On 14/12/2017 16:21, Allan Jude wrote: > On 12/14/2017 00:47, blubee blubeeme wrote: >> When you boot into FreeBSD and you can select kernels, there's only 2 >> options: >> default and kernel.old >> >> Is there a way to have better output and support multiple kernels without >> having to login to the system and running uname -v or something like that? >> >> Would it be possible to add options for more kernels from that boot menu? > > The list is controlled by the /boot/loader.conf variable kernels= > which defaults to "kernel kernel.old" > > I have a patch almost ready to land that will search all subdirectories > of /boot for a file named 'kernel' and add the names of those > directories to the list, such that the list will basically be autogenerated. > > It currently contains too much copy/pasted code, and I just need to > clean it up a bit: https://reviews.freebsd.org/D11886 > > It was originally designed as part of my contributions towards packaged > base, where pkg will keep the last N (default to 5 I think) kernel > packages you have installed around, incase an upgrade goes bad. > > This feature will work on any filesystem supported by the loader. > Thanks Allen, that's much better than manually setting the list. A nice addition to this would be having make installkernel automatically install multiple kernels. Currently we can add KERNCONF to make.conf and have multiple kernels build with one buildkernel command. Then we have to manually run installkernel for each kernel by setting KERNCONF and KODIR for each one. Maybe the kernel config file can have a kodir variable that specifies the kernel name that it should be installed into, unless overridden by KODIR in the installkernel command. Another option might be to have KODIR in make.conf, where each item provides a KODIR for each KERNCONF Normally I build and install two kernels with each system update, one is GENERIC, the other is a debug kernel with things like WITNESS and INVARIANTS enabled. -- FreeBSD - the place to B...Software Developing Shane Ambler