# Some questions about the boot messages



## decuser (Jul 3, 2020)

1. Some messages are available after booting (using dmesg), but some are not. What's up with that? A lot of the time, the messages that I want to see aren't included in dmesg.
2. For messages that aren't available in dmesg, are they captured elsewhere?
3. The output during boot seems overly verbose (I'm being kind), is there a way to route non-error messages to a file and not display them during the boot process?
4. Scroll lock doesn't seem to work (or CTRL-S) is this a configuration issue?
5. If I CTRL-arrow up, it will scroll, but only 24 lines (approx), is there another way to scroll back (I'm using i915 module)?

I have read Vermaden's post on quieting the boot process at https://vermaden.wordpress.com/2018/03/29/freebsd-desktop-part-1-simplified-boot/, but he's using a combination of redirection and flag setting:

boot_mute="YES"
rc_startmsgs="NO"

and in various rc.d scripts 1>/dev/null 2>/dev/null

I don't like the approach for a couple of reasons (but I appreciate his writeup) - 1) it seems to lose information and 2) I do want to see error messages as they happen.

What I would like see is an ability to set a flag boot_mute_informational_message="YES" or boot_show_error_only="YES" style control. Is this something anyone else has asked for or desired or am I just too demanding (Solaris is my model on this, just like Vermaden).


----------



## Martin Paredes (Jul 4, 2020)

dmesg(8) display system message produced by the kernel

For the others message, those are produced by the commands of the rc.d scripts, most commands use syslogd(8) to display/capture the message, so the message are mostly in the /var/log directory, for example /var/log/messages.


----------



## Lamia (Jul 4, 2020)

decuser said:


> boot_mute="YES"
> rc_startmsgs="NO"


You can silence the boot messages with these options and if you need information at all levels - critical, debug,etc - check /var/log/messages. FreeBSD may not have such luxuries in Solaris and vice versa.


----------



## Zhsk (Jul 4, 2020)

decuser said:


> 1. Some messages are available after booting (using dmesg), but some are not. What's up with that? A lot of the time, the messages that I want to see aren't included in dmesg.
> 2. For messages that aren't available in dmesg, are they captured elsewhere?
> 3. The output during boot seems overly verbose (I'm being kind), is there a way to route non-error messages to a file and not display them during the boot process?
> 4. Scroll lock doesn't seem to work (or CTRL-S) is this a configuration issue?
> ...


You need to check a file /var/run/dmesg.boot. (Absolute BSD, p. 223).


----------



## decuser (Jul 4, 2020)

re: 4 & 5... I figured out how to work with the console - Press Scroll lock first, then arrow up/down or page up/down to your heart's content, and end by Press Scroll lock again. Duh, `man vt`. The entire boot process is available back to the first ---<<BOOT>>--- message.

I'm off to seeing where exactly dmesg output is different from the console messages.


----------



## Mjölnir (Jul 4, 2020)

decuser said:


> re: 4 & 5... I figured out how to work with the console - Press Scroll lock first, then arrow up/down or page up/down to your heart's content, and end by Press Scroll lock again. Duh, `man vt`. The entire boot process is available back to the first ---<<BOOT>>--- message.
> 
> I'm off to seeing where exactly dmesg output is different from the console messages.


Welcome to the wonderful world of Open Source & BSD in particular 
You'll start to wonder what to do once your hardware does not have a <SCRL LOCK> button, like my laptop (ThinkPad T450)...


----------



## decuser (Jul 4, 2020)

Oh. Yikes, it didn't even cross my mind, it's the same thing on my T430... How do you scroll-lock without the button? I generally test things on my Optiplex 755 before putting them on the laptop, so I haven't needed to use it there, but one of these days I'm sure it will come in handy. On my laptop, I'm using FreeBSD w/KDE and it's pretty much reached functional parity with my previous Linux environment which was Mint 19.3 w/XFCE (only cuz Mint dropped their KDE support a while back) sans a few missing packages - docker and games and such. I heart FreeBSD, but I have a loooonnnnngggg way to go to mastery.


----------



## Mjölnir (Jul 4, 2020)

decuser said:


> Oh. Yikes, it didn't even cross my mind, it's the same thing on my T430... How do you scroll-lock without the button? [...]


You can't.  Should the need arise, I'll plug in an external keyboard and hope the magic under the hood enables it so I can use that.


----------



## decuser (Jul 4, 2020)

So, it figures... Vermaden's understanding of these things is clearly better than mine. After messing around with this stuff, I begin to appreciate his approach. As it turns out, dmesg captures everything that boot_mute hides and the rest of the messages are generated by rc scripts. If the rc scripts honor the rc_startmsgs flag (by calling rc.subr's check_startmsgs, they can be controlled by the flag. What I'm calling well behaved would call the function for non-error output, but not call it on error `motd` seems well behaved, although it echos to stdout rather than stderr - not sure if that's best, but by using the flags boot_mute and rc_sysmsgs, the amount of clutter is significantly reduced and important messages still show up as they need to. Now, couldn't we get an ascii art beastie walking across the screen to replace the white orb logo thingie while it's suppressing the messages?


----------



## Zhsk (Jul 4, 2020)

Boot msgs
					

I am aware of /var/run/dmesg.boot but have noticed that not all boot msgs appear. Should I be looking elsewhere?  Also is the a way of displaying the above msgs, apart from cat /var/run/dmesg.boot , since dmesg shows /var/log/dmesg.today




					forums.freebsd.org


----------



## decuser (Jul 4, 2020)

Zhsk the explantion in that thread is great! `dmesg -a`, who'd of thunk it?


----------



## SirDice (Jul 6, 2020)

mjollnir said:


> You'll start to wonder what to do once your hardware does not have a <SCRL LOCK> button, like my laptop (ThinkPad T450)...


Try Fn + k.


----------



## Mjölnir (Jul 6, 2020)

SirDice said:


> Try Fn + k.


SirDice, where did you find that?  There might be more interesting & useful info I missed to read...
And is there a sysctl(8) knob to set the size of the scollback buffer size early? I found `vidcontrol -h <lines>`, but I'd like to set it to a larger value from loader.conf(5).  Is it 
kern.consmsgbuf_size (and then the #lines is derived from the buffer size)?


----------



## SirDice (Jul 6, 2020)

mjollnir said:


> @SirDice, where did you find that?


I know how  to google efficiently 



			English Community-Lenovo Community


----------

