Make installworld

Is there any way to tell if make installworld is in sync with make buildworld ; make kernel. I have a server that I am not sure if make installworld was run on it, trying to get a way to tell what stage of the upgrade / build it is currently on.
 
Look at the top of the script /usr/src/sys/conf/newvers.sh. The version should correspond with [cmd=]uname -a[/cmd]. But if only the kernel has been replace but not world you won't see a difference. In that case I'd just run installworld anyway. You can run it as many times as you want.
 
There's no definitive way to tell if the world and kernel are from the exact same source version and options set. There are some binaries that have compile time timestamps in them as strings you can read with strings(1), one is /boot/loader:

Code:
# strings /boot/loader | grep -A2 "bootstrap loader"
FreeBSD/x86 bootstrap loader
Sat Nov  9 15:29:40 EET 2013
toor@freebsd10.rdnzl.info
#

You can then compare that timestamp to the output of uname -a:

Code:
# uname -a
FreeBSD freebsd10.rdnzl.info 10.0-BETA3 FreeBSD 10.0-BETA3 #0 r257880: Sun Nov 10 09:59:15 EET 2013     toor@freebsd10.rdnzl.info:/usr/obj/usr/src/sys/RDNZL  i386
#

In my case I built the world and kernel once on saturday and then built the kernel only once more on sunday. As you can see if I didn't remember what I did exactly I couldn't really tell if the world and kernel on that machine are really in sync.
 
Ok may this helps someone else:
make buildworld date: strings /boot/loader | grep -A2 "bootstrap loader"
(Sat Sep 7 11:49:34 EDT 2013)
make kernel date: uname -v
(Sat Sep 7 18:53:58 EDT 2013)
make installworld date: ls -talr /usr/include/osreldate.h
(Sep 27 04:31)

Still would be nice to hear an alternative.

Thanks .
 
Back
Top