# Kernel shows p7, uname returns p4



## GROND (Jul 25, 2014)

Running `strings /boot/kernel/kernel | grep "RELEASE"` shows `10.0-RELEASE-p7`, yet `uname -r` returns `10.0-RELEASE-p4`. I've upgraded using freebsd-update. What could be causing the discrepancy, and how would I ensure that I'm properly upgraded? I suppose that the kernel could be at p7 and the userland at p4, but how would that have happened using freebsd-update? Thoughts would be very welcome. Thanks.


----------



## Juanitou (Jul 26, 2014)

The patch level of the kernel and the userland may be different on a properly upgraded system. You can check both with freebsd-version(1) (new command available on FreeBSD 10.0). You will find an explanation about versions and freebsd-update(8) in the above man page.


----------



## GROND (Jul 26, 2014)

Thanks @Juanitou, that is helpful. However, `freebsd-version -k` returns p7 and `freebsd-version -u` returns p7, yet `uname -r` still returns p4. While I am reassured that I'm properly upgraded, my trust in the uname(1) program is now eroded. What could be the issue, and how can I trust uname(1) in situations like this?


----------



## junovitch@ (Jul 27, 2014)

Dumb question... Did you reboot after updating? How about partition layout?  Is /boot on a separate partition? I remember seeing something in another post where /boot at boot time was being mounted over after the OS booted and caused similar symptoms.  I can't remember the exact details of that though but figured to ask about partitioning.


----------



## kpa (Jul 27, 2014)

This is a FAQ. For some reason the security team still doesn't do a kernel rebuild unless a security or errata update requires one. The result is that if you're using freebsd-update(8) for updates the patch level in the uname(1) output will lag behind the real patch level until there's an update that requires a kernel rebuild.


----------



## GROND (Jul 27, 2014)

That makes sense, but is pretty annoying. I guess that's why they added the freebsd-version(1) and the uname(1) -K and -U options. Anyway, I rebuilt world and now `uname -r` returns 10.0-RELEASE-p7. I was hoping to avoid building the system, as the machine in question takes about eight hours to do a full rebuild (single-core i386 Xeon, 2G 2 GB DDR2), but I wanted to be sure that I wasn't mixing patch levels or getting anything out of sync.


----------

