Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jun 2020 11:44:32 +0200
From:      Ede Wolf <listac@nebelschwaden.de>
To:        freebsd-questions@freebsd.org
Subject:   Re: Find out OS version and plattform?
Message-ID:  <6652c5a3-d926-f8cc-a441-068f00de30a5@nebelschwaden.de>
In-Reply-To: <68061D36-1258-482F-9C10-7888F9DEC9CF@mail.sermon-archive.info>
References:  <16b61b7a-a313-883a-067a-b424b488b2de@nebelschwaden.de> <20200612101500.f455a884199613961283ed48@sohara.org> <68061D36-1258-482F-9C10-7888F9DEC9CF@mail.sermon-archive.info>

next in thread | previous in thread | raw e-mail | index | archive | help
 > Do a more /bin/freebsd-version

Just for information, this does not work, freebsd-version seems to be 
too modern:

# find /mnt/ -iname "*freebsd*"
/mnt/etc/mail/freebsd.mc
/mnt/etc/mail/freebsd.cf
/mnt/etc/mail/freebsd.submit.mc
/mnt/etc/mail/freebsd.submit.cf

Side note, this search does not traverse into /usr, which was a seperate 
partition (and not mounted here).

Same is therefore true for Polytropons 
..src/bin/freebsd-version/freebsd-version.sh.in.

src/sys/conf/newvers.sh is a bit contradicting to what /var/log/messages 
is proclaiming:

TYPE="FreeBSD"
REVISION="6.0"
BRANCH="STABLE"
if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
         BRANCH=${BRANCH_OVERRIDE}
fi
RELEASE="${REVISION}-${BRANCH}"
VERSION="${TYPE} ${RELEASE}"


So it looks as if the source has been updated, but world not rebuild.



Am 12.06.20 um 11:21 schrieb Doug Hardie:
>> On 12 June 2020, at 02:15, Steve O'Hara-Smith <steve@sohara.org> wrote:
>>
>> On Fri, 12 Jun 2020 11:03:22 +0200
>> Ede Wolf <listac@nebelschwaden.de> wrote:
>>
>>> Hi,
>>>
>>> is there a way to find out which version of FreeBSD was installed - and
>>> for what architecture, simply by  mounting the disk?
>>
>> 	If you mount it on FreeBSD then you can do something like this
>> (taken from man freebsd-version).
>>
>> mount -rt ufs /dev/ada0p2 /mnt
>> env ROOT=/mnt /mnt/bin/freebsd-version -ku
>>
>> 	You could inspect the sources of freebsd-version to find out how
>> this is done.
>>
>>> I am not talking about uname, where you have to be inside the os, but if
>>> you simply mount the root partition to another computer, where to look
>>> for these information?
>>
>> 	The kernel version is pulled from the kernel, I'm not sure where
>> the userland version is stored.
> 
> Do a more /bin/freebsd-version
> 
> Right at the end of the initial shell comments is:
> 
> # $FreeBSD: releng/12.1/bin/freebsd-version/freebsd-version.sh.in 325800 2017-11-14 10:15:17Z des $
> set -e
> USERLAND_VERSION="12.1-RELEASE-p3"
> 
> 
> 
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6652c5a3-d926-f8cc-a441-068f00de30a5>