Aug 16, 2018 How to set up a home file server using FreeNAS Setting up FreeNAS, a popular open-source network attached storage (NAS) solution, is not a. Check out this tutorial video from the FreeNASTeam on how to install FreeNAS 11. The video will walk you through the minimum requirements as well as installation from. In this article you are going to learn how to install FreeNAS 11.1 in an easy to follow step-by-step tutorial. Also, you learn how to create your first volume and share.
The FreeNAS® operating system has to be installed on aseparate device from the drives which hold the storage data. With onlyone disk drive, the FreeNAS® web interface isavailable, but there is no place to store any data. And storing datais, after all, the whole point of a NAS system. Home usersexperimenting with FreeNAS® can install FreeNAS® on an inexpensiveUSB stick and use the computer disks for storage.
This section describes:
The latest STABLE version of FreeNAS® 11.2 is available for downloadfrom https://download.freenas.org/11.2/STABLE/latest/.
The download page contains an .iso file. This is a bootableinstaller that can be written to a USB stick or CD asdescribed in Preparing the Media.
The .iso file has an associated sha256.txt
file which isused to verify the integrity of the downloaded file. The command toverify the checksum varies by operating system:
sha256name_of_file
sha256sumname_of_file
shasum-a256name_of_file
The value produced by running the command must match the value shownin the sha256.txt
file. Checksum values that do not matchindicate a corrupted installer file that should not be used.
The FreeNAS® installer can run from USB stick or a CD.
A CD burning utility is needed to write the .iso
file to aCD.
The .iso
file can be written directly to a USB stick. Themethod used to write the file depends on the operating system. Examplesfor several common operating systems are shown below.
Note
To install from a USB stick to another USB stick, twoUSB ports are needed, each with an inserted USB device. OneUSB stick contains the installer. The other USB stick is thedestination for the FreeNAS® installation. Take care to select thecorrect USB device for the FreeNAS® installation. It is notpossible to install FreeNAS® onto the same USB stick containing theinstaller. After installation, remove the installer USB stick. Itmight also be necessary to adjust the BIOS configuration to bootfrom the new FreeNAS® USB stick.
Ensure the operating system device order in the BIOS is set to boot fromthe device containing the FreeNAS® installer media, then boot thesystem to start the installation.
On a FreeBSD or Linux system, the dd command is used towrite the .iso
file to an inserted USB stick.
Warning
The dd command is very powerful and candestroy any existing data on the specified device. Makeabsolutely sure of the device name to write to and do notmistype the device name when using dd! This command canbe avoided by writing the .iso
file to a CD instead.
This example demonstrates writing the image to the first USB deviceconnected to a FreeBSD system. This first device usually reports as/dev/da0. Replace FreeNAS-RELEASE.iso
with the filenameof the downloaded FreeNAS® ISO file. Replace /dev/da0
withthe device name of the device to write.
When using the dd command:
/dev/sdX
, where X refers to theletter of the USB device.Image WriterandRufuscan be used for writing images to USB sticks on Windows.
Insert the USB stick. In Finder, go toApplications ➞ Utilities ➞ Disk Utility.Unmount any mounted partitions on the USB stick. Check that theUSB stick has only one partition, or partition table errors willbe shown on boot. If needed, use Disk Utility to set up one partitionon the USB stick. Selecting Free space when creating thepartition works fine.
Determine the device name of the inserted USB stick. FromTERMINAL, navigate to the Desktop, then type this command:
This shows which devices are available to the system. Locate thetarget USB stick and record the path. To determine the correct pathfor the USB stick, remove the device, run thecommand again, and compare the difference. Once sure of the devicename, navigate to the Desktop from TERMINAL, unmount the USB stick,and use the dd command to write the image to the USB stick.In this example, the USB stick is /dev/disk1
. It isfirst unmounted. The dd command is used to write theimage to the faster “raw” version of the device (note the extrar
in /dev/rdisk1
).
When running these commands, replace FreeNAS-RELEASE.iso
with the name of the FreeNAS® ISO and /dev/rdisk1
with thecorrect path to the USB stick:
Note
If the error “Resource busy” is shown when thedd command is run, go toApplications ➞ Utilities ➞ Disk Utility,find the USB stick, and click on its partitions to make sureall of them are unmounted. If a “Permission denied” error is shown,use sudo for elevated rights:sudoddif=FreeNAS-11.0-RELEASE.isoof=/dev/rdisk1bs=64k
.This will prompt for the password.
The dd command can take some minutes to complete. Waituntil the prompt returns and a message is displayed with informationabout how long it took to write the image to the USB stick.
With the installation media inserted, boot the system from that media.
The FreeNAS® installer boot menu is displayed as is shown inFigure 2.3.1.
The FreeNAS® installer automatically boots into the default option afterten seconds. If needed, choose another boot option by pressing theSpacebar
to stop the timer and then enter the number of thedesired option.
Tip
The Serial Console option is useful on systemswhich do not have a keyboard or monitor, but are accessed through aserial port, Serial over LAN, or IPMI.
Note
If the installer does not boot, verify that the installationdevice is listed first in the boot order in the BIOS. When bootingfrom a CD, some motherboards may require connecting the CD deviceto SATA0 (the first connector) to boot from CD. If the installerstalls during bootup, double-check the SHA256 hash of the.iso
file. If the hash does not match, re-download thefile. If the hash is correct, burn the CD again at a lower speed orwrite the file to a different USB stick.
Once the installer has finished booting, the installer menu is displayedas shown in Figure 2.3.2.
Press Enter
to select the default option,1 Install/Upgrade. The next menu, shown inFigure 2.3.3,lists all available drives. This includes any inserted operating system devices,which have names beginning with da.
Note
A minimum of 8 GiB of RAM is required and the installer willpresent a warning message if less than 8 GiB is detected.
In this example, the user is performing a test installation usingVirtualBox and has created a 16 GiB virtual disk to hold the operatingsystem.
Use the arrow keys to highlight the destination SSD, hard drive,USB stick, or virtual disk. Press the spacebar
to selectit. To mirror the operating system device, move to the second device and pressspacebar
to select it also. After making these selections,press Enter
. The warning shown inFigure 2.3.4is displayed, a reminder not to install the operating system on adrive that is meant for storage. Press Enter
to continue on tothe screen shown inFigure 2.3.6.
Fig. 2.3.4 Installation Warning
See the operating system devicesection to ensure the minimum requirements are met.
The installer recognizes existing installations of previous versionsof FreeNAS®. When an existing installation is present, the menu shown inFigure 2.3.5is displayed. To overwrite an existing installation, use the arrowsto move to Fresh Install and press Enter
twice tocontinue to the screen shown inFigure 2.3.6.
The screen shown inFigure 2.3.6prompts for the root passwordwhich is used to log in to the web interface.
Fig. 2.3.6 Set the Root Password
Setting a password is mandatory and the password cannot be blank.Since this password provides access to the web interface, itneeds to be hard to guess. Enter the password, press the down arrow key,and confirm the password. Then press Enter
to continue with theinstallation. Choosing Cancel skips setting a root passwordduring the installation, but the web interface will require setting aroot password when logging in for the first time.
Note
For security reasons, the SSH service and root SSH loginsare disabled by default. Unless these are set, the only way toaccess a shell as root is to gain physical access to the consolemenu or to access the web shell within the web interface. Thismeans that the FreeNAS® system needs to be kept physically secure andthat the web interface needs to be behind a properly configuredfirewall and protected by a secure password.
FreeNAS® can be configured to boot with the standard BIOS bootmechanism or UEFI booting as shownFigure 2.3.7.BIOS booting is recommended for legacy and enterprise hardware. UEFIis used on newer consumer motherboards.
Note
Most UEFI systems can also boot in BIOS mode if CSM(Compatibility Support Module) is enabled in the UEFI setupscreens.
The message inFigure 2.3.8is shown after the installation is complete.
Press Enter
to return to Installer Menu.Highlight 3 Reboot System and press Enter
. Ifbooting from CD, remove the CDROM. As the system reboots, make surethat the device where FreeNAS® was installed is listed as the firstboot entry in the BIOS so the system will boot from it.
FreeNAS® boots into the Console Setup menu described inBooting after waiting five seconds in theboot menu. Press the Spacebar
to stop thetimer and use the boot menu.
If the system does not boot into FreeNAS®, there are several thingsthat can be checked to resolve the situation.
Check the system BIOS and see if there is an option to change the USBemulation from CD/DVD/floppy to hard drive. If it still will not boot,check to see if the card/drive is UDMA compliant.
If the system BIOS does not support EFI with BIOS emulation, see if ithas an option to boot using legacy BIOS mode.
When the system starts to boot but hangs with this repeated errormessage:
go into the system BIOS and look for an onboard device configurationfor a 1394 Controller. If present, disable that device and try bootingagain.
If the system starts to boot but hangs at a mountroot> prompt,follow the instructions inWorkaround/Semi-Fix for Mountroot Issues with 9.3.
If the burned image fails to boot and the image was burned using aWindows system, wipe the USB stick before trying a second burn using autility such asActive@ KillDisk.Otherwise, the second burn attempt will fail as Windows does notunderstand the partition which was written from the image file. Bevery careful to specify the correct USB stick when using a wipeutility!
FreeNAS® provides flexibility for keeping the operating systemup-to-date:
This section describes how to perform an upgrade from an earlierversion of FreeNAS® to 11.2. After 11.2 has been installed,use the instructions in Update to keep the system updated.
Be aware of these caveats before attempting an upgrade to11.2:
Before upgrading the operating system, perform the following steps:
To perform an upgrade using this method,downloadthe .iso
to the computer that will be used to prepare theinstallation media. Burn the downloaded .iso
file to a CD orUSB stick using the instructions inPreparing the Media.
Insert the prepared media into the system and boot from it. Theinstaller waits ten seconds in theinstaller boot menu before booting thedefault option. If needed, press the Spacebar
to stop the timerand choose another boot option. After the media finishes booting intothe installation menu, press Enter
to select the default optionof 1 Install/Upgrade. The installer presents a screenshowing all available drives.
Warning
All drives are shown, including boot drives and storagedrives. Only choose boot drives when upgrading. Choosing the wrongdrives to upgrade or install will cause loss of data. If unsureabout which drives contain the FreeNAS® operating system, reboot andremove the install media. In the FreeNAS® web interface, useSystem ➞ Bootto identify the boot drives. More than one drive is shown when amirror has been used.
Move to the drive where FreeNAS® is installed and press theSpacebar
to mark it with a star. If a mirror has been used forthe operating system, mark all of the drives where the FreeNAS®operating system is installed. Press Enter
when done.
The installer recognizes earlier versions of FreeNAS® installed on theboot drive or drives and presents the message shown inFigure 2.5.1.
To perform an upgrade, press Enter
to accept the default ofUpgrade Install. Again, the installer will display areminder that the operating system should be installed on a diskthat is not used for storage.
Fig. 2.5.2 Install in New Boot Environment or Format
Diablo Patch v1.09. This is the latest v1.09 patch for Diablo, fixing some Battle.net issues and some other gameplay problems. Fixed some Battle.net issues. Reverted a change made in 1.08 that, while correctly calculated distance, caused unintended gameplay issues. Diablo 1 patch 1.09b download. Download Diablo v1.09b Upgrade Patch for Windows. This is the update for Diablo, bringing you to version. This is the update for Diablo, bringing you to version. Diablo v1.09b Upgrade Patch for Windows. This is the update for Diablo, bringing you to version 1.09b.
The updated system can be installed in a new boot environment,or the entire operating system device can be formatted to start fresh. Installinginto a new boot environment preserves the old code, allowing aroll-back to previous versions if necessary. Formatting the bootdevice is usually not necessary but can reclaim space. User data andsettings are preserved when installing to a new boot environment andalso when formatting the operating system device. Move the highlight to one of theoptions and press Enter
to start the upgrade.
The installer unpacks the new image and displays the menu shown inFigure 2.5.3.The database file that is preserved and migrated contains your FreeNAS®configuration settings.
Press Enter
. FreeNAS® indicates that the upgrade is complete anda reboot is required. Press OK, highlight3 Reboot System, then press Enter
to reboot thesystem. If the upgrade installer was booted from CD, remove the CD.
During the reboot there can be a conversion of the previousconfiguration database to the new version of the database. Thishappens during the “Applying database schema changes” line in thereboot cycle. This conversion can take a long time to finish,sometimes fifteen minutes or more, and can cause the systemto reboot again. The system will startnormally afterwards. If database errors are shown but the web interfaceis accessible, go toSettings ➞ Generaland use the UPLOAD CONFIG button to upload theconfiguration that was saved before starting the upgrade.
To perform an upgrade using this method, go toSystem ➞ Update. See Update for moreinformation on upgrading the system.
The connection is lost temporarily when the update is complete. Itreturns after the FreeNAS® system reboots into the new version of theoperating system. The FreeNAS® system normally receives the sameIP address from the DHCP server. Refresh the browser after a momentto see if the system is accessible.
If an update fails, an alert is issued and the details are written to/data/update.failed
.
To return to a previous version of the operating system, physical or IPMIaccess to the FreeNAS® console is needed. Reboot the system and watch forthe boot menu:
FreeNAS® waits five seconds before booting into the default bootenvironment. Press the Spacebar
to stop the automaticboot timer. Press 4
to display the available boot environmentsand press 3
as needed to scroll through multiple pages.
Fig. 2.5.5 Boot Environments
In the example shown in Figure 2.5.5, the firstentry in Boot Environments is11.2-MASTER-201807250900
. This is the current version of theoperating system, after the update was applied. Since it is the firstentry, it is the default selection.
The next entry is Initial-Install
. This is the original bootenvironment created when FreeNAS® was first installed. Since there are noother entries between the initial installation and the first entry, onlyone update has been applied to this system since its initialinstallation.
To boot into another version of the operating system, enter the numberof the boot environment to set it as Active. PressBackspace
to return to the Boot Menu andpress Enter
to boot into the chosen Active bootenvironment.
If an operating system device fails and the system no longer boots, don’t panic.The data is still on the disks and there is still a copy of the savedconfiguration. The system can be recovered with a few steps:
Note
It is not possible to restore a saved configuration that isnewer than the installed version. For example, if a rebootinto an older version of the operating system is performed,a configuration created in a later version cannot be restored.
In FreeNAS®, ZFS pools can be upgraded from the graphicaladministrative interface.
Before upgrading an existing ZFS pool, be aware of these caveatsfirst:
To perform the ZFS pool upgrade, go toStorage ➞ Pools and click (Settings)to upgrade. Click theUpgrade Pool button as shown inFigure 2.5.6.
Note
If the Upgrade Pool button does not appear, thepool is already at the latest feature flags and does not need to beupgraded.
The warning serves as a reminder that a pool upgrade is notreversible. Click OK to proceed with the upgrade.
The upgrade itself only takes a few seconds and is non-disruptive.It is not necessary to stop any sharing services to upgrade thepool. However, it is best to upgrade when the pool is not beingheavily used. The upgrade process will suspend I/O for a shortperiod, but is nearly instantaneous on a quiet pool.
FreeNAS® can be run inside a virtual environment for development,experimentation, and educational purposes. Note that runningFreeNAS® in production as a virtual machine is not recommended.When using FreeNAS® within a virtual environment,read this post firstas it contains useful guidelines for minimizing the risk of losingdata.
To install or run FreeNAS® within a virtual environment, create avirtual machine that meets these minimum requirements:
This section demonstrates how to create and access a virtual machinewithin VirtualBox and VMware ESXi environments.
VirtualBoxis an open source virtualization program originally created by SunMicrosystems. VirtualBox runs on Windows, BSD, Linux, Macintosh, andOpenSolaris. It can be configured to use a downloaded FreeNAS®.iso
file, and makes a good testing environment for practicingconfigurations or learning how to use the features provided byFreeNAS®.
To create the virtual machine, start VirtualBox and click theNew button, shown inFigure 2.6.1,to start the new virtual machine wizard.
Click the Next button to see the screen inFigure 2.6.2.Enter a name for the virtual machine, click theOperating System drop-down menu and select BSD, and selectFreeBSD (64-bit) from the Version dropdown.
Fig. 2.6.2 Enter Name and Operating System for the New Virtual Machine
Click Next to see the screen inFigure 2.6.3.The base memory size must be changed to at least 8192 MiB. Whenfinished, click Next to see the screen inFigure 2.6.4.
Fig. 2.6.3 Select the Amount of Memory Reserved for the Virtual Machine
Fig. 2.6.4 Select Existing or Create a New Virtual Hard Drive
Click Create to launch theCreate Virtual Hard Drive Wizard shown inFigure 2.6.5.
Select VDI and click the Next button to seethe screen inFigure 2.6.6.
Fig. 2.6.6 Select Storage Type for Virtual Disk
Choose either Dynamically allocated orFixed-size storage. The first option uses disk space asneeded until it reaches the maximum size that is set in the nextscreen. The second option creates a disk the full amount of diskspace, whether it is used or not. Choose the first option to conservedisk space; otherwise, choose the second option, as it allowsVirtualBox to run slightly faster. After selecting Next,the screen inFigure 2.6.7is shown.
Fig. 2.6.7 Select File Name and Size of Virtual Disk
This screen is used to set the size (or upper limit) of the virtualdisk. Set the default size to a minimum of 8 GiB. Use the foldericon to browse to a directory on disk with sufficient space to hold thevirtual disk files. Remember that there will be a system disk ofat least 8 GiB and at least one data storage disk of at least 4 GiB.
Use the Back button to return to a previous screen if anyvalues need to be modified. After making a selection and pressingCreate, the new VM is created. The new virtual machine islisted in the left frame, as shown in the example inFigure 2.6.8. Open the Machine Toolsdrop-down menu and select Details to see extra informationabout the VM.
Create the virtual disks to be used for storage. Highlight the VM andclick Settings to open the menu. Click theStorage option in the left frame to access the storagescreen seen inFigure 2.6.9.
Fig. 2.6.9 Storage Settings of the Virtual Machine
Click the Add Attachment button, selectAdd Hard Disk from the pop-up menu, then click theCreate new disk button. This launches theCreate Virtual Hard Disk wizard seen inFigure 2.6.5 and2.6.6.
Create a disk large enough to hold the desired data. The minimumsize is 4 GiB.To practice with RAID configurations, create as many virtual disks asneeded. Two disks can be created on each IDE controller. Foradditional disks, click the Add Controller button tocreate another controller for attaching additional disks.
Create a device for the installation media. Highlight the word“Empty”, then click the CD icon as shown inFigure 2.6.10.
Click Choose Virtual Optical Disk File… to browse tothe location of the .iso
file. If the .iso
was burnedto CD, select the detected Host Drive.
Depending on the extensions available in the host CPU, it might not bepossible to boot the VM from an .iso
. If“your CPU does not support long mode” is shown when trying to bootthe .iso
, the host CPU either does not have the requiredextension or AMD-V/VT-x is disabled in the system BIOS.
Note
If there is a kernel panic when booting into the ISO,stop the virtual machine. Then, go to System and checkthe box Enable IO APIC.
To configure the network adapter, go toSettings ➞ Network ➞ Adapter 1.In the Attached to drop-down menu selectBridged Adapter, then choose the name of the physicalinterface from the Name drop-down menu. In the exampleshown inFigure 2.6.11,the Intel Pro/1000 Ethernet card is attached to the network and has adevice name of em0.
Fig. 2.6.11 Configuring a Bridged Adapter in VirtualBox
After configuration is complete, click the Start arrow andinstall FreeNAS® as described in Performing the Installation.After FreeNAS® is installed, press F12
when the VM starts toboot to access the boot menu. Select the primary hard disk as the bootoption. You can permanently boot from disk by removing theOptical device in Storage or by uncheckingOptical in the Boot Order section ofSystem.
ESXi is a bare-metal hypervisor architecture created by VMware Inc.Commercial and free versions of the VMware vSphere Hypervisoroperating system (ESXi) are available from theVMware website.
Install and use the VMware vSphere client to connect to theESXi server. Enter the username and password created when installingESXi to log in to the interface. After logging in, go to Storage toupload the FreeNAS®.iso
.Click Datastore browser and select a datastore for theFreeNAS®.iso
. Click Upload and choosethe FreeNAS®.iso
from the host system.
Click Create / Register VM to create a new VM. The Newvirtual machine wizard opens:
Select creation type: SelectCreateanewvirtualmachine
and click Next.
Select a name and guest OS: Enter a name for the VM. Leave ESXicompatibility version at the default. Select Other
as theGuest OS family. SelectFreeBSD12orlaterversions(64-bit)
as the Guest OSversion. Click Next.
Select storage: Select a datastore for the VM. The datastoremust be at least 32 GiB.
Customize settings: Enter the recommended minimums of at least8 GiB of memory and 32 GiB of storage. SelectDatastoreISOfile
from the CD/DVD Drive 1drop-down. Use the Datastore browser to select the uploaded FreeNAS®.iso
. Click Next.
Ready to complete: Review the VM settings. ClickFinish to create the new VM.
To add more disks to a VM, right-click the VM and clickEdit Settings.
ClickAdd hard disk ➞ New standard hard disk.Enter the desired capacity and click Save.
Fig. 2.6.17 Adding a Storage Disk
Virtual HPET hardware can prevent the virtual machine from booting onsome older versions of VMware. If the virtual machine does not boot,remove the virtual HPET hardware:
filename.vmx
. Open the file in a text editor and changehpet0.present from true to false, then save thechange.Network connection errors for plugins or jails inside the FreeNAS® VM canbe caused by a misconfiguredvirtual switchorVMware port group.Make sure MAC spoofing and promiscuous mode are enabled on the switchfirst, and then the port group the VM is using.
We’ve compiled a handy task list of best practices that will ensure your success. After installing FreeNAS, these tasks can be done in any order and are not mandatory, but highly recommended.
Complete coverage of setting up storage, shares, plugins, jails, virtual machines, and much more!
Still have questions after reading the documentation? The forums are full of articles, guides, and knowledgeable people who can help you. This is the best place to go with any FreeNAS-related questions or just to chat with the community.
Register for the free iX University training modules from iXsystems to get the information you need on your schedule. Each module is topic-specific, around 30 minutes in length, and available on demand.
Get the latest updates and tips delivered directly to your inbox every month. Be the first to learn when new releases come out and what’s currently in development.
Join like-minded people to discuss and share all things FreeNAS. This is the place to ask your questions and see what other members of the community are doing with their systems.
Follow us on social media for more FreeNAS tips and tricks.