Edit

IABSD.fr/src/sys/ufs

Branch :

  • Show log

    Commit

  • Author : visa
    Date : 2025-05-18 11:47:35
    Hash : 4f50e27f
    Message : Skip filesystem mount time update in BOOT kernels When the kernel boots on a system without RTC, system time is set up using previous mount time of the root filesystem. In a BOOT-kernel-based bootloader the initial root filesystem is the embedded ramdisk image. When the bootloader proceeds to mount and unmount the actual root filesystem, the root filesystem's mount time is reset back to the constant ramdisk mount time plus small amount of uptime. Consequently the system always boots with (nearly) the same initial time, when RTC is not present. To enable crude timekeeping across reboots without RTC and NTP, do not update filesystem mount times in BOOT kernels. This is similar to the behaviour of conventional bootblocks. Timestamp update skipping suggested by deraadt@ OK kettenis@ kirill@