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

_______________________________________________
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to