Changing to usb boot drive from ssd

Dalton

Cadet
Joined
Sep 10, 2018
Messages
9
Hi all,
I am a complete newbie to all this so please bear with me. I have a Freenas box up and running however when I originally set it up I used an SSD drive as the boot drive. I would like to now change this to boot from a USB stick. As I have several TB of data stored already I dont want to lose it all and start from scratch so what would be the best way to create a USB boot drive to replace the existing ssd and then deploy it?

Thanks in advance for any help provided, being over 60 simple instructions are always preferred :smile:
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
Hi @Dalton

The following assumes you are not using an encrypted pool.

The easiest and safest method would be to follow these steps:
  1. On your currently running system, in the GUI, navigate to System -> General -> Save Config and save the downloaded .db file.
  2. Safely shut down your FreeNAS system, and unplug all internal drives.
  3. Remove the boot SSD and set it aside, in case things don't work out.
  4. Connect your new boot USB stick, power up, and boot from a FreeNAS installation DVD.
  5. Install FreeNAS to the USB stick.
  6. When the install is completed, shut down your system (or interrupt the reboot at the BIOS screen) and plug your data drives back in.
  7. Start up your system from the USB stick. You may need to find the IP address from the console.
  8. In the GUI, navigate to System -> General -> Upload Config and provide the path to the .db file you saved in step 1.
  9. Once uploaded, your FreeNAS system should reboot once more, and this time power up with your pool present. Verify that all files are accessible and there are no errors or faults.
Connect your SSD to another system, erase it, and redeploy for your new purpose. If that is intended to be L2ARC/SLOG on this system, I would suggest another thread under the Storage heading with your system specs, pool config, make/model of SSD, and expected workload, so we can evaluate if this use case will benefit you.
 

Dalton

Cadet
Joined
Sep 10, 2018
Messages
9
Hi @Dalton

The following assumes you are not using an encrypted pool.

The easiest and safest method would be to follow these steps:
  1. On your currently running system, in the GUI, navigate to System -> General -> Save Config and save the downloaded .db file.
  2. Safely shut down your FreeNAS system, and unplug all internal drives.
  3. Remove the boot SSD and set it aside, in case things don't work out.
  4. Connect your new boot USB stick, power up, and boot from a FreeNAS installation DVD.
  5. Install FreeNAS to the USB stick.
  6. When the install is completed, shut down your system (or interrupt the reboot at the BIOS screen) and plug your data drives back in.
  7. Start up your system from the USB stick. You may need to find the IP address from the console.
  8. In the GUI, navigate to System -> General -> Upload Config and provide the path to the .db file you saved in step 1.
  9. Once uploaded, your FreeNAS system should reboot once more, and this time power up with your pool present. Verify that all files are accessible and there are no errors or faults.
Connect your SSD to another system, erase it, and redeploy for your new purpose. If that is intended to be L2ARC/SLOG on this system, I would suggest another thread under the Storage heading with your system specs, pool config, make/model of SSD, and expected workload, so we can evaluate if this use case will benefit you.

Thank you very much for taking the time to document this, it is appreciated, I will have a go this weekend. I have read of mirroring the usb which I assume is to provide a fallback boot device, is this something that can be created later or should it all be done at the same time?

Thanks again.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
mirroring the usb which I assume is to provide a fallback boot device, is this something that can be created later or should it all be done at the same time?
It's easiest to do it during step 5 in the procedure mentioned here.

Tick both USB sticks when asked for the drive to install to.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Why do you wish to boot from a USB Flash drive? They are notoriously unreliable - even the good ones. Many people are migrating from Flash drives to small SSD's.
 

Dalton

Cadet
Joined
Sep 10, 2018
Messages
9
Thanks all,
I have managed to create and run freenas from the usb sticks so thanks for all your help and advice.
 

Dalton

Cadet
Joined
Sep 10, 2018
Messages
9
Why do you wish to boot from a USB Flash drive? They are notoriously unreliable - even the good ones. Many people are migrating from Flash drives to small SSD's.

Mainly because it seemed to be a waste of a good drive and I was concerned that if the drive failed I would be stuffed. Now if the boot usb stick fails I can simply stick in the reserve and I am up and running in seconds. At least thats what I understand.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Well... just remember to keep a back up of your configuration. You will be glad you did if you find it necessary to rebuild the system sometime down the road.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
If you installed FreeNAS on both USB drives at the same time (mirror), you should keep both flash drives in the machine, so they stay in sync. If you removed one, thinking it's just a spare, running zpool status will probably show that your boot pool is "degraded" and missing a disk.

Now if the boot usb stick fails I can simply stick in the reserve and I am up and running in seconds.
 

FrontierFred

Cadet
Joined
Feb 4, 2019
Messages
8
Hi @Dalton

The following assumes you are not using an encrypted pool.

The easiest and safest method would be to follow these steps:
  1. On your currently running system, in the GUI, navigate to System -> General -> Save Config and save the downloaded .db file.
  2. Safely shut down your FreeNAS system, and unplug all internal drives.
  3. Remove the boot SSD and set it aside, in case things don't work out.
  4. Connect your new boot USB stick, power up, and boot from a FreeNAS installation DVD.
  5. Install FreeNAS to the USB stick.
  6. When the install is completed, shut down your system (or interrupt the reboot at the BIOS screen) and plug your data drives back in.
  7. Start up your system from the USB stick. You may need to find the IP address from the console.
  8. In the GUI, navigate to System -> General -> Upload Config and provide the path to the .db file you saved in step 1.
  9. Once uploaded, your FreeNAS system should reboot once more, and this time power up with your pool present. Verify that all files are accessible and there are no errors or faults.
Connect your SSD to another system, erase it, and redeploy for your new purpose. If that is intended to be L2ARC/SLOG on this system, I would suggest another thread under the Storage heading with your system specs, pool config, make/model of SSD, and expected workload, so we can evaluate if this use case will benefit you.

Hi HoneyBadger, I am in a similar situation, although just want to upsize my USB boot devices, I assume same steps except I am using encrypted pool. Any tips? Thanks in advance.
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
Hi HoneyBadger, I am in a similar situation, although just want to upsize my USB boot devices, I assume same steps except I am using encrypted pool. Any tips? Thanks in advance.
Hi @FrontierFred,

You will be able to use most of the same process; however, since you have an encrypted pool, you absolutely must do the following first:
  1. Set a passphrase on your system/pool and store it safely.
  2. Download a copy of the encryption key and the latest recovery key. Store these keys safely in at least two locations; if you lose these your data is gone.
If you already have two existing, mirrored boot devices, you could consider just swapping them one at a time and letting the boot pool autoexpand. Make sure you back up the passphrase/keys before attempting this, just to be safe.

If you are moving from one type of boot media to another (SSD to USB, or vice versa) you can follow the previous instructions, including saving and backing up your .db file - but at step 9, your pool will not auto-import as it is encrypted. You will need to follow the instructions in 9.2.8 Importing a Pool and provide your encryption key/passphrase when requested during the import process.

If you have any troubles, please start a new thread for help/troubleshooting.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

FrontierFred

Cadet
Joined
Feb 4, 2019
Messages
8
Hi HoneyBadger, I am in a similar situation, although just want to upsize my USB boot devices, I assume same steps except I am using encrypted pool. Any tips? Thanks in advance.
Thought I'd better get back to you so we can close this post.
I think I may have had bad USB Sticks (Kingston Datatraveller G4 32GB), it kept crashing and I had to revert back to my old set up.
Finally got some new SanDisk 32GB and got the expansion done. Thanks
 
Top