Just tested an idea from
https://marc.info/?l=openbsd-misc&m=170525185806712&w=2

The test was:
 1. Install a new kernel with inlined diff.
 2. Reboot device.
 3. Confirm that date is accurate.
 4. Disable ntpd.
 5. Reboot device again.

Result?

It has date 9th May which is matched the used snapshot date.

Index: sys/ufs/ffs/ffs_vfsops.c
===================================================================
RCS file: /home/cvs/src/sys/ufs/ffs/ffs_vfsops.c,v
diff -u -p -r1.198 ffs_vfsops.c
--- sys/ufs/ffs/ffs_vfsops.c    3 Feb 2024 18:51:58 -0000       1.198
+++ sys/ufs/ffs/ffs_vfsops.c    13 May 2025 09:03:15 -0000
@@ -1362,6 +1362,13 @@ ffs_sbupdate(struct ufsmount *mp, int wa
        caddr_t space;
        int i, size, error, allerror = 0;

+/*
+ * Avoid update of a superblock when masquerading as a bootloader.
+ */
+#ifdef BOOT_QUIET
+       return 0;
+#endif
+
        /*
         * First write back the summary information.
         */



--
wbr, Kirill

Reply via email to