Date: Fri, 12 Jun 2020 02:21:40 -0700 From: Doug Hardie <bc979@lafn.org> To: Steve O'Hara-Smith <steve@sohara.org> Cc: listac@nebelschwaden.de, freebsd-questions@freebsd.org Subject: Re: Find out OS version and plattform? Message-ID: <68061D36-1258-482F-9C10-7888F9DEC9CF@mail.sermon-archive.info> In-Reply-To: <20200612101500.f455a884199613961283ed48@sohara.org> References: <16b61b7a-a313-883a-067a-b424b488b2de@nebelschwaden.de> <20200612101500.f455a884199613961283ed48@sohara.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 12 June 2020, at 02:15, Steve O'Hara-Smith <steve@sohara.org> = wrote: >=20 > On Fri, 12 Jun 2020 11:03:22 +0200 > Ede Wolf <listac@nebelschwaden.de> wrote: >=20 >> Hi, >>=20 >> is there a way to find out which version of FreeBSD was installed - = and=20 >> for what architecture, simply by mounting the disk? >=20 > If you mount it on FreeBSD then you can do something like this > (taken from man freebsd-version). >=20 > mount -rt ufs /dev/ada0p2 /mnt > env ROOT=3D/mnt /mnt/bin/freebsd-version -ku >=20 > You could inspect the sources of freebsd-version to find out how > this is done. >=20 >> I am not talking about uname, where you have to be inside the os, but = if=20 >> you simply mount the root partition to another computer, where to = look=20 >> for these information? >=20 > 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=3D"12.1-RELEASE-p3"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?68061D36-1258-482F-9C10-7888F9DEC9CF>