Re: bootverbose; persist bootverbose at boot
- In reply to: Zhenlei Huang : "Re: bootverbose; persist bootverbose at boot"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 09 Feb 2025 17:50:22 UTC
No that will hard-code it into the build which I used to do but that’s not the right way to do this; You don’t have to hard-code it into the build to use it, but enabling it in loader.conf doesn’t appear to be documented because boot_verbose isn’t in the doc. The only thing in the docs that I’ve seen is just verbose_loading, maybe there’s a newer doc and I just haven’t seen it yet but as near as I can tell boot_verbose is an option: grep -r verbose_loading ./config.lua: local verbose = loader.getenv("verbose_loading") or "no" iampaigeat@MacBookAir lua % grep -r verbose ./config.lua:config.verbose = false ./config.lua: local verbose = loader.getenv("verbose_loading") or "no" ./config.lua: config.verbose = verbose:lower() == "yes" ./config.lua: status = loadModule(modules, not config.verbose) ./menu.lua: -- verbose boot ./menu.lua: "erbose :", core.verbose) ./core.lua.8:.It Fn core.setVerbose verbose ./core.lua.8:.Ev boot_verbose . ./core.lua.8:.Fa verbose ./core.lua.8:is omitted, toggle the current verbose setting. ./core.lua.8:Resets ACPI, safe mode, single user, and verbose settings to their system ./core.lua:local default_verbose = false ./core.lua: local boot_verbose = loader.getenv("boot_verbose") or “no” <--- ./core.lua: default_verbose = boot_verbose:lower() ~= "no" ./core.lua: core.setVerbose(default_verbose) ./core.lua:function core.setVerbose(verbose) ./core.lua: if verbose == nil then ./core.lua: verbose = not core.verbose ./core.lua: if verbose then ./core.lua: loader.setenv("boot_verbose", "YES") ./core.lua: loader.unsetenv("boot_verbose") ./core.lua: core.verbose = verbose ./core.lua: core.setVerbose(default_verbose) > On Feb 9, 2025, at 9:43 AM, Zhenlei Huang <zlei@FreeBSD.org> wrote: > > > >> On Feb 10, 2025, at 1:23 AM, paige@paige.bio wrote: >> >> Dude I don’t think you understand, I learned about loader.conf about a year ago I know there’s a man page for it and it’s not as if I didn’t at some point arrive at that conclusion too. >> >> verbose_loading >> If set to "YES", module names will be displayed as they >> are loaded. >> >> No that’s not what I want, doesn’t sound like it anyway: >> >> grep -r bootverbose | head -n 16 >> ./xen/xen_common.c: if (bootverbose && !warned) { >> ./compat/linuxkpi/common/src/linux_firmware.c: /* Set independent on "warn". To debug, bootverbose is avail. */ >> ./compat/linuxkpi/common/src/linux_i2cbb.c: if (bootverbose) >> ./compat/linuxkpi/common/src/linux_80211.c: if (bootverbose) >> ./compat/linuxkpi/common/src/linux_cmdline.c: if (bootverbose) { >> ./compat/linuxkpi/common/src/linux_i2c.c: if (bootverbose) >> ./compat/linuxkpi/common/src/linux_i2c.c: if (bootverbose) >> ./compat/x86bios/x86bios.c: if (bootverbose) { >> ./kern/kern_linker.c: if (bootverbose) { >> ./kern/kern_linker.c: if (bootverbose) >> ./kern/kern_ctf.c: if (bootverbose) { >> ./kern/kern_ctf.c: if (bootverbose) { >> ./kern/kern_ctf.c: if (bootverbose) { >> ./kern/kern_ctf.c: if (bootverbose) { >> ./kern/kern_ctf.c: if (bootverbose) { >> ./kern/kern_jail.c: if (bootverbose && !valid) { >> >> There are no options for loader.conf which speak to this as near as I can tell at least not based on that man page, guess I can just try random stuff like verbose_loading but… I think I already did and it wasn’t helpful. The only way I’ve been able to activate the option is at the boot prompt, hit 7 hit 6 backspace 1 which sucks, I’m trying to write a driver and its a pain in the ass. > > bootverbose is defined in `sys/kern/init_main.c`. You may want to have `options BOOTVERBOSE=1` in the kernel conf file to ease you development. > > ``` > ... > #ifndef BOOTVERBOSE > #define BOOTVERBOSE 0 > #endif > int bootverbose = BOOTVERBOSE; > SYSCTL_INT(_debug, OID_AUTO, bootverbose, CTLFLAG_RW, &bootverbose, 0, > "Control the output of verbose kernel messages"); > ... > ``` > > See also `sys/conf/NOTES` . > > Best regards, > Zhenlei > >> >> >>> On Feb 9, 2025, at 9:07 AM, Kirill Orlov <slowdive@me.com> wrote: >>> >>> There are some options in /boot/loader.conf >>> >>> https://man.freebsd.org/cgi/man.cgi?loader.conf(5) >>> >>> >>> Regards, >>> -K. >>> >>>> On Feb 9, 2025, at 11:56, paige@paige.bio wrote: >>>> >>>> Anybody know how to do this or if you can? Really sucks I keep having to go wait for the boot loader (bios is slow to wait on) hit 7 then hit 6 backspace 1