This is a step by step description of how I installed Nas4Free on an USB Flash Drive.
Let's get down to business.
What you need:
Nas4Free
http://www.nas4free.org/
http://www.nas4free.org/downloads.html
I installed the latest version at the time this post was written:
http://sourceforge.net/projects/nas4free/files/NAS4Free-9.1.0.1/9.1.0.1.573/
2 * USB Stick
You will need 2 USB sticks, one for the LiveUSB for the installer and one to install NAS4Free to.
I have 4 or 5 USB Flash Stick lying around so this is the most straightforward method for me. And of course my NAS Box does not have an optical unit.
Instructions:
1. Download the Live USB or embedded *.img for your architecture.
I used NAS4Free-x64-LiveUSB-9.1.0.1.573.img and NAS4Free-x64-embedded-9.1.0.1.573.img in my tests
2. Insert the USB Key and write one of the images on it.
Be very careful what device you use for the output(of=) of the dd command used below.
To find out which device is your USB Drive please use
sudo parted -l
or
sudo fdisk -l
For me it was /dev/sdd
== NAS4Free-x64-LiveUSB-9.1.0.1.573.img ==
This is a raw USB image which can be used to install NAS4Free to another USB Drive or a HDD. It can be written directly to the USB Flash Drive using dd.
sudo dd if=NAS4Free-x64-LiveUSB-9.1.0.1.573.img of=/dev/sdd
I used this image.
== NAS4Free-x64-embedded-9.1.0.1.573.img ==
This is a compressed image which can be used for upgrading NAS4Free using the web interface. Use this image to run NAS4Free directly from the USB Drive you put it on. It must be decompressed before it is used with dd. For some strange reason gunzip did not like the file name so I had to pipe the fie from cat command output to gunzip. The -c parameter makes gunzip output to stdout.
cat NAS4Free-x64-embedded-9.1.0.1.573.img | gunzip -c | sudo dd of=/dev/sdd1
The comments of alexey123 (regarding the use of dd) from this forum post and others were very helpful for me. Thank you!
From this point on I will be describing what to do if you use the LiveUSB image.
3. Insert the USB Key with the Live USB Image (NAS4Free-x64-LiveUSB-9.1.0.1.573.img) into your NAS machine and configure it as a boot device from the BIOS.
The OS will boot in a minute or so and you will be presented with a numbered menu.
You will see the message "Now, the blank USB memory for installation can be inserted."
Insert you install target USB Drive, the system should notify you, and then choose the option "Install/Upgrade NAS4Free from LiveCD/LiveUSB" (it was 9 for me).
I chose the Embedded istall on a CF/USB Flash Drive option.
WARNING: All partitions on your selected USB Flash Drive will be erased.
Then choose the installation source and on the next page, the installation target (The second USB Drive you inserted).
The installation should take less than a minute. After it is finished, remove the LiveUSB Drive and reboot the machine.
Your new OS should happily boot.
That's it! Happy NASing!!.
Other useful tips:
To format a USB Drive using FAT32 you can issue the following commands:
sudo umount /dev/sdd
sudo mkdosfs -F 32 -n "Label" -I /dev/sdd
An alternative method is to use the visual tool GParted.