Date: Fri, 24 Dec 2021 16:31:29 +0100 From: "Julian H. Stacey" <jhs@berklix.com> To: Kyle Evans <kevans@freebsd.org> Cc: "freebsd-hackers@freebsd.org" <hackers@freebsd.org> Subject: Re: /boot/loader.conf debuging traces come out jumbled Message-ID: <202112241531.1BOFVTKv003800@fire.js.berklix.net> In-Reply-To: Your message "Mon, 13 Dec 2021 18:17:52 -0600." <CACNAnaHiWfMOv35EPJoGsAv%2B93ymdS_wNyyKpQ_Y=YsMBtZUcg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, Reference: > From: Kyle Evans <kevans@freebsd.org> > Date: Mon, 13 Dec 2021 18:17:52 -0600 Kyle Evans wrote: > On Mon, Dec 13, 2021 at 6:07 PM Julian H. Stacey <jhs@berklix.com> wrote= : > > > > Debugging my /boot/loader.conf on 12.2-STABLE (with a 12.2-RELEASE ker= nel, > > > > (as 12.2-STABLE & 12.3-RELEASE & 13.0-RELEASE GENERIC kernels crash = during > > boot on one machine here (To be subject of later analysis & > > posting)... I got distracted onto debugging boot options, after > > output from booting screen rolled off the top), So I concentrated > > first on identifying & hashing out noisey boot options , before > > next searching how to capture boot text (maybe to a serial port ?) = ) > > > > I tried adding markers to loader.conf create deliberate visible error = texts to > > mark around lines I wanted to study the effect of, eg > > fuse_load=3D"YES" etc ... > > > > I added this in the middle of /boot/loader.conf : > > ZZZZZZZZZ00000000_load=3D"YES" > > ZZZZZZZZZ00001111_load=3D"YES" > > ZZZZZZZZZ00002222_load=3D"YES" > > ZZZZZZZZZ44440000_load=3D"YES" > > ZZZZZZZZZ44441111_load=3D"YES" > > ZZZZZZZZZ44442222_load=3D"YES" > > > > & next boot showed a weirdly disordered: > > > > Loading configured modules... > > can't find 'ZZZZZZZZZ00000000_load' > > can't find 'ZZZZZZZZZ00002222_load' > > can't find 'ZZZZZZZZZ44442222_load' > > can't find 'ZZZZZZZZZ44440000_load' > > can't find 'ZZZZZZZZZ44441111_load' > > can't find 'ZZZZZZZZZ00001111_load' > > /etc/hostid size=3D0x25 > > > > its not even just a reverse order that one might have expected from > > a forth unstacker or some such. Makes it harder to trace what output > > lines come from which loader.conf lines. > > > > To my knowledge, we've never guaranteed module load order beyond > kernel-first then everything else. You'll have a much better time with > _before/_after though; something like this should work: > > hostid_before=3D"echo before hostid" > hostid_after=3D"echo after hostid" Thanks Kyle for your _before & _after, it set me on course, though there's no hostid_load=3D in 12.2 src/, these worked: usb_quirk_load=3D"YES" usb_quirk_before=3D"echo Before usb_quirk" usb_quirk_after=3D"echo After usb_quirk" & I found lots of useful debugging stuff in /boot/defaults/loader.conf & man loader.conf loader boot. My next use will be boot -p or boot_pause=3D"" # -p: Pause after each line during device probing & then maybe some of: #boot_ddb=3D"" # -d: Instructs the kernel to start in the DDB debug= ger #boot_gdb=3D"" # -g: Selects gdb-remote mode for the kernel debugge= r #boot_multicons=3D"" # -D: Use multiple consoles #boot_serial=3D"" # -h: Use serial console #boot_verbose=3D"" # -v: Causes extra debugging information to be print= ed #debug.kdb.break_to_debugger=3D"0" # Allow console to break into debugger. Looking forward to debugging now screen doesnt roll off :-) Cheers, -- = Julian Stacey http://berklix.com/jhs/ http://stolenvotes.uk Reduce contacts, vax & pass insufficient. Dump UK's prime liar.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112241531.1BOFVTKv003800>