How to identify FreeBSD version on a different partition?

Matthew Seaman matthew at FreeBSD.org
Mon May 8 08:55:34 UTC 2017


On 05/08/17 07:29, Thomas Mueller wrote:
> Is there any way to identify the version of a FreeBSD installation when booted to a different FreeBSD or NetBSD installation?
> 
> With NetBSD, I can look under /<NetBSD-root-partition>/stand , always see i386 or amd64, but I don't see anything so good or dependable with FreeBSD.
> 
> /etc/motd doesn't always show this information.
> 
> uname only shows the actively running version.
> 
> In my case, I use UFS and GPT, so FreeBSD and NetBSD can read each other's partitions with no disklabel incompatibilities.

/bin/freebsd-version is a shell script that contains the OS version
hard-coded within it, which you can just read.

Otherwise, you can run strings(1) on the kernel binary which is
typically in /boot/kernel/kernel -- the version identification stuff
appears near the end of quite a lot of output from that.

Note that if you're using freebsd-update(8), the user land version from
freebsd-version(1) may be a few patch levels ahead of the version from
the kernel binary.  It depends if the most resent security patches have
affected the kernel or not.

	Cheers,

	Matthew


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20170508/2ae53802/attachment.sig>


More information about the freebsd-questions mailing list