How to install FreeNAS to USB stick


Note: This post is more than an year old. You can still use it to install FreeNAS on USB but I strongly recommend you to read the new one first which is much simpler:

Installing FreeNAS to USB stick (new and simpler way)

FreeNAS is an Open Source Storage Platform based on FreeBSD and supports sharing across Windows, Apple, and UNIX-like systems. It comes with a lot of protocols and services

28 thoughts on “How to install FreeNAS to USB stick

  1. Thanks for your tips!
    It installed flawless using the PhysGUI tool (sadly is German language only).
    I used Kingston DataTraveler 100 G2 4.0 Gb.
    Select to overwrite the 2 Gb limitation.
    And under Windows 7 SP1 use the indications above (diskpart) to erase USB partition/s before FreeNAS installation.
    Thanks a lot!

  2. didn’t work win7 Which disk do you want to write? (0..0) 1
    WARNING: that disk is larger than 2 GB! Make sure you’re not accidentally
    overwriting your primary hard disk! Proceeding on your own risk…
    About to overwrite the contents of disk 1 with new data. Proceed? (y/n) y
    Failed to open \\.\PhysicalDrive1 – exiting.

    • (0..0) means only one disk is recognized for some reason and probably this is your Win7 disk. When you run PhysGUI.exe does it show one disk or more than one? Maybe try with another USB stick.

  3. i run cmd prompt as admin, but still get the same error tried differebt formats like fat/fat32/exfat but doesn’ work..still get same error :
    Write error after 0 bytes

    what else can i do ?

  4. thanks,

    i tried it now with the HP tool…then proceeded the sam as before..
    now i got: 24576/79478784 bytes written Write error after 24576 .

    puh……and now ? i have no idea…..

  5. also try out all the tools mentioned . i got the folllowing Error

    Failed to open FreeNAS_amd64_embedded_ exiting

    any help please help me

    Thank you

  6. hi all..and merry christmas!

    just imstalled freenas now and have been playing around…so far no prooblem.

    but: when copying some data to the nas, it breaks during copy….need to restart then.

    read a lot about this problem with the network drivers…and now going backt to WHS 2003..so whs 2011 is too slow…..

  7. If you’re getting write errors before it finishes try this.

    Open a command window as admin (“cmd”)
    Type “diskpart” and hit enter.
    Type “list disk” and hit enter to find out the number of your drive.
    Type “select disk X” (where you replace X with the number of your drive) and hit enter.
    Type “clean” and hit enter.

    after that go back to your temp folder and then try the process again.

    • I too was having the same problem of installing FreeNAS on my 2GB pen drive. But after using Jim’s method it worked for me! THT

      And thanks Jim!

  8. Hi Jim,

    It worked magically. Thanks for the tip. I am not sure what the “clean” command does different than “Format” disk command under Windows, but it did the trick.

    Happy New Year,
    DarkRido

    • From Microsoft web site:

      Diskpart enables a superset of the actions that are supported by the Disk Management snap-in. The Disk Management snap-in prohibits you from inadvertently performing actions that may result in data loss. It is recommended that you use the Diskpart utility cautiously because Diskpart enables explicit control of partitions and volumes.

      clean [all]

      Use the clean command to remove partition or volume formatting from the current in-focus disk by zeroing sectors. By default, only the MBR or GPT partitioning information and any hidden sector information on MBR disks is overwritten. If you specify the all parameter, each and every sector can be zeroed, and all data that is contained on the drive can be deleted.

  9. I found that physdiskwrite won’t write to formatted partitions. That’s why only a few MB of data is written and it aborts.

    The clean command works great as it wipes out all partitions and makes the drive raw, like when new. I found this out when I used a hard drive from my hackintosh on my windows system and it got GPT stuck and would mess up my boot. A fellow hackintosh told me to use the clean command as it will also remove the GPT, and when I reformat the drive I should use the MBR method.

    so yes, you’ll need to use the clean method with physdiskwrite. Maybe step 2 should be more clear on this to help many users who use this tutorial.

  10. When “Failed to open FreeNas-i386……” happened for me I found this in a forum.

    From the user bladestrike (I love you right now btw):

    If I could elaborate a bit (the run as Administrator thing needs to be more explicit).

    First make sure the USB stick is physically big enough. You should use at least 2GB, preferably 4GB, because the USB drive should be capable of holding at least two images, the current image and a second image wen the occasion comes to upgrade your version of FreeNAS.

    Second extract your full install image to a simply named directory, something like “Install” (only seven characters long), on a disk of your choice in your system. Give the extracted image a simple name such as “freenas8” (only 8 characters long). The simple names make it easier to navigate to the working directories while running from the command line.

    Third download physdiskwrite from m0n0wall (http://m0n0.ch/wall/physdiskwrite.php). Extract and install physdiskwrite in the Install directory.

    Make sure you invoke the command prompt as an Administrator (right click on the command prompt icon and select “run as Administrator”). Failure to do this will result in physdiskwrite not finding your target drive, with you potentially wiping out your main disk drive.

    Fourth navigate to the directory containing both physdiskwrite and freenas8.

    Fifth follow the instructions for using diskpart on the m0n0wall page (referenced above). This will ensure the USB stick is emptied and with no partitions.

    Sixth run physdiskwrite -u freenas8 and follow the prompts to enter the physical disk number (which you will discover when you run diskpart).

    In my case the end result was:
    Which disk do you want to write? 2
    WARNING: that disk is larger than 2GB! Make sure you’re not accidentally
    overwriting your primary hard disk! Proceeding on your own risk…
    About to overwrite the contents of disk 2 with new data. Proceed? (y/n) y
    1000000000/1000000000 bytes written in total

    Seventh eject the USB drive, then remove it from your PC and install it into your target system, boot from the USB drive and start the installation and configuration work.

  11. Failed with a 16 G usb key, worked with virtual box : mounted the Cd on the VM, installed on the USB stick, 5 minutes !

    Thanks,

  12. I could not get it to work on Win7 SP1 for like 5 tries. then i read through the comments and found the Diskpart thing. i did it and still no avail. so then i got mad and just typed in the clean command like 11 times and it actually worked… goes to show that if at first you don’t succeed keep trying.

Leave a Reply