HWCLOCK(5)

๐Ÿ“ฆ version 3.14, in debian bookworm, debian trixie, ubuntu jammy

๐Ÿ’– HWCLOCK(5) ๐Ÿ’–

ok so bestie, welcome to the hwclock manual page โ€” this one's all about the lil settings file that controls how the hwclock init script behaves. it's short, it's sweet, and ngl it's mostly a "please don't touch this" situation. let's get into it ๐Ÿฆ‹


โœจ NAME โœจ

hwclock โ€” settings that affect the behaviour of the hwclock init script ๐ŸŽ€


๐ŸŒธ DESCRIPTION ๐ŸŒธ

ok so there's this file, /etc/default/hwclock, and it holds settings in POSIX format, like this:

VAR=VAL

that's the whole vibe. just VAR=VAL, one assignment per line, only one per line, no stacking, no chaos. you can also drop comments in there โ€” anything starting with # is a comment and gets ignored, so go off, annotate your life ๐Ÿ’…


๐Ÿ’– SETTINGS ๐Ÿ’–

here's the tea โ€” these are the settings you can actually set, bestie:

  • HCTOSYS_DEVICE โ€” this is the hardware clock device you want to use. it defaults to rtc0. and honestly? it should probably match up with the CONFIG_RTC_HCTOSYS_DEVICE kernel config option. they're giving soulmates, fr fr ๐Ÿซถ
โš ๏ธ okay this is the important part, don't scroll past it: if you change this, you also need to install a custom udev rule, mirroring /usr/lib/udev/rules.d/85-hwclock.rules. otherwise? the hardware clock device gets ignored during boot. ignored!! at boot!! like it wasn't even invited ๐Ÿ˜ญ

and listen โ€” on almost all systems, this should not be changed. like, at all. leave it alone, she's fine, she's thriving ๐Ÿ’€


๐Ÿฆ‹ NOTES ๐Ÿฆ‹

on systems using systemd as init, the hwclock init script is ignored. periodt. it's just not the main character on those systems, no cap.


๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘


and that's the whole page, bestie โœจ this lil slice of the Debian Administrator's Manual is dated Dec 2020 and it's filed under HWCLOCK(5) โ€” mwah, iconic, no notes ๐Ÿ’‹๐Ÿ’–