💡 Idea for a debugging script 💡

This might already exist for FreeBSD, and if so… let me know!

    1. keeps record of OS core/default settings: loader.conf, rc.conf, sysctl.conf, devfs.rules, login.conf etc
    1. keeps record of file checksum on those OS core files (similar to the app, tripwire)
    1. mode which shows divergence on current state vs known-default state in configs (1) and checksums (2)
      -4) mode which tracks the files and their change-sets over time, similar to a zfs snapshot but at a single file-level

#freebsd #scripting #programming

  • Eva Winterschön@mastodon.bsd.cafeOP
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    @david_chisnall@infosec.exchange generally I agree. the only systems where I bother with UFS are embedded devices with minimal ram, read-only systems which load everything into ram at boot (BSD-RP), or devices which are limited to SD or CF flash (storage appliances, some which have a super minimal freebsd image deployed on Dell IDSDM, which then hand-off to multipath LUN for centralized control of the storage nodes), and the less exciting: a few old switches and firewalls that seem to never die.

    the general reason that I mentioned UFS in this context is less about systems which don’t use ZFS, rather that the idea for a design of this minimal tool is maintaining portability independent of the underlying FS. which is to say, if ZFS isn’t there, then its snapshot system is not a design consideration. some of those system that I mentioned have needed a lightweight debugging toolkit during the hardware development lifecycle, where the full OS being functional is not yet a concern.

    sometimes it’s a case of ZFS tools not yet being available because of a kernel panic, and I want sorta-automated analysis which led up to that stage of failure. it’s tedious to track and report the boot stage options, changes, minutiae differences across ten or twenty rapid reboots. scripting those repetitive tasks along with a remote kgdb hookup to an alt-machine on serial is what I’ve been doing lately, but was hoping there was a pre-made “very simple” test harness tool available for similar purposes.