Just an idea (implementing it beyonds me), but something like below would be needed.
Special, fixed name (ideally throuout all OS'es with file structure and encodings) marker file at root directory containing
the location/name of most recently built boot code (on FreeBSD, should be...