Finding the FreeNAS version at the command line and other stuff

Status
Not open for further replies.

Ucalegon

Cadet
Joined
Oct 16, 2017
Messages
4
So to provide a little context... I have a HP ProLiant N40L microserver with 16 GB of ECC memory and four WD 3 TB EFRX Red series drives.

I had a bit of trouble building the box back in Aug 2013 but eventually got it to work and it has sat in a cupboard at the back of the house quietly and competently doing its thing ever since, apart from an occasional need to have the network interface re-added manually after a power up - never got to the bottom of that.

Recently I tried to fix this issue and in an ill-advised moment I chose the "Restore to factory defaults" option from the menu. This seemed to hang for a long time and I compounded my error by making the foolish decision to force a reboot. The unfortunate result is that the web server SQLite database is corrupt and as it sends multiple messages to the console eventually the system starts disabling messages for 30 seconds at a time, at which point I can't get control back. The Alt-F2 console seems fine but I couldn't recall the root password so that was a bust as well.

Eventually I was able to get into single user mode so I can now try and find out what I need to rebuild the system - I am imagining that my ZFS pool is still safe and sound on the WD drives.

I assume that what I need to know is the exact version of FreeNAS that is installed, and the config file. I can find the config file at /data/freenas-v1.db dated a few days ago (so overwritten when I did the reset) but there are two apparent copies of the config from back in 2013 a few month after the install - I assume these are copies I made manually of the config the last time I changed it.

So my questions:

1. If the config db is valid, am I likely to be able to get the NAS back up and fully running with a fresh install of the original FreeNAS release version with the old config dropped onto /data/freenas-v1.db ?

2. Where in the FS can I find a version string for the FreeNAS install so that I can source the correct install iso?

My intention is to update to a more recent version once I get things back on the air.

Many thanks for your patience in reading all this.
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
If the config db is valid, am I likely to be able to get the NAS back up and fully running with a fresh install of the original FreeNAS release version with the old config dropped onto /data/freenas-v1.db
One of the options in the web GUI is to upload a saved config file; that's what you'd want to do with your old copy.
Where in the FS can I find a version string for the FreeNAS install so that I can source the correct install iso
/etc/motd
 

Ucalegon

Cadet
Joined
Oct 16, 2017
Messages
4
One of the options in the web GUI is to upload a saved config file; that's what you'd want to do with your old copy.

Will do that when I get the new boot working - thanks. Need to determine the version first.

/etc/motd

Hmmm... Thought of that but I see something like:

Code:

FreeBSD ?.?.?  (UNKNOWN)

		   FreeNAS (c) 2009-2013, The FreeNAS Development Team
		   All rights reserved.

etc...


So I gather the motd file is modified during the boot process before being used.

Does some bin file have a version string that can be retrieved with the strings command?
 

styno

Patron
Joined
Apr 11, 2016
Messages
466
uname -a
 

Ucalegon

Cadet
Joined
Oct 16, 2017
Messages
4
Ah! Thanks styno - I used to know that command but my unix is a bit rusty :smile: That worked a treat.

It shows I've got 9.1-STABLE so I will proceed by trying to build a new boot USB drive for that version and then use the web interface to upload the backup of the config file.

Really appreciate the help styno and danb35 - thanks!
 

NASbox

Guru
Joined
May 8, 2012
Messages
650
Version at least on later versions
cat /etc/version
 

Ucalegon

Cadet
Joined
Oct 16, 2017
Messages
4
Thanks @NASbox - that's the most accurate answer so far.

I realized after my previous reply that uname -a gives me the FreeBSD version rather than the FreeNAS version - in my case FreeBSD 9.1-STABLE which isn't actually the name of a FreeNAS release, though it does help to narrow the search.

In my case the /etc/version file shows FreeNAS-9.1.1-RELEASE-x64 (a752d35) which nails it definitively.
 
Last edited by a moderator:
Status
Not open for further replies.
Top