Recover from USB boot drive failure

bwwalk1970

Dabbler
Joined
Jul 2, 2018
Messages
14
I have a server that I was booting from USB to load FreeNAS and the USB key got damaged. Is there a way to create a new USB boot key and have FreeNAS load the existing configuration of the system?
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
Generally with defaults without a backup of the config, no. In the case you have placed you system dataset on a pool other than your boot pool, yes. you can recover a copy of the config.
Save Config: save a backup copy of the current configuration database in the format hostname-version-architecture to the computer accessing the administrative interface. Saving the configuration after making any configuration changes is highly recommended. FreeNAS® automatically backs up the configuration database to the system dataset every morning at 3:45. However, this backup does not occur if the system is shut down at that time. If the system dataset is stored on the boot pool and the boot pool becomes unavailable, the backup will also not be available. The location of the system dataset can be viewed or set using System ‣ System Dataset
You should be able to boot to a fresh install, mount the existing pool and copy off the .db file to restore from.

When you say damaged, what do you mean???o_O
 

bwwalk1970

Dabbler
Joined
Jul 2, 2018
Messages
14
Generally with defaults without a backup of the config, no. In the case you have placed you system dataset on a pool other than your boot pool, yes. you can recover a copy of the config.

You should be able to boot to a fresh install, mount the existing pool and copy off the .db file to restore from.

When you say damaged, what do you mean???o_O
The USB key was in back of server and the movers snapped it off :( Can’t read from it
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,457
In the case you have placed you system dataset on a pool other than your boot pool
...which is the default, as soon as you create a pool.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
...which is the default, as soon as you create a pool.
I did not know that! This should be added to the documentation.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,457
This should be added to the documentation.
Feel free to log a bug against the docs if you think so. But why does it need to be there? When you go to the System Dataset page, you'll see that it's set to your pool.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
When I originally installed FreeNAS this was not the case (for me) so I assumed that the system data set would "happily" live on the boot pool until moved.
 

kappclark

Explorer
Joined
Oct 16, 2019
Messages
99
I have a Freenas box booting from a single 16GB USB flash drive. I have a copy of the config file db stored in another location.

Is it possible to clone the boot usb drive using Clonezilla ? I remember doing this with an ESXi box, and gave peace of mind..

OR - is there a way to add a second usb flash drive and build a mirror ? (I recall seeing this as a feature available when box is first built) ..
 

kappclark

Explorer
Joined
Oct 16, 2019
Messages
99
Looks like you can ! Going to try this this AM ..
-------------------------
------------------
Happy to report that it worked -- now the boot usb is mirrored with another 16G USB stick ... --- too easy .... !!!

Boot Pool Status






Name Read Write Checksum Status
freenas-boot 0 0 0 ONLINE more_vert
mirror 0 0 0 ONLINE
/dev/da0p2 0 0 0 ONLINE more_vert
/dev/da2p2 0 0 0 ONLINE more_vert
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,457
Top