Installing NAS4Free

If, before or during the course your NAS4Free installation, you wish to consult the NAS4Free documentation, you can find it at:

     http://wiki.nas4free.org/doku.php?id=documentation:setup_and_user_guide

ZFS runs best on the 64-bit version of NAS4Free. On earlier versions of FreeNAS (e.g. 0.7.2) one would install the latest AMD64 release of FreeNAS because, despite the name AMD64, this version ran on 64-bit processors that were not from AMD. Now, the two versions are simply called x86 and x64 so the x64 version is the one to get. Out of the three x64 choices, the LiveCD or LiveUSB versions allow you to install NAS4Free on a hard drive, etc., so it is probably either of these two versions that you want. You can find the latest release at:

     http://sourceforge.net/projects/nas4free/files/

When you boot the installation CD or USB stick, the initial boot process has a couple of distinct parts:

     After the system goes through the POST and loads the OS from the boot
     device the NAS4Free boot menu will appear.  This menu is visible for a few
     seconds (long enough to allow you to choose one of the other boot options,
     if you are awake and on the ball).  At this step, you need do nothing.
     Just let the system take the default and boot normally.
     The system will continue booting as a NAS4Free server and, when it is
     complete, the system menu will appear.  It is at this point that you can
     commence your installation by choosing the install option.

The install menu gives you a number of choices about how you'd like to install NAS4Free. Basically, the two choices are "full" or "embedded". If you choose the "embedded" version, NAS4Free installs itself so that any changes that are made to the system are wiped out whenever the system is rebooted. This refreshing of the system means that it is protected against inadvertent updates, software failures, malicious hacks, etc. If anything goes wrong, you simply reboot the system.

On the other hand, if you'll be wanting to make any system changes (e.g. adding device drivers), storing programs or scripts on the system partition, etc., you should choose the "full" version.

Other than that, you need to decide whether you want to provide swap space for the system (we always add at a minimum the same amount as main memory, and up to a maximum of double the amount as main memory, in swap space, so that the system keeps limping along even when it runs out of main memory -- although you may prefer a kernel panic in this situation). Especially if your system disk is an SSD, adding swap space from such a device provides low cost, extra pages with only a minor impact in performance.

You also need to decide how much disk space you want to allow for the system (just by way of example, a typical NAS4Free installation on an 16GB hard disk partition uses about 270MB or about 2% of the partition). Thus, unless you are planning on installing a boat load of your own software on the system, we wouldn't recommend anything more than a 16GB partition.

Given these considerations (and given that you've chosen to install NAS4Free on a smallish hard disk or SSD), you should install either the "'full' OS on HDD + DATA + SWAP partiton" or the "'embedded' OS on HDD/Flash/USB + DATA + SWAP partition". As we said above, if you plan on modifying the OS, choose the "full" installation, otherwise choose the "embedded" installation.

After you've decided which installation type you'll do, you'll be asked to select the partition sizes. Since there's probably plenty of space on your system disk, you can allow a large partition for the OS. We like to use 8GB or 16GB. As we said above, we like to provide at least one or two times the amount of swap space as there is main memory. With 2GB of main memory, this implies 4GB of swap space, while with 8GB of main memory this implies 16GB of swap space (once again, there's probably pleny of disk space). The installaion process will take care of assigning the remaining disk space to the data partition. The UFS file system is fine for this partition.

Let the install rip. Make a note of the data and swap partition names when install tells you what they are (you'll need them later). Then reboot the system without the installation disk. The NAS4Free system console should come up.

The immediate goal is now to get the network up and running because all of the ensuing NAS4Free configuration is done from the Web UI.

If your system has multiple NICs, you may need to select the "Assign Interaces" menu item. Usually, the system will "do the right thing" but, if you have a preference for which NIC should be the main one, etc., you can check what it has done and, if necessary, move the NICs around.

What about if your network card isn't found at all? Other than the obvious, the card isn't plugged in correctly, this means that your network card is not supported by NAS4Free or more specifically, by the underlying FreeBSD.

You have two choices. You can replace the network card with one supported by FreeBSD. A quick check of the NAS4Free hardware compatibility list page will (hopefully) show your version of NAS4Free in the hardware support table, from which you can follow the link to the appropriate FreeBSD compatibility list page:

     http://wiki.nas4free.org/doku.php?id=nas4free_users_hardware

If you don't wish to replace the NIC, particularly if it is built-in to the motherboard, you can add a device driver if one is available (thankfully, the much-favored-by-motherboard-manufacturers 8111C chipset is now supported by the latest NAS4Free). Since it is likely that your NIC's driver will be found in NAS4Free, we won't dwell on this topic. But, if you do need to add a driver, Hani Ibrahim's blog may prove helpful:

     http://blog.hani-ibrahim.de/en/netzwerktreiber-auf-freenas-installieren.html

The default IPv4 address for NAS4Free is 192.168.1.250, which will be assigned to the first or only network adapter. If this works out for your network, you can just leave it unchanged. Note, however, that when we tried this option under NAS4Free 9.1.0.1.636, no DNS servers were filled in. Not that this is a problem, per se, but when the Web UI was brought up later on, an error message saying "No DNS setting found" appeared. At this point, it would seem that there is a bug in the Web UI because as long as the error message was present, the complete UI did not get produced by index.php and it was not possible to do anything from the UI since all of the menu dropdown items were missing.

This being the case, the next step is probably to select the "Set LAN IP Address" menu item. The dialog that follows will allow you select whether the system will use DHCP or be assigned a static IP address. If don't choose DHCP, you should supply the desired IP address and the subnet mask, the default gateway, and at least one DNS sever's address. In a local network, there's no real need for IPv6 so turn it off.

That's about it. You should now be able to get to the NAS4Free Web UI by aiming a Web browser, on another system, at the IP address that you assigned (or that was assigned). You will see the NAS4Free login screen. Logon using the default userid which is "admin". Its password is "nas4free". If you have problems logging in (e.g. the login screen just keeps getting replayed, reguardless of what you type), you should check that cookies are enabled for the IP address of the NAS4Free server. If you are using any kind of Web blocking or filtering software that disables or blocks cookies, you will not be able to log in.