Re: kernel names
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"
Re: kernel names
> On Thu, Dec 14, 2017 at 09:17:36AM -0800, bob prohaska wrote: > > On Thu, Dec 14, 2017 at 01:47:13PM +0800, 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? > > > > Unless I've been fooling myself, it's possible now. Just stop the boot > > loader during loading by hitting the spacebar and type > > boot kernelname > > at the loader prompt > > > > As Allan Jude pointed out earlier in the thread, it's a lot easier than > that: just set the "kernels" variable in /boot/loader.conf. > > For example, I update, build, boot, and run FreeBSD on my laptop daily. > That process installs /boot/kernel (after moving the previous one to > /boot/kernel.old). I like to keep a "recent known-working" kernel > around that isn't automagically replaced, so: > > g1-252(11.1-S)[1] grep kernel /boot/loader.conf > # Experiment to see if kernel.save can be an option from the boot menu > kernels="kernel kernel.old kernel.save" > g1-252(11.1-S)[2] > > (And yes, it does work -- verified empirically.) And you can also do an ls /boot while at a loader prompt to see all the kernels you have laying around you might want to choose from. -- Rod Grimes rgri...@freebsd.org ___ 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"
Re: kernel names
On Thu, Dec 14, 2017 at 09:17:36AM -0800, bob prohaska wrote: > On Thu, Dec 14, 2017 at 01:47:13PM +0800, 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? > > Unless I've been fooling myself, it's possible now. Just stop the boot > loader during loading by hitting the spacebar and type > boot kernelname > at the loader prompt > As Allan Jude pointed out earlier in the thread, it's a lot easier than that: just set the "kernels" variable in /boot/loader.conf. For example, I update, build, boot, and run FreeBSD on my laptop daily. That process installs /boot/kernel (after moving the previous one to /boot/kernel.old). I like to keep a "recent known-working" kernel around that isn't automagically replaced, so: g1-252(11.1-S)[1] grep kernel /boot/loader.conf # Experiment to see if kernel.save can be an option from the boot menu kernels="kernel kernel.old kernel.save" g1-252(11.1-S)[2] (And yes, it does work -- verified empirically.) Peace, david -- David H. Wolfskill da...@catwhisker.org The US "cannot afford" Trump as President or Roy Moore in the Senate. See http://www.catwhisker.org/~david/publickey.gpg for my public key. signature.asc Description: PGP signature
Re: kernel names
On Thu, Dec 14, 2017 at 01:47:13PM +0800, 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? Unless I've been fooling myself, it's possible now. Just stop the boot loader during loading by hitting the spacebar and type boot kernelname at the loader prompt This requires that you have saved the /boot/kernelname subdirectory beforehand, for example cp -r /boot/kernel.old /boot/kernel.spare and, on an RPI2, that you have serial console access. It would be very convenient if this were possible on the video console, I gather it's a non-trivial modification. I'm unclear on the situation with other architectures. hth, bob prohaska ___ 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"
Re: kernel names
Am Thu, 14 Dec 2017 00:51:54 -0500 Allan Jude schrieb: > 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? > > ___ > > 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" > > > > 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. Ahh ... great! I can't await it for your approach to land in CURRENT ;-) Thanks. Oliver > > 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. > -- O. Hartmann Ich widerspreche der Nutzung oder Übermittlung meiner Daten für Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG). pgpkMZwuOSs4h.pgp Description: OpenPGP digital signature
Re: kernel names
Hi, On Thu, 14 Dec 2017 00:51:54 -0500 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? ___ > > 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" > > 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. > this is a cool feature. Testing will become a lot easier then. Erich ___ 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"
Re: kernel names
On Thu, 14 Dec 2017 00:51:54 -0500 "Allan Jude" said 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? > ___ > 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" > 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. Outstanding, Allan! Well done. I eagerly await it's arrival. I've often thought about whipping something like this up. But something else always seemed to get in the way. Thanks, Allan. --Chris -- Allan Jude ___ 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"
Re: kernel names
On Thu, 14 Dec 2017 13:47:13 +0800 "blubee blubeeme" said 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? There sure is! How's your forth? Honestly, it's an extremely simple, yet powerful language. All the old Macintoshes used it (think BIOS). You could then simply add as many kernel entries as you felt you needed. OTOH You could simply break to the boot loader, and pick any kernel you wanted. :-) All of this also assumes you're manually making copies of the kernel(s) your interested in saving. As a default install kernel only backs up the previous one -- but you already knew that. :-) HTH --Chris ___ 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"
Re: kernel names
On Thu, Dec 14, 2017 at 1:51 PM, 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? > > ___ > > freebsd-current@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to "freebsd-current-unsubscribe@ > freebsd.org" > > > > 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. > > -- > Allan Jude > ___ > 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" > Allen, thanks for the great work. I'll test it out but I can't wait to have it merged in. ___ 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"
Re: kernel names
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? > ___ > 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" > 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. -- Allan Jude ___ 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"
kernel names
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? ___ 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"