BOOTLOGD(8)

πŸ“¦
version 3.14 Β· 2 versions
, in debian bookworm, debian trixie

πŸ’– BOOTLOGD πŸ’–

okay bestie, gather round, because we're talking about bootlogd from the BOOTLOGD(8) manual β€” aka the little Linux System Administrator's Manual icon that catches every single thing your machine yells at boot. no cap, it's lowkey a big deal. 🫢


✨ NAME ✨

bootlogd β€” record boot messages πŸ“


🌸 SYNOPSIS 🌸

/sbin/bootlogd [-c] [-d] [-e] [-r] [-s] [-v] [ -l logfile ] [ -p pidfile ]

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: bootlogd runs in the background and copies all strings sent to the /dev/console device into a logfile. like, every last one. πŸ’…

and if that logfile isn't accessible yet? no worries, it's not going to lose the tea β€” the messages are kept in memory until the logfile is accessible. patient queen behavior fr fr. πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

  • -d β€” do not fork and run in the background. stay right there in the foreground, main character energy. πŸ™ˆ
  • -e β€” print escape characters to the boot log file. this turns off filtering of escape characters and lets tools like GNU less(1) see and use colour control characters (aka show the log in colour 🌈). iconic.
  • -c β€” attempt to write to the logfile even if it does not yet exist. without this option, bootlogd will wait for the logfile to appear before attempting to write to it. and this behavior is on purpose bestie β€” it prevents bootlogd from creating logfiles under mount points. πŸ’€
  • -r β€” if there's an existing logfile called logfile, rename it to logfile~ β€” unless logfile~ already exists, in which case... nope. βœ‹
  • -s β€” ensure the data is written to the file after each line by calling fdatasync(3). heads up though: this will slow down a fsck(8) process running in parallel. 😭
  • -v β€” show version. slay, short and sweet. ⭐
  • -l logfile β€” log to this logfile. the default is /var/log/boot. πŸ“
  • -p pidfile β€” put the process-id in this file. the default is no pidfile. πŸ«₯

πŸ’œ NOTES πŸ’œ

ngl, bootlogd saves log data which includes control characters. the log is technically a text file, but it's not very easy for humans to read. πŸ’€

to address this, the readbootlog(1) command can be used to display the boot log without the control characters. thank u readbootlog, our savior. 🧚


πŸ‘‘ BUGS πŸ‘‘

okay so this is the part where we get real. bootlogd works by redirecting the console output from the console device. (consequently, bootlogd requires PTY support in the kernel configuration β€” no PTY, no party.) it copies that output to the real console device and to a log file. πŸŒ€

here's the messy part: there is no standard way of ascertaining the real console device if you have a new-style /dev/console device (major 5, minor 1). so bootlogd parses the kernel command line looking for console=... lines and deduces the real console device from that. πŸ•΅οΈ

and if that syntax is ever changed by the kernel, or a console type is used that bootlogd does not know about β€” then bootlogd will not work. periodt. πŸ’€βœ¨

🌈 AUTHOR 🌈

Miquel van Smoorenburg πŸ’–


🌸 SEE ALSO 🌸

dmesg(8), fdatasync(3), readbootlog(1) πŸ¦‹


and that's the whole page bestie!! this came to you courtesy of sysvinit, dated Jul 21, 2003 β€” yes, she's a vintage icon and she's still serving. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from