Re: Selecting the scheduler from boot menu
- In reply to: Milan Obuch : "Re: Selecting the scheduler from boot menu"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 31 Jan 2026 22:37:25 UTC
I can do the lua stuff for this Warner On Sat, Jan 31, 2026, 3:27 PM Milan Obuch <freebsd-hackers@dino.sk> wrote: > On Sat, 31 Jan 2026 23:15:49 +0100 > Milan Obuch <freebsd-hackers@dino.sk> wrote: > > > On Sat, 31 Jan 2026 12:44:07 -0800 > > Steve Kargl <kargls@comcast.net> wrote: > > > > > On 1/31/26 12:35, Milan Obuch wrote: > > > > On Sat, 31 Jan 2026 12:21:59 -0800 > > > > Steve Kargl <kargls@comcast.net> wrote: > > > > > > > >> All, > > > >> > > > >> Is it possible modify the boot menu to select 4BSD or ULE during > > > >> the boot process? I've looked at the code in src/stand/forth, > > > >> but unfortunately the language is foreign to me. Currently, one > > > >> boots into FreeBSD, checks the kern.sched.name, and then may > > > >> need to edit /boot/loader.conf to change to the other scheduler, > > > >> and then reboot. > > > > > > > > Which version are you working on? I think something recent, maybe > > > > 16-CURRENT. Loader was rewritten in lua some time ago. > > > > > > I'm looking at src/stand/forth, particular, menu-commands.4th. > > > > Somehow, those old files are still present and installed, but no > > longer used in boot process unless some non-standard build or > > configuration is being used. > > > > > If the boot menu is written in lua, it's still a foreign language to > > > me. So, I would need some guidance on how to hack the menu up. > > > > > > Yes, it is a convenience to have menu item. Dropping to the loader > > > prompt is possible. Taking it to a logical extreme, let's retire the > > > menu because everything can be set at the loader prompt. > > > > I'll try to look there. I did not actually read files in /boot/lua > > directory yet, but I have some lua experience and maybe I can come > > with something if nobody acts quicker... but first I nedd to > > understand the process. > > > > There is menu.lua file with all boot menu related functionality. Now > the question is, where should the new option go - there is main menu > loaded upon start, and then options menu could be invoked from there. > As an option for 4BSD/ULE scheduler selection, it should go probably to > the later. A word of warning, all options changed via options menu are > not persistent, so on next reboot default value (with possible override > by config file vale) is used. > > Regards, > Milan > >