I installed FreeBSD 9.1-RELEASE, after binary upgrading to 9.2-RELEASE using freebsd-update, all files I checked are correctly in 9.2-RELEASE-p4. For example:

  1. the kernel contains the new version:

    # strings /boot/kernel/kernel | grep RELEASE|grep 9
    @(#)FreeBSD 9.2-RELEASE-p4 #0: Tue Apr  8 18:08:22 UTC 2014
    FreeBSD 9.2-RELEASE-p4 #0: Tue Apr  8 18:08:22 UTC 2014
  2. the first line of /etc/hosts shows it is upgraded to 9.2:

    # $FreeBSD: release/9.2.0/etc/hosts 109997 2003-01-28 21:29:23Z dbaker $

I asked on another forum and have verified that:

  1. I never compiled kernel, and do not have /usr/src and /usr/obj folders.

  2. the default /etc/profile is unchanged, in particular I never defined UNAME_* vars .

  3. I also tried "unsetenv UNAME_r"

However, uname somehow shows the wrong version 9.1:

# uname -a
FreeBSD localhost.localdomain 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     root at farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

So where does uname get the version number from? Which file(s) might not have been upgraded? Thank you!

  • uname shows the properties of the running kernel, did you skip the reboot after upgrading? – HBruijn May 6 '14 at 11:17
  • certainly not, the machine has reboot dozens of times afterwards. – John May 6 '14 at 17:32

FreeBSD uname is using sysctl values to fill-in its output, so there is no file to update except for the kernel.

Here are the corresponding sysctl key to uname options (from usr.bin/uname/uname.c):

  • -i : kern.ident
  • -m : hw.machine
  • -n : kern.hostname
  • -p : hw.machine_arch
  • -r : kern.osrelease
  • -s or -o : kern.ostype
  • -v : kern.version

It seems your actual kernel is not the one you think. You can check the kernel file in use with:

# sysctl kern.bootfile
  • 1
    Thanks, but "sysctl kern.bootfile" does return "kern.bootfile: /boot/kernel/kernel", which contains the string "9.2-RELEASE-p4", yet uname claims "9.1-RELEASE". – John May 12 '14 at 23:38
  • 1
    What about a massive search for "9.1-RELEASE" to maybe found out where this come from? (ie find / -type f -exec grep -l "9.1-RELEASE" {} \;) – Ouki May 13 '14 at 0:02
  • ok, this is something you do only when being pushed :-) I just did what you suggested above, looks like comments here don't support line breaks, hopefully I can write the result clearly (how do you do formatting above?). The result include: /etc/motd, /usr/local/bin/Xorg, /usr/local/sbin/lsof, some under /usr/ports, /var/db/locate.database, /var/log/gdm/:0.log, /var/log/Xorg.0.log, /var/run/dmesg.boot, /var/log/dmesg.today. – John May 13 '14 at 1:50
  • looks like I may be indeed running 9.1 kernel, as dmesg also says FreeBSD 9.1-RELEASE #0. But, I can not find a kernel bearing that. "find /boot | xargs grep 9.1-RELEASE" retuns nothing. "find /boot | xargs grep 9.2-RELEASE" returns /boot/kernel/kernel and /boot/kernel.old/kernel . – John May 13 '14 at 4:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.