The quickest and easiest way to get a FreeNAS server running is to write the image directly to a USB drive. After imaging the drive you can plug it into the computer, set the bios to boot from the drive, and watch FreeNAS boot directly from USB.
I like to run FreeNAS directly from USB because it saves me from wasting a hard drive bay just for the operating system. FreeNAS must have it’s own dedicated drive, it cannot reside on drives that will be part of a storage volume in the NAS.
This method requires no ISOs or blank CDs, all you need is a copy of the FreeNAS image and a USB flash drive that is 2GB or larger. The advertised capacity of a thumbdrive isn’t always equal to its actual capacity. My spare 2GB drive wouldn’t hold the image so I used a 4GB drive instead. FreeNAS uses dual 1GB partitions so a true 2GB USB drive will hold the image just fine. This problem usually only affects cheaper drives from shady manufactures, as long as you have a drive from a reputable manufacture you shouldn’t run into this issue.
1. Download the compressed FreeNAS image file.
Instead of download the ISO file you need to download the IMG file instead. Select the version, and architecture you intend to install from the download page then download the img.xz file.
2. Extract the image file from the archive.
Before the image file can be loaded on a USB drive it must be decompressed to your hard drive. I recommend using 7-Zip to extract the file, it’s free and works well. The compressed file is only about 125MB in size but uncompressed it jumps up to 2GB so make sure to extract it to a location with enough space.
3, Write the Image to a USB Drive.
To write the image to a thumbdrive you’ll need a program called Win32DiskImager. This program will transfer the raw disk image onto the USB drive. To use the program download the zip file and extract the contents to a folder on your computer. Then execute the program by running win32diskimager.exe. Load the img file you’ve extracted by clicking on the folder icon and navigating to the location of the file. Then select the drive letter of the USB drive in from the device dropdown box.
Be absolutely certain that you’ve selected the correct drive letter , you can easily corrupt a local drive if you’re not careful. If the USB drive you’re using doesn’t have a fast write speed then expect the process to take a few minutes to complete.
4. Boot from the USB drive.
Once the image has been transferred the device is ready to boot from. Plug the drive into the machine that’s going to run FreeNAS and make sure the BIOS is configured to boot from it. You should see the FreeNAS boot screen shortly after the computer starts booting from the USB drive.
General Thoughts on USB Installations
I try to install everything I can using USB drives, it’s been quite a while since I’ve actually had to burn a CD. I’ll probably be able to remove the optical drive from my computer in the near future. The process described in this post can be used for installing pfSense from USB.
For general testing and troubleshooting purposes I like to keep a copy of Backtrack installed on a USB drive.
Have you installed any other operating systems from USB? Leave a comment below to share your tips for USB installations.