Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Nov 2019 17:43:48 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        FreeBSD stable <freebsd-stable@freebsd.org>
Subject:   Re: Logging boot messages from the loader
Message-ID:  <4c45a371-c352-b8c4-65c6-d1bff55b4a2e@grosbein.net>
In-Reply-To: <E1794E61-3019-4C96-822F-B07CFF106087@lists.zabbadoz.net>
References:  <b0c8eb49-360e-3a6e-ae84-29ddbba80ce9@grosbein.net> <E1794E61-3019-4C96-822F-B07CFF106087@lists.zabbadoz.net>

next in thread | previous in thread | raw e-mail | index | archive | help
21.11.2019 17:22, Bjoern A. Zeeb wrote:

> On 21 Nov 2019, at 9:51, Eugene Grosbein wrote:
> 
>> Hi!
>>
>> How do I get boot messages generated by loader itself written to some log after successfull boot?
>> This is generic BIOS-based 11.3-STABLE/amd64 system with syscons console driver.
>>
>> /var/run/dmesg.boot starts with kernel messages without previous lines from the loader.
>> Specifically, I need messages about loading kernel modules with full paths.
> 
> loader cannot write to the kernel message buffer as there is no kernel yet.  There might be possible ways to preserve that but I doubt loader is fit for that task.

Some hardware does not clear memory while warm booting, so KDB trace from previous panic sometimes survive reboot
and ends up in /var/run/dmesg.boot for successful boot. I wonder why loader messages cannot be there, too.
In fact, kernel message buffer can be found even in absence of kernel :-)

I've already searched through the sources in stand/ and see there is no code to support this yet.

> A boot -v (boot_verbose=“YES”) might spit the information out from the kernel as well.   Not sure if that helps you.  However on modern server machines a boot -v often overflows the message buffer.. so you might have to tune that as well.
> 
> Extracted from an older console log of a random lab machine of someone else:
> ..
> WARNING: WITNESS option enabled, expect reduced performance.^M^@
> WARNING: DIAGNOSTIC option enabled, expect reduced performance.^M^@
> Preloaded elf kernel "/boot/kernel/kernel" at 0xffffffff80e66000.^M^@
> Preloaded elf obj module "/boot/kernel/if_igb.ko" at 0xffffffff80e66968.^M^@
> Preloaded elf obj module "/boot/kernel/nfscl.ko" at 0xffffffff80e66fd0.^M^@
> Preloaded elf obj module "/boot/kernel/nfslock.ko" at 0xffffffff80e67638.^M^@
> Preloaded elf obj module "/boot/kernel/nfssvc.ko" at 0xffffffff80e67ba0.^M^@
> Preloaded elf obj module "/boot/kernel/krpc.ko" at 0xffffffff80e68088.^M^@
> Preloaded elf obj module "/boot/kernel/nfscommon.ko" at 0xffffffff80e686b0.^M^@
> Preloaded elf obj module "/boot/kernel/ahci.ko" at 0xffffffff80e68d20.^M^@
> Preloaded elf obj module "/boot/kernel/cam.ko" at 0xffffffff80e69308.^M^@
> Preloaded elf obj module "/boot/kernel/mfi.ko" at 0xffffffff80e699f0.^M^@
> Preloaded elf obj module "/boot/kernel/geom_part_gpt.ko" at 0xffffffff80e6a058.^M^@
> Preloaded elf obj module "/boot/kernel/sysvsem.ko" at 0xffffffff80e6a648.^M^@
> Preloaded elf obj module "/boot/kernel/sysvshm.ko" at 0xffffffff80e6acb0.^M^@
> Calibrating TSC clock ... TSC clock: 3400185886 Hz^M^@
> CPU: Intel(R) Xeon(R) CPU           X5272  @ 3.40GHz (3400.19-MHz K8-class CPU)^M^@

Yes, but this only shows results of loader's work and kldstat -v shows paths too.
I need to know why changing modules_path in the nextboot.conf does not work
and why does loader uses stock zfs.ko insted of my patched version /boot/nextboot/zfs.ko
if I use nextboot.conf with module_path="/boot/nextboot;/boot/kernel;/boot/modules"

I have panicing production server (ZFS-only) and cannot reboot it often and
I don't wont to make cycle-boot by mistake due to wrong debugging code I might add to the module.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4c45a371-c352-b8c4-65c6-d1bff55b4a2e>