Burning an IMG File
If your system does not have a CDROM or you prefer to manually write the running image, download the img.xz file. This file will need to be uncompressed and then written to a compact flash card or USB thumbdrive that is 4 GB or larger. If you are writing the image to a compact flash card, make sure that it is MSDOS formatted.
DANGER! The dd command is very powerful and will destroy any existing data on the specified device. Be very sure that you know the device name to write to and that you do not typo the device name when using dd! If you are uncomfortable writing the image yourself, download the .iso file instead and use the instructions in Installing from CDROM.
Once you have written the image to the device, make sure the boot order in the BIOS is set to boot from that device and boot the system. It should boot into the Console setup menu described in the Initial Setup section.
NOTE: if the image does not boot, check the BIOS and change the USB emulation from CD/DVD/floppy to hard drive. If it still will not boot, check to see if the card/drive is UDMA compliant. Some users have also found that some cheap 4 GB USB sticks do not work as they are not really 2 GB in size, but changing to a 8 GB stick fixes the problem.
Using xzcat and dd on a FreeBSD or Linux System
On a FreeBSD or Linux system, the xzcat and dd commands can be used to uncompress and write the .xz image to an inserted USB thumb drive or compact flash device. Example 2.4a demonstrates writing the image to the first USB device (/dev/da0) on a FreeBSD system. Substitute the filename of your ISO and the device name representing the device to write to on your system.
Example 2.4a: Writing the Image to a USB Thumb Drive
xzcat FreeNAS-9.1.0-RELEASE-x64-img.xz | dd of=/dev/da0 bs=64k 0+476075 records in 0+476075 records out 3899999744 bytes transferred in 1184.211312 secs (3293331 bytes/sec)
When using the dd command:
- of= refers to the output file; in our case, the device name of the flash card or removable USB drive. You may have to increment the number in the name if it is not the first USB device. On Linux, use /dev/sdX, where X refers to the letter of the USB device.
- bs= refers to the block size
Using Keka and dd on an OS X System
On an OS X system, you can download and install Keka to uncompress the image. In FINDER, navigate to the location where you saved the downloaded .xz file. Right-click the .xz file and select "Open With Keka". After a few minutes you will have a large file with the same name, but no .xz extension.
Insert the USB thumb drive and go to Launchpad → Utilities → Disk Utility. Unmount any mounted partitions on the USB thumb drive. Check that the USB thumb drive has only one partition, otherwise you will get GPT partition table errors on boot. If needed, use Disk Utility to setup one partition on the USB drive; selecting "free space" when creating the partition works fine.
Next, determine the device name of the inserted USB thumb drive. From TERMINAL, navigate to your Desktop then type this command:
diskutil list /dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *500.1 GB disk0 1: EFI 209.7 MB disk0s1 2: Apple_HFS Macintosh HD 499.2 GB disk0s2 3: Apple_Boot Recovery HD 650.0 MB disk0s3 /dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *8.0 GB disk1 1: DOS_FAT_32 UNTITLED 8.0 GB disk1s1
This will show you which devices are available to the system. Locate your USB stick and record the path. If you are not sure which path is the correct one for the USB stick, remove the device, run the command again, and compare the difference. Once you are sure of the device name, navigate to the Desktop from TERMINAL, unmount the USB stick, and use the dd command to write the image to the USB stick. In Example 2.4b, the USB thumb drive is /dev/disk1. Substitute the name of your uncompressed file and the correct path to your USB thumb drive.
Example 2.4b: Using dd on an OS X System
diskutil unmountDisk /dev/disk1 Unmount of all volumes on disk1 was successful dd if=FreeNAS-9.1.0-RELEASE-x64.img of=/dev/disk1 bs=64k
NOTE:if you get the error "Resource busy" when you run the dd command, go to Applications → Utilities → Disk Utility, find your USB thumb drive, and click on its partitions to make sure all of them are unmounted. If you get the error "dd: /dev/disk1: Permission denied", run the dd command by typing sudo dd if=FreeNAS-8.3.1-RELEASE-x64.img of=/dev/disk1 bs=64k, which will prompt for the root user's password.
The dd command will take some minutes to complete. Wait until you get a prompt back and a message that displays how long it took to write the image to the USB drive.
Using 7-Zip and Win32DiskImager on Windows
Windows users will need to download a utility that can uncompress .xz files and a utility that can create a USB bootable image from the uncompressed .img file.
This section will demonstrate how to use 7-Zip and Win32DiskImager to burn the image file. When downloading Win32DiskImager, download the latest version that ends in -binary.zip and use 7-Zip to unzip its executable.
Once both utilities are installed, launch the 7-Zip File Manager and browse to the location containing your downloaded .img.xz file, as seen in Figure 2.4a.
Figure 2.4a: Using 7-Zip to Extract Image File
Click the Extract button, browse to the path to extract to, and click OK. The extracted image will end in .img and is now ready to be written to a USB device using Win32DiskImager.
Next, launch Win32DiskImager, shown in Figure 2.4b. Use the browse button to browse to the location of the .img file. Insert a USB thumb drive and select its drive letter (in this example, drive E). Click the Write button and the image will be written to the USB thumb drive.
Figure 2.4b: Using Win32DiskImager to Write the Image
NOTE: if the burned image fails to boot, wipe the USB stick before trying a second burn using a utility such as Active@ KillDisk. Otherwise, the second burn attempt will fail as Windows does not understand the GPT partition which was written from the image file. Be very careful that you specify the USB stick when using a wipe utility!